Learning Objectives
This list will be updated as new learning objectives are introduced in the class. Each in-class quiz question will relate to at least one of these learning objectives.
Learning objective |
In-class Quizzes |
---|---|
Extract basic information from Python documentation (such as the result of using help). | Quiz 1, Question 1 |
Extract basic information from a Python error message. | Quiz 1, Question 1 |
Choose from among list, tuple, range, set, NumPy array, depending on which is an appropriate data type for a particular task. | Quiz 1, Question 1 |
Convert between different data-types using syntax like np.array(my_tuple). | Quiz 1, Question 1 |
Write code defining a function. | Quiz 1, Question 1 |
Replace code written with a for-loop with code using list comprehension. | Quiz 1, Question 2 |
Find elements in a list or NumPy array which satisfy a given condition using list comprehension. | Quiz 1, Question 2 |
Generate random numbers (real numbers or integers) in NumPy using default_rng(). | Quiz 1, Question 3 |
Count elements in a NumPy array satisfying a given condition using a Boolean array and np.count_nonzero. | Quiz 1, Question 3 |
Estimate a probability using a random simulation and the formula successes/experiments. | Quiz 1, Question 3 |
Access entries (and assign values to entries) within pandas using loc, iloc. | Quiz 2, Question 1 |
Use the describe, info, and value_counts functions in pandas to learn about the distribution of data within a DataFrame or Series. | Quiz 2, Question 2 |
Identify the different data types present within a pandas DataFrame. | Quiz 2, Question 2 |
Count occurrences in rows or columns in a NumPy array or pandas DataFrame using sum and axis. | Quiz 2, Question 3 |
Select the rows in a pandas DataFrame where a certain condition is True, possibly using some combination of any, all, and axis. | Quiz 2, Question 3 |
Count the number of rows in a pandas DataFrame satisfying a condition. | Quiz 2, Question 3 |
Locate the missing values within a pandas DataFrame. | Quiz 2, Question 3 |
Find content satisfying conditions using logical statements (not, and, or) in Python and in pandas/NumPy (~, &, |). | Quiz 2, Question 3 |
Generate sequences of numbers using range and np.arange. | Midterm 1 (no quiz) |
Convert between a pandas Series and a dictionary. | Midterm 1 (no quiz) |
Create a pandas DataFrame from a dictionary whose keys become the column names and whose values become the entries. | Midterm 1 (no quiz) |
Find maximum or minimum values in a DataFrame using sort_values, possibly together with the ascending keyword. | Midterm 1 (no quiz) |
Recognize the "grammar of graphics" pattern of creating charts, in which columns in a DataFrame get encoded as visual properties of the chart. | Midterm 1 (no quiz) |
Identify how data in a pandas DataFrame is reflected in a corresponding Altair chart. | Midterm 1 (no quiz) |
Visualize aspects of a pandas DataFrame using Altair's mark_circle and mark_bar. | Midterm 1 (no quiz) |
Create a histogram using the shorthand count() in Altair. | Midterm 1 (no quiz) |
Specify appropriate encoding data types when creating an Altair chart, and recognize how those specifications influence the appearance of the chart. | Midterm 1 (no quiz) |
Customize the appearance of an Altair chart using alt.Scale and options such as domain or zero=False or scheme (for the colors). | Midterm 1 (no quiz) |
Include interactivity within Altair charts using selections together with condition or transform_filter. | Midterm 1 (no quiz) |
Evaluate a function entry-wise on a pandas Series using map together with a lambda function. | Midterm 1 (no quiz) |
Use the na_values keyword argument when reading a csv file to convert null values automatically. | Midterm 1 (no quiz) |
Write lambda functions of the form lambda ???: ??? if ??? else ???. | Midterm 1 (no quiz) |
Access (and possibly change) entries in a NumPy array or pandas DataFrame using slicing or indexing. | Midterm 1 (no quiz) |
Replace a column in a pandas DataFrame (for example, add 10 to each entry in the column, or convert the dtype of the column using pd.to_numeric or pd.to_datetime). | Midterm 1 (no quiz) |
Perform calculations involving datetime columns in pandas. | Midterm 1 (no quiz) |
Perform an operation on every row or column in a DataFrame, using apply and the axis keyword argument. | Midterm 1 (no quiz) |
Choose correctly in pandas among map, applymap, and apply, depending on the context. | Midterm 1 (no quiz) |
Recognize a common source of errors: the difference between methods which change the value of an object versus methods which change the object "inplace". | Midterm 1 (no quiz) |
Select an appropriate supervised machine learning model according to whether a task is a regression task or a classification task. | Quiz 3, Question 3 |
Explain the significance of a cost (or loss) function when choosing parameters for a model in Machine Learning. | Quiz 3, Question 2 |
Recognize and work with the pattern used by scikit-learn for constructing and training objects for Machine Learning, and for making predictions with those fitted objects. | Quiz 3, Question 1 |
Perform linear regression using scikit-learn and plot the results using Altair. | Quiz 3, Question 1 |
Interpret the signs (i.e., positive or negative) of coefficients in a linear regression model using real-world terms related to the problem. (And access those coefficients using scikit-learn.) | Quiz 3, Question 1 |
Explain the significance of having a test set when training a Machine Learning model. | Quiz 3, Question 2 |
Use a test set and scikit-learn's train_test_split and an evaluation metric to detect over-fitting in a model. | Quiz 3, Question 2 |
Evaluate the performance of a fitted model in scikit-learn. | Quiz 3, Question 2 |
Explain the data contained in the MNIST handwritten digit training set, and how to visualize the images in the data using imshow from Matplotlib. | Quiz 3, Question 3 |
Perform logistic regression using scikit-learn and analyze the confidence of the model using predict_proba. | Quiz 3, Question 2 |
Interpret the common U-shape test error curve appearing in plots illustrating the bias-variance tradeoff, such as in Introduction to Statistical Learning, Figure 2.9, Figure 2.12, Figure 2.17. | Quiz 3, Question 2 |
Given explicit data and a choice of k, determine the output of a K-Nearest Neighbors classifier or regressor for a specific input. | Quiz 4, Question 1 |
Train a K-Nearest Neighbors classifier or regressor (depending on which is appropriate for the given situation) using scikit-learn. | Quiz 4, Question 1 |
Relate the choice of K in a K-Nearest Neighbors classifier or regressor to the potential for over-fitting/under-fitting and to the bias-variance tradeoff. | Quiz 4, Question 1 |
Evaluate the accuracy of a Machine Learning classification algorithm by counting the number of correct predictions and dividing by the total number of predictions. | Quiz 4, Question 3 |
Extract a sub-DataFrame in pandas using isin and the index of a pandas Series generated using value_counts. | Quiz 4, Question 3 |
Explain the importance of using StandardScaler when evaluating a K-Nearest Neighbors Machine Learning algorithm. | Quiz 4, Question 2 |
Rescale numeric data in pandas using StandardScaler. | Quiz 4, Question 2 |
Recognize the inputs expected by the log_loss metric (especially the shape of those inputs, and their meaning). | Quiz 4, Question 3 |
Create new columns in a pandas DataFrame from existing columns, such as a Boolean column indicating whether a datetime value was on the weekend or not. (This is an example of "Feature Engineering".) | Quiz 4, Question 3 |
For a Machine Learning algorithm with two possible outputs, describe the significance of the corresponding decision boundary. | Quiz 5 |
Outline the steps which go into the training of a neural network using gradient descent (both in words and as PyTorch code). | Quiz 5 |
Recognize the importance of activation functions in a neural network's hidden layers for breaking linearity. | Quiz 5 |
Adjust the learning rate of a stochastic gradient descent optimizer in response to the behavior of the loss function. | Quiz 5 |
Make changes to the design of a neural network to adjust the network's flexibility/variance. | Quiz 5 |
Recognize the potential for a neural network to overfit training data, especially as that network becomes more complex. | Quiz 5 |
Determine the explicit function corresponding to a small neural network (possibly with a hidden layer). | Quiz 5 |
Write code for constructing, instantiating, training, and evaluating a neural network in PyTorch. | Quiz 5 |
Given code as in the previous learning objective, label the various components of the code to indicate what role they play. | Quiz 5 |
Select appropriate input and output dimensions for a neural network, according to the given data. | Quiz 5 |
Select appropriate output activation functions as well as loss functions for a neural network, according to the given data. | Quiz 5 |