Classical Machine Learning Classification
- 69Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
69 questions
- 1A supervised learning task that predicts a category or label is called_____.
Hint
Unlike regression, this task predicts a class or label.
Answer
classification
Explanation
Classification is a supervised learning task that predicts a category, such as whether a penguin is male or female. Regression instead predicts a numerical value.
- 2A supervised learning model that predicts a numerical value for a new data point performs_____.
Hint
Think of predicting a measurable quantity rather than a class.
Answer
regression
Explanation
Regression models predict numerical values for new data points, while classification models predict categories.
- 3The data set used to demonstrate classification contains penguin measurements and is known as_____.
Hint
This is the name of the penguin data set used in the example.
Answer
Palmer's Penguins
Explanation
The workshop uses the Palmer's Penguins data set, which contains measurements and categorical information for penguins.
- 4The Palmer's Penguins data set contains_____penguin species.
Hint
The species labels include Adelie, Gentoo, and Chinstrap.
Answer
three
Explanation
The data set includes three penguin species, so predicting species would be a multi-class classification problem.
- 5A model that predicts whether a penguin is male or female is a_____.
Hint
The target has two possible categories.
Answer
binary classifier
Explanation
Predicting male or female gives two possible classes, making the gender-prediction model a binary classifier.
- 6Predicting which of three penguin species an observation belongs to is an example of_____.
Hint
Consider classification with several possible categories rather than just two.
Answer
multi-label classification
Explanation
The lesson describes classification across more than two categories as multi-label classification; predicting among three penguin species is its example.
- 7If a classifier predicts among three species, its confusion matrix has dimensions_____.
Hint
Use the number of classes for both matrix dimensions.
Answer
3 by 3
Explanation
A confusion matrix has one row and column for each class. With three species, it has three rows and three columns.
- 8Before training the models in this example, all input variables must be converted to_____.
Hint
Think of the data type the model inputs must use.
Answer
numeric
Explanation
The lesson states that variables used to train the models must be numeric, so categorical variables need encoding first.
- 9Species, island, and sex are examples of_____that need to be encoded before model training.
Hint
These variables represent named groups or labels.
Answer
categorical variables
Explanation
Species, island, and sex are categories rather than continuous measurements, so they are categorical variables that must be encoded for the models.
- 10The three categorical variables identified for encoding in the penguin data are_____.
Hint
Name the three non-measurement categories in the example.
Answer
species, island, and sex
Explanation
The penguin data set has three categorical variables identified for encoding: species, island, and sex.
- 11The tool used in the example to convert categories into numeric labels is_____.
Hint
This scikit-learn tool maps category labels to numbers.
Answer
LabelEncoder
Explanation
The lesson uses LabelEncoder to convert categorical values into numeric labels.
- 12After label encoding, a variable with three categories is represented by_____.
Hint
Three distinct classes need three distinct integer labels in this example.
Answer
0, 1, or 2
Explanation
Three categories are represented by three numeric labels: 0, 1, and 2.
- 13After label encoding, the two sex categories are represented by_____.
Hint
Two categories receive two integer labels.
Answer
0 or 1
Explanation
The two sex categories are represented by two numeric labels, 0 and 1.
- 14The scikit-learn tool used to standardize numerical features in the example is_____.
Hint
This scaler is used to standardize numerical features.
Answer
StandardScaler
Explanation
StandardScaler transforms numerical features so that their values are expressed on a standardized scale.
- 15The intended standardized distribution has a_____.
Hint
Recall the two target statistics of the standardized distribution.
Answer
mean of 0 and standard deviation of 1
Explanation
The stated standardization converts numerical variables to a Gaussian distribution with mean 0 and standard deviation 1.
- 16In pandas, the function used to remove rows with missing values is_____.
Hint
This pandas operation drops rows with missing entries.
Answer
dropna
Explanation
The dropna function removes rows containing missing values, allowing the data set to be cleaned before modeling.
- 17After rows with missing values were removed, the data set contained_____rows.
Hint
Subtract the ten rows removed from the original row count.
Answer
334
Explanation
Removing rows with missing values reduced the original 344-row data set to 334 rows.
- 18After the row with a dot instead of a sex category was filtered out, the data set contained_____rows.
Hint
One more row was excluded after the data set had 334 rows.
Answer
333
Explanation
After the missing-value rows were dropped, one additional row with an invalid dot in the sex field was removed, leaving 333 rows.
- 19To count the observations in each species, island, or sex category, the lesson uses_____.
Hint
Think of a pandas operation that counts occurrences of each distinct value.
Answer
value counts
Explanation
The value counts operation reports how many observations belong to each category in a variable.
- 20Rows with NaN entries contain_____that need to be addressed during preprocessing.
Hint
These are absent entries, often represented as NaN.
Answer
missing values
Explanation
The initial data set had missing entries in several measurement columns and in sex, so it required cleaning before model training.
- 21An extreme value that differs substantially from the rest of a distribution is an_____.
Hint
These observations are unusually far from the general pattern.
Answer
outliers
Explanation
An outlier is an extreme observation that lies far from the rest of the data. It may reflect an error or have a meaningful cause that should be investigated.
- 22The method described identifies outliers by dividing the ordered data into four parts called_____.
Hint
These divide a distribution into four equal parts.
Answer
quartiles
Explanation
Quartiles divide ordered data into four portions, each containing about 25% of the observations, and are used to construct the interquartile range.
- 23The distance between the first and third quartiles, used to define outlier fences, is the_____.
Hint
It spans the middle half of the data.
Answer
interquartile range
Explanation
The interquartile range measures the distance between the first and third quartiles and is used to set the outlier fences.
- 24The inner outlier fences extend_____below the first quartile and above the third quartile.
Hint
This is the multiplier used for the inner fences.
Answer
1.5 times the interquartile range
Explanation
The inner lower fence is one and a half interquartile ranges below the first quartile, and the inner upper fence is the same distance above the third quartile.
- 25The outer outlier fences are set_____beyond the first and third quartiles.
Hint
The outer fences extend twice as far as the inner-fence multiplier.
Answer
3 times the interquartile range
Explanation
The outer fences use three interquartile ranges below the first quartile and above the third quartile.
- 26To visualize the distributions of measurements such as culmen length, the lesson uses_____.
Hint
These plots display frequencies across numeric intervals.
Answer
histograms
Explanation
Histograms show how numerical measurements are distributed by grouping values into bins.
- 27The smooth distribution curve plotted alongside a histogram is the_____.
Hint
This is the smooth density curve that can be overlaid on a histogram.
Answer
kernel density estimate
Explanation
The kernel density estimate adds a smoothed representation of the distribution to the histograms.
- 28The portion of the data used to fit a machine-learning model is the_____.
Hint
This portion is used for learning model parameters.
Answer
training data
Explanation
The training data are used to fit the model and let it learn patterns linking input features to the target.
- 29The portion held aside to evaluate predictions on unseen observations is the_____.
Hint
This held-out portion is used to assess model performance.
Answer
testing data
Explanation
The testing data are held aside to evaluate how well the trained model predicts observations it did not train on.
- 30In the example's usual split, approximately_____of the data is used for training.
Hint
This is the larger share of the usual training-and-testing split.
Answer
80%
Explanation
The lesson uses about 80% of the observations for training when there is sufficient data, leaving about 20% for testing.
- 31In the example's usual split, approximately_____of the data is reserved for testing.
Hint
This is the smaller share reserved for evaluation.
Answer
20%
Explanation
About 20% of the observations are held out for testing the trained model.
- 32To reproduce the same randomized train-test split across runs, specify a_____.
Hint
This value controls the random number generator so repeated runs can match.
Answer
random seed
Explanation
Setting a random seed makes randomized operations such as the train-test split repeatable, supporting reproducibility.
- 33The example sets the random state to_____to make its split reproducible.
Hint
This is the particular reproducibility value used in the example.
Answer
42
Explanation
The example sets the random state to 42 for reproducibility.
- 34The example's training feature set contains_____rows.
Hint
This is the number of training observations reported in the example.
Answer
266
Explanation
With the selected split, the training features contain 266 rows.
- 35The example's testing feature set contains_____rows.
Hint
This is the number of held-out test observations reported.
Answer
67
Explanation
The test set contains 67 rows, or about one fifth of the cleaned observations.
- 36One of the three models used in the example is the_____.
Hint
This classifier predicts using nearby observations in feature space.
Answer
k-nearest neighbors classifier
Explanation
The lesson tests three classifiers, including k-nearest neighbors with three neighbors.
- 37The k-nearest neighbors model in the example bases its classification on_____.
Hint
This is the selected value of k in the example.
Answer
three neighbors
Explanation
The example configures its k-nearest neighbors classifier to use three neighboring observations.
- 38The classifier whose maximum depth was set to three is the_____.
Hint
This classifier makes decisions through a branching structure.
Answer
decision tree classifier
Explanation
The decision tree classifier is one of the three models evaluated, and its maximum depth is set to three.
- 39The third classifier compared in the example is the_____.
Hint
This classifier is based on support vector machines.
Answer
support vector classifier
Explanation
The support vector classifier is the third model tested, using a linear kernel in the example.
- 40Culmen length, culmen depth, flipper length, body mass, island, and species are the model's_____.
Hint
These are the predictor variables supplied to the model.
Answer
features
Explanation
Features are the input variables used to make a prediction. In this model they include measurements and categories such as island and species.
- 41In the penguin gender-prediction task, encoded sex is the_____.
Hint
This is the response or label the model aims to predict.
Answer
target variable
Explanation
The target variable is the outcome the model is trained to predict; here it is encoded sex.
- 42After creating a classifier, the model is trained on the training features and labels by calling it to_____.
Hint
This verb describes learning from labeled training examples.
Answer
fit
Explanation
Fitting a classifier means training it on the training features and their corresponding target labels.
- 43When an observation is actually positive and is predicted as positive, it is a_____.
Hint
Both the actual class and the prediction are positive.
Answer
true positive
Explanation
A true positive occurs when the actual condition is positive and the model also predicts positive.
- 44When an observation is actually positive but is predicted as negative, it is a_____.
Hint
The model misses a positive case by predicting the negative class.
Answer
false negative
Explanation
A false negative occurs when an observation is actually positive but the model predicts negative.
- 45When an observation is actually negative and is predicted as negative, it is a_____.
Hint
Both the actual class and the prediction are negative.
Answer
true negative
Explanation
A true negative occurs when the actual condition is negative and the model correctly predicts negative.
- 46When an observation is actually negative but is predicted as positive, it is a_____.
Hint
The model incorrectly labels a negative case as positive.
Answer
false positive
Explanation
A false positive occurs when an observation is actually negative but the model predicts positive.
- 47The table that compares predicted conditions with actual conditions is a_____.
Hint
This table organizes predictions against the actual outcomes.
Answer
confusion matrix
Explanation
A confusion matrix compares actual classes with predicted classes and summarizes correct classifications and misclassifications.
- 48The lesson uses a_____to display confusion-matrix values more clearly.
Hint
This color-coded visualization highlights larger and smaller matrix entries.
Answer
Seaborn heatmap
Explanation
A heatmap makes the numerical values in a confusion matrix easier to interpret visually.
- 49The metric calculated as true positives divided by all positive predictions is_____.
Hint
This metric answers: of the cases predicted positive, how many really were positive?
Answer
precision
Explanation
Precision measures the proportion of positive predictions that are truly positive: true positives divided by true positives plus false positives.
- 50The metric calculated as true positives divided by all actual positive cases is_____.
Hint
This metric asks how many of the actual positive cases the model found.
Answer
recall
Explanation
Recall measures the proportion of actual positive cases that were identified: true positives divided by true positives plus false negatives.
- 51The metric that combines precision and recall into one score is the_____.
Hint
This measure summarizes the balance between precision and recall.
Answer
F1 score
Explanation
The F1 score combines precision and recall into a single measure, making it useful when both are important.
- 52The number of actual observations for a class in a classification report is its_____.
Hint
This report column counts the true examples in each class.
Answer
support
Explanation
In a classification report, support is the number of actual observations belonging to a class.
- 53An average that treats every class equally regardless of its size is the_____.
Hint
Each class contributes equally to this average.
Answer
macro average
Explanation
A macro average computes a metric for each class and averages the class results without weighting by class size.
- 54An average that gives class results influence according to their support is the_____.
Hint
Larger classes contribute more to this average.
Answer
weighted average
Explanation
A weighted average accounts for the number of observations in each class when combining class-level metric values.
- 55The measure of a classifier's ability to correctly identify negative cases is_____.
Hint
This metric focuses on correctly recognizing negative observations.
Answer
specificity
Explanation
Specificity, also called the true negative rate, measures how well a classifier identifies negative cases.
- 56One additional classification metric named alongside the F1 score is the_____.
Hint
This is a named similarity-based metric used to evaluate classifications.
Answer
Jaccard index
Explanation
The Jaccard index is another classification metric mentioned in the lesson; different applications may favor different metrics.
- 57The best evaluation metric can depend on the research field and the_____.
Hint
Metric choice depends on what the task needs to emphasize.
Answer
application
Explanation
The appropriate metric depends on the purpose of the analysis and the priorities of the research or application area.
- 58The abbreviation ROC stands for_____.
Hint
Expand the letters in ROC.
Answer
receiver operating characteristic
Explanation
ROC stands for receiver operating characteristic and describes a curve used to assess classifier performance.
- 59One rate plotted on the ROC curve is the_____.
Hint
This is the vertical-axis rate on an ROC curve.
Answer
true positive rate
Explanation
The ROC curve plots the true positive rate against the false positive rate as the classification threshold varies.
- 60The other rate plotted on the ROC curve is the_____.
Hint
This is the rate of incorrectly labeling negatives as positive.
Answer
false positive rate
Explanation
The false positive rate tracks the proportion of actual negative cases incorrectly classified as positive.
- 61The summary value used to compare ROC curves is the_____.
Hint
This quantity is often abbreviated AUC.
Answer
area under the curve
Explanation
The area under the ROC curve summarizes the classifier's performance across thresholds; the lesson uses it to compare models.
- 62An ROC area of_____indicates performance like random classification.
Hint
This is the midpoint value associated with random performance.
Answer
0.5
Explanation
An area under the ROC curve of 0.5 corresponds to random classification in the lesson's interpretation.
- 63A perfect classifier has an area under the ROC curve of_____.
Hint
This is the maximum possible ROC area.
Answer
1
Explanation
A perfect classifier has an ROC area of 1, corresponding to complete separation of the classes.
- 64Among the three example models, the highest ROC area belongs to the_____.
Hint
Compare the three reported areas: 0.94, 0.93, and 0.91.
Answer
k-nearest neighbors classifier
Explanation
The reported ROC areas are 0.94 for k-nearest neighbors, 0.93 for the decision tree, and 0.91 for the support vector classifier, so k-nearest neighbors is highest.
- 65Simplifying a data problem by representing it with fewer dimensions is called_____.
Hint
This approach reduces the number of dimensions in a data representation.
Answer
dimensionality reduction
Explanation
Dimensionality reduction simplifies a problem with many variables by transforming it into a representation with fewer dimensions.
- 66The penguin example describes a problem with_____variables before possible reduction.
Hint
Count the four measurements plus species and gender.
Answer
six
Explanation
The example discusses six variables: four physical measurements, species, and gender.
- 67One proposed simplification is to transform the six-variable problem into one with_____dimensions.
Hint
This is the smaller number of dimensions proposed in the example.
Answer
two
Explanation
The lesson gives reducing a six-dimensional problem to two dimensions as an example of simplification.
- 68The lesson proposes using transformations from_____to map data into a simpler vector space.
Hint
This area of mathematics studies vector spaces and transformations.
Answer
linear algebra
Explanation
The proposed transformation from the original vector space to a simpler one uses linear algebra.
- 69When simplifying a model, one question is whether every variable is equally_____to the prediction task.
Hint
The key question is whether each variable matters to the problem.
Answer
relevance
Explanation
Dimensionality reduction can help determine whether all variables are useful or whether some carry less relevant information.

Ask anything
We've read this whole study set, so questions about it get the best answers.