Linear Regression with Scikit-Learn
- 114Unfamiliar
- 0Learning
- 0Familiar
- 0Mastered
114 questions
- 1A machine learning problem that predicts a continuous numerical value, such as medical expenses or house prices, is called a_____problem.
Hint
Contrast continuous quantities with discrete categories.
Answer
regression
- 2A machine learning problem in which each input is assigned to a discrete category or label is called a_____problem.
Hint
Examples include rain versus no rain and benign versus malignant.
Answer
classification
- 3Machine learning that uses labeled examples containing known target values is called_____learning.
Hint
The model receives the correct answers during training.
Answer
supervised
- 4Machine learning that discovers structure or groups in data without target labels is called_____learning.
Hint
Clustering is a common example.
Answer
unsupervised
- 5In a typical machine learning workflow, the assumed relationship between input features and targets is represented by the_____.
Hint
It has a structure and learned parameters.
Answer
model
- 6The values that a machine learning algorithm learns or estimates inside a model are called model_____.
Hint
In linear regression, these include weights and a bias.
Answer
parameters
- 7Values selected before training, such as maximum tree depth or learning rate, are called_____parameters.
Hint
They are set by the practitioner rather than learned directly by the model.
Answer
hyper
- 8The numerical function used during training to measure how badly predictions differ from targets is called a_____function.
Hint
The optimizer attempts to minimize it.
Answer
loss
- 9In linear regression, the relationship between an input x and a target y is commonly written as y=wx+b, where w is the_____.
Hint
It controls the rate at which the target changes with the input.
Answer
slope
- 10In the equation y=wx+b, the value b is the_____because it is the value of y when x=0.
Hint
It is where the line crosses the y axis.
Answer
intercept
- 11In machine learning terminology, the slope of a linear model is often called a_____.
Hint
It multiplies an input feature.
Answer
weight
- 12In machine learning terminology, the intercept of a linear model is often called a_____.
Hint
It is added after the weighted inputs.
Answer
bias
- 13In a medical expense model, the age and BMI values supplied to the model are called the_____.
Hint
They are the information provided to generate a prediction.
Answer
inputs
- 14In the same medical expense model, the actual charges that the model tries to predict are called the_____.
Hint
They are the known desired outputs in the training data.
Answer
targets
- 15A linear regression model with several features predicts a target using a weighted_____of those features.
Hint
Each feature is multiplied by a weight and the results are added.
Answer
sum
- 16The Scikit Learn class commonly used to fit a linear relationship between features and a continuous target is_____.
Hint
Its name combines the type of relationship with the task.
Answer
LinearRegression
- 17The optimization method used by Scikit Learn's LinearRegression class is generally the_____least squares method.
Hint
It directly computes the best coefficients using matrix operations.
Answer
ordinary
- 18Adding a second numeric feature to linear regression changes a fitted line into a two feature geometric_____.
Hint
The model still has a linear relationship but now uses an additional dimension.
Answer
plane
- 19The difference between an actual target and its model prediction is called a_____.
Hint
It measures how far a data point is from the fitted prediction.
Answer
residual
- 20RMSE stands for_____mean squared error.
Hint
The metric takes a square root after averaging squared errors.
Answer
root
- 21RMSE squares residuals so that positive and negative errors do not_____each other out.
Hint
Without squaring, errors with opposite signs could sum to zero.
Answer
cancel
- 22RMSE is expressed in the same units as the target because the final square root changes squared dollars back into_____.
Hint
The metric is easier to interpret when it uses the target's original units.
Answer
dollars
- 23Compared with RMSE, mean absolute error gives less influence to extreme_____.
Hint
It uses absolute values rather than squared errors.
Answer
outliers
- 24A model with a lower loss is generally considered_____than a model with a higher loss.
Hint
Loss measures how much information the model fails to capture.
Answer
better
- 25The strategy of repeatedly taking a small step in the direction that reduces the loss is called gradient_____.
Hint
Imagine moving downhill while checking which direction goes lower.
Answer
descent
- 26Ordinary least squares is usually efficient for small datasets but can become inefficient and memory intensive for_____datasets.
Hint
Think of datasets with millions of rows.
Answer
larger
- 27Stochastic gradient descent is especially useful for training models on_____datasets.
Hint
It updates parameters iteratively rather than solving everything directly.
Answer
larger
- 28A correlation coefficient describes the strength and_____of the relationship between two variables.
Hint
The sign indicates increasing or decreasing association.
Answer
direction
- 29A correlation coefficient can range from_____one to one.
Hint
The lower endpoint represents perfect negative correlation.
Answer
minus
- 30A correlation coefficient of one represents a perfectly_____linear relationship.
Hint
Both variables increase together in a completely consistent way.
Answer
positive
- 31A correlation coefficient close to minus one represents a perfectly_____linear relationship.
Hint
As one variable increases, the other decreases consistently.
Answer
negative
- 32A correlation coefficient close to zero indicates practically no linear_____.
Hint
The variables do not show a clear increasing or decreasing trend.
Answer
correlation
- 33The pandas method used to compute correlations between numeric series is_____.
Hint
It is a short method name applied to a Series or DataFrame.
Answer
corr
- 34To compute a correlation involving a categorical feature such as smoker, the categories must first be converted into_____values.
Hint
Correlation calculations require numbers.
Answer
numeric
- 35A high correlation between two variables does not prove a cause and_____relationship.
Hint
Correlation does not establish which variable causes the other.
Answer
effect
- 36A variable that independently causes two correlated variables is often called a_____variable.
Hint
It can create an apparent relationship between two other variables.
Answer
confounding
- 37In logistic regression, the weighted sum of input features is passed through the_____function.
Hint
This function squashes values into the interval from zero to one.
Answer
sigmoid
- 38The output of the sigmoid function is interpreted as the_____of the positive class.
Hint
For rain prediction, it can represent the chance of rain tomorrow.
Answer
probability
- 39The loss function commonly used for logistic regression is called_____entropy loss.
Hint
It penalizes incorrect predicted probabilities.
Answer
cross
- 40Logistic regression is primarily a_____algorithm, despite its name.
Hint
It is used to predict categories such as yes or no.
Answer
classification
- 41A classification problem with two possible classes, such as rain or no rain, is called_____classification.
Hint
The prefix refers to two outcomes.
Answer
binary
- 42A classification problem with more than two possible classes, such as handwritten digits, is called_____classification.
Hint
The model chooses among many categories.
Answer
multi-class
- 43The Australian weather task predicts whether it will rain tomorrow using weather data from_____.
Hint
The input consists of current weather observations.
Answer
today
- 44The prediction of whether rain will occur tomorrow is a classification problem because the output is a discrete_____.
Hint
The alternatives are yes and no.
Answer
class
- 45The training set is used to_____the model's parameters.
Hint
Predictions are compared with known targets during this stage.
Answer
train
- 46A validation set is used to evaluate model variations while tuning models, but it should not be used to_____the model directly.
Hint
It helps compare choices such as different hyper parameters.
Answer
train
- 47A test set should generally be used only at the end to report the model's final_____.
Hint
Using it repeatedly during development can lead to overfitting.
Answer
performance
- 48The phenomenon in which a model performs very well on training data but poorly on unseen data is called_____.
Hint
The model has memorized examples instead of learning general patterns.
Answer
overfitting
- 49A common random split for a sufficiently large dataset uses approximately 60% for training, 20% for validation, and 20% for_____.
Hint
This final portion is reserved for reporting results.
Answer
testing
- 50For time series data, training, validation, and test sets should often be separated chronologically to prevent learning from the_____.
Hint
A model should not use later observations to predict earlier ones.
Answer
future
- 51The scikit-learn utility commonly used for random train and test splitting is_____.
Hint
Its name directly describes the operation.
Answer
train_test_split
- 52The process of replacing missing values with estimated values is called_____.
Hint
A simple strategy may use the column mean.
Answer
imputation
- 53A common simple imputation strategy replaces missing numeric values with the column_____.
Hint
It is the arithmetic average of the available values.
Answer
mean
- 54When a numeric feature contains strong outliers, replacing missing values with the_____may be preferable to using the mean.
Hint
This measure is less affected by extreme values.
Answer
median
- 55Scaling a numeric feature means transforming its values into a more consistent_____.
Hint
This prevents features with large magnitudes from dominating optimization.
Answer
range
- 56The Scikit Learn transformer that commonly scales numeric features into the interval from zero to one is_____.
Hint
Its name refers to the minimum and maximum values.
Answer
MinMaxScaler
- 57Standardization typically transforms a feature to have mean zero and standard deviation_____.
Hint
This is the usual standardized scale.
Answer
one
- 58The technique that converts each category into a separate column containing zeros and ones is called_____encoding.
Hint
Exactly one category column is active for each row.
Answer
one-hot
- 59A categorical feature with two categories that indicates the presence or absence of something can be represented using_____and one.
Hint
The two values form a binary representation.
Answer
zero
- 60A decision tree represents a hierarchical sequence of_____decisions.
Hint
Each node usually chooses between two branches.
Answer
binary
- 61A decision tree classifier selects splits by attempting to reduce a measure called the_____score.
Hint
A lower value indicates a purer or better split.
Answer
Gini
- 62A perfect decision-tree split has a Gini score of_____.
Hint
All observations after the split belong perfectly to their classes.
Answer
zero
- 63The maximum number of levels allowed in a decision tree is controlled by the_____hyper parameter.
Hint
It directly limits how deep the tree can grow.
Answer
max_depth
- 64The number of terminal nodes in a decision tree can be limited using the_____hyper parameter.
Hint
Leaf nodes are the endpoints where predictions are returned.
Answer
max_leaf_nodes
- 65A decision tree that memorizes nearly every training example is likely to have a very high training accuracy but poor_____accuracy.
Hint
This measures performance on previously unseen examples during development.
Answer
validation
- 66The process of restricting tree depth or leaf count to reduce overfitting is called_____.
Hint
It controls model complexity.
Answer
regularization
- 67A decision tree can be inspected using feature_____values that indicate the relative contribution of features.
Hint
These values help identify which columns the tree relies on most.
Answer
importance
- 68A random forest combines the predictions of many decision_____.
Hint
A forest is a collection of these models.
Answer
trees
- 69For classification, a random forest usually combines tree predictions by_____.
Hint
The most frequently predicted class is selected.
Answer
voting
- 70For regression, a random forest usually combines tree predictions by taking their_____.
Hint
The result is a continuous numerical value.
Answer
average
- 71The technique of combining multiple models to obtain a stronger overall model is called_____.
Hint
It relies on combining diverse predictions.
Answer
ensembling
- 72Random forests benefit from model diversity because errors from individual trees can_____when their predictions are combined.
Hint
Some trees may overestimate while others underestimate.
Answer
cancel
- 73The random forest hyper parameter that controls the number of decision trees is called_____.
Hint
It determines how many estimators are placed in the forest.
Answer
n_estimators
- 74Randomly selecting training rows with replacement for different trees is called_____.
Hint
Each tree receives a different resampled dataset.
Answer
bootstrapping
- 75Randomly selecting a subset of features for each split helps prevent all trees in a forest from becoming_____.
Hint
The trees should be diverse rather than making exactly the same decisions.
Answer
identical
- 76In gradient boosting, the first prediction is often the_____value of the target column.
Hint
This initial prediction ignores the input features.
Answer
average
- 77Each new decision tree in gradient boosting is trained to correct the_____made by the previous model.
Hint
The trees focus on residuals rather than starting over.
Answer
errors
- 78The parameter that scales the contribution of each new tree in gradient boosting is the_____rate.
Hint
A smaller value makes each update more gradual.
Answer
learning
- 79Gradient boosting is called boosting because new models are added to_____an existing model.
Hint
This differs from independently training trees and averaging them.
Answer
improve
- 80The Python library commonly used in the course for efficient gradient boosting is_____.
Hint
Its name begins with XG and it provides regressor and classifier classes.
Answer
XGBoost
- 81The XGBoost parameter that determines the maximum depth of each boosting tree is_____.
Hint
It limits the complexity of each individual tree.
Answer
max_depth
- 82The gradient boosting parameter that controls how many successive trees are trained is_____.
Hint
Increasing it adds more corrective models.
Answer
n_estimators
- 83In K-fold cross-validation, the dataset is divided into_____parts called folds.
Hint
The letter also appears in the name of the technique.
Answer
K
- 84During K-fold cross-validation, each fold is used once as the_____set.
Hint
The remaining folds are used for training in that iteration.
Answer
validation
- 85K-fold cross-validation allows every observation to be used for both training and_____across different iterations.
Hint
Each fold changes roles during the process.
Answer
validation
- 86A baseline model that always predicts the average target provides a minimum standard that later models should_____.
Hint
A complex model should outperform a simple reference.
Answer
beat
- 87A baseline model that always predicts the most common class is especially useful for imbalanced_____problems.
Hint
It exposes whether accuracy is inflated by a dominant class.
Answer
classification
- 88The condition in which one class occurs much more often than another is called class_____.
Hint
Rain tomorrow had far fewer yes values than no values.
Answer
imbalance
- 89Creating, transforming, or combining features to make them more useful for a model is called feature_____.
Hint
Extracting year and month from a date is one example.
Answer
engineering
- 90Extracting year, month, day, weekday, and hour from a timestamp is an example of feature_____.
Hint
The original date is transformed into several predictive variables.
Answer
engineering
- 91A model's ability to perform well on new data rather than memorized training examples is called_____.
Hint
It is the opposite of overfitting.
Answer
generalization
- 92Combining predictions from several different model types is an example of_____.
Hint
The combined result may be better than any individual model.
Answer
ensembling
- 93Training a second model to learn how to combine the outputs of several first-level models is called_____.
Hint
The models are arranged in layers.
Answer
stacking
- 94The task of grouping similar unlabeled observations into groups is called_____.
Hint
It is a major form of unsupervised learning.
Answer
clustering
- 95In K-means clustering, the letter K specifies the desired number of_____.
Hint
You choose this number before fitting the algorithm.
Answer
clusters
- 96The center point representing a K-means cluster is called a_____.
Hint
It is calculated as the mean of the points assigned to a cluster.
Answer
centroid
- 97K-means assigns an observation to the cluster whose centroid is_____to that observation.
Hint
The algorithm uses distance to determine membership.
Answer
closest
- 98The total within-cluster variance used to assess K-means clustering is called_____.
Hint
Lower values indicate points are more tightly grouped around centroids.
Answer
inertia
- 99A graph of K-means inertia against the number of clusters is called an_____curve.
Hint
The preferred K often occurs where improvement begins to level off.
Answer
elbow
- 100DBSCAN identifies clusters using the local_____of observations.
Hint
It looks for regions containing many nearby points.
Answer
density
- 101In DBSCAN, a point that has enough neighboring observations within the specified radius is called a_____point.
Hint
It forms the dense interior of a cluster.
Answer
core
- 102The dimensionality reduction method that uses linear projections to preserve as much variance as possible is_____.
Hint
It is commonly abbreviated PCA.
Answer
principal component analysis
- 103The new axes created by principal component analysis are called principal_____.
Hint
They are ordered according to the amount of variance they capture.
Answer
components
- 104Reducing hundreds of features to a smaller number while retaining important variation is called dimensionality_____.
Hint
The number of dimensions or columns becomes smaller.
Answer
reduction
- 105The nonlinear visualization technique commonly abbreviated T-SNE is a form of_____learning.
Hint
It preserves local neighborhood relationships in a lower-dimensional representation.
Answer
manifold
- 106T-SNE is especially useful for_____high-dimensional data in two or three dimensions.
Hint
It helps reveal clusters in data that cannot be directly plotted in many dimensions.
Answer
visualizing
- 107In a practical machine learning project, the first step is to understand the_____requirements.
Hint
You must know why the model is being built and how it will be used.
Answer
business
- 108Before choosing a model, a data scientist should determine whether the task is regression, classification, or_____learning.
Hint
This third category has no target labels.
Answer
unsupervised
- 109The metric used by people to judge whether a model meets business goals is called an evaluation_____.
Hint
Examples include accuracy, precision, recall, and RMSE.
Answer
metric
- 110A model's final results should be presented using language and visualizations that nontechnical_____can understand.
Hint
These are the people who make decisions based on the project.
Answer
stakeholders
- 111When a model gives an individual prediction, the data must undergo the same_____steps used during training.
Hint
This includes imputation, scaling, and categorical encoding.
Answer
preprocessing
- 112A saved machine learning model should usually be stored together with its imputer, scaler, encoder, and relevant column_____.
Hint
These objects are needed to process future inputs consistently.
Answer
names
- 113The Python library commonly used in the content to serialize and reload trained models is_____.
Hint
It can save Python objects such as models and preprocessing tools.
Answer
joblib
- 114An API route allows another program to send input data to a model and receive a prediction through a web_____.
Hint
It exposes model functionality over the internet.
Answer
service

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