Mid-Term Exam Flashcards
List and describe four levels of measurements.
Nominal
Ordinal
Interval
Ratio
Python includes built in data types for lists, sets, and dicts?
True
The median of a set of numbers is defined as …
The middle value.
Put the numbers in order
If 2 numbers are in the middle compute the mean.
It is good at finding the center distribution.
All data are quantitative?
False
Ordinal values allow us to measure distances
False
Nominal values allow us to order different data points
False
Python includes built in data types for lists, sets, and dicts
True
Explain the difference between list and dict values in python.
Python lists are ordered variable-length arrays, rather than linked lists
Python dictionaries unordered unique resizable hash tables.
if statements in python can include additional clauses using the elseif keyword.
False
What does lamda do in python?
lamda is a way to create a temporary function
It can be used when performing a map(lambda x: x, x+2)
Data formats are used as a way to share data between systems?
True
Data are measurements of a phenomenon
True
Data are the same as the thing being measured
False
Systems store formatted data
True
CSV files are like a tab from a spreadsheet
True
numpy arrays have no data type
False
Array is a dimensional vector
NumPy arrays have a .all() method that returns true if any of the elements are true
false
What does the argmax function do in numpy?
Returns the indices of the maximum values along an axis
Explain the relationship between a Series and a DataFrame in pandas?
Series is the datastructure for a single column of a DataFrame
The data in a DataFrame is actually stored in memory as a collection of Series
What is an “index” on a pandas dataframe?
An index is the reference to the series in dataframe
You can see the first several rows of a dataframe using
df.first()
False
Given two series, a and b, does a == b return true if they’re equivalent and false otherwise? If not, what does it produce instead?
The == operator compares by checking for equality
It would return ‘both a and b are equal’
Compare and contrast supervised and unsupervised machine learning
Supervised learning is machine learning that we have the answer for (labeled data)
Unsupervised learning is ML for which we are uncertain as to the answer or have no labeled data.
Compare and contrast regression and classification
Regression is the process of trying to make a prediction based on a previous data set.
Classification is where we are attempting to determine if something is part of a class.