Machine Learning Algorithms Summative 1 (M1, M2(PT1)) Flashcards

1
Q

Movie ratings, Military rank are samples of:
Group of answer choices

Discrete data

Ordinal data

Continuous data

Nominal data

A

Nominal data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Choose all the most popular Python Libraries that are used in data science.
Group of answer choices

NUMPY

ANACONDA

SCIPY

JUPYTER

PANDAS

SQL

A

NUMPY

SCIPY

JUPYTER

PANDAS

ANACONDA

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Which processes are involved in data preparation?
Group of answer choices

Not in the options

All the given options

Data Cleaning, Feature Engineering

Splitting of dataset

Data collection, Data Cleaning

A

All the given options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

A continuous data is:
Group of answer choices

Qualitative

Quantitative

A

Quantitative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Temperature range is a sample of:
Group of answer choices

Discrete data

Continuous data

A

Continuous data

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Sorting out missing data is a data cleansing technique.
Group of answer choices

True

False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Based on the ML application table scenario, when rule complexity is simple and problem scale is large, ML application is:
Group of answer choices

ML Algorithms

Simple Prolem

Manual Rules

Rule-based Algorithms

A

Rule-based Algorithms

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Machine Learning is a field of study concerned with giving computers the ability to ________ without being explicitly programmed.

A

LEARN

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

A nominal data is:
Group of answer choices

Quantitative

Qualitative

A

Qualitative

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Which is not true about Machine Learning?
Group of answer choices

Their maintenance is much lower than a human’s and costs a lot less in the long run.

Enable computers to operate autonomously with explicit programming.

Machines driven by algorithms designed by humans are able to learn latent rules and inherent patterns and to fulfill tasks desired by humans.

Automation by machine learning can mitigate risks caused by fatigue or inattention.

A

Enable computers to operate autonomously with explicit programming.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Reducing noise in data is a feature engineering technique.
Group of answer choices

True

False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Rule-based algorithms: Condition

Machine Learning: _________.

A

MODEL

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

ML is a research field at the intersection of _________, artificial intelligence, and computer science.

A

STATISTICS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

Data reduction is a data cleansing technique.
Group of answer choices

True

False

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

In EDA, this process identifies unusual data points. __________

A

OUTLIER DETECTION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

Dataset is divided into _______ set and test set.

A

TRAINING

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
17
Q

These concepts helps to understand how well a model performs: Overfitting, Underfitting, _________.

A

GENERALIZATION

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
18
Q

Logistic Regression is an example of a regression algorithm.

A

False

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
19
Q

This refers to the error resulting from sensitivity to the noise in the training data.
Group of answer choices

Not in the options

Overfitting

Underfitting

Generalization

A

Not in the options

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
20
Q

In supervised learning, market trend analysis is an example of:
Group of answer choices

Classification

Correlation

Prediction

Regression

A

Regression

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
21
Q

When the model fits too closely to the training dataset.
Group of answer choices

Overfitting

Underfitting

Generalization

A

Generalization sabi ni canvas pero overfitting talaga

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
22
Q

The _____ refers to the error from having wrong / too simple assumptions in the learning algorithm.

A

BIAS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
23
Q

Classification algorithms address classification problems where the output variable is categorical.
Group of answer choices

True

False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
24
Q

There is a regression variant of the k-nearest neighbors algorithm.
Group of answer choices

True

False

A

True

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
25
In k-NN, High Model Complexity is: Group of answer choices Overfitting Underfitting
Overfitting
26
The ‘k’ in k-Nearest neighbors refers to the new closest data point. Group of answer choices True False
False
27
K-nearest neighbors make a prediction for a new data point by finding the data that match from the training dataset. Group of answer choices True False
False
28
In k-NN, High Model Complexity is underfitting. Group of answer choices True False
False
29
In k-NN, Euclidean distance (by default) is used to choose the right distance measure. Group of answer choices True False
True
30
In k-NN, Low Model Complexity is: Group of answer choices Overfitting Underfitting
Underfitting
31
Linear models make a prediction using a linear function of the input features. Group of answer choices True False
True
32
Linear Regression is also known as Ordinal Least Squares. Group of answer choices True False
TRUE
33
The ________ is the sum of the squared differences between the predictions and the true values. Group of answer choices Mean error Median error Total R Mean Squared Error Not in the options
Mean Squared Error
34
The ‘offset’ parameter is also called slope. Group of answer choices True False
False
35
Lasso uses L1 Regularization. Group of answer choices True False
True
36
n Ridge regression is α (alpha) is lesser, the penalty becomes larger. Group of answer choices True False
False
37
Dichotomous classes means Yes or No. Group of answer choices True False
True
38
Its primary objective is to map the input variable with the output variable. Group of answer choices Unsupervised Learning Classification Correlation Supervised Learning
Supervised Learning
39
In k-NN, when you choose a small value of k (e.g., k=1), the model becomes more complex. Group of answer choices True False
True
40
Ridge is generally preferred over Lasso, but if you want a model that is easy to analyze and understand then use Lasso. Group of answer choices True False
True
41
When comparing training set and test set scores, we find that we predict very accurately on the training set, but the R2 on the test set is much worse. This is a sign of: Group of answer choices Underfitting Overfitting
Overfitting
42
Ridge regression is a linear regression model that controls complexity to avoid overfitting. Group of answer choices True False
True
43
The two phases of supervised ML process: Training, ________.
VALIDATION / TESTING? / PREDICTING?
44
is about extracting knowledge from data
Machine Learning
45
It is a research field at the intersection of statistics, artificial intelligence, and computer science and is also known as predictive analytics or statistical learning
Machine Learning
46
A field of study concerned with giving computers the ability to learn without being explicitly programmed
Machine Learning
47
is a discipline of artificial intelligence (AI) that provides machines with the ability to automatically learn from data and past experiences while identifying patterns to make predictions with minimal human intervention
Machine Learning (ML)
48
Machine Learning (ML) is a discipline of _____ that provides machines with the ability to automatically learn from data and past experiences while identifying patterns to make predictions with minimal human intervention
artificial intelligence (AI)
49
is a study of learning algorithms. A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E
Machine learning (including deep learning)
50
Collection, preparation, and analysis of data
Data Science
51
Leverages AI/ML, research, industry expertise, and statistics to make business decisions
Data Science
52
Technology for machines to understand/interpret, learn, and make ‘intelligent’ decisions. Includes Machine Learning among many other fields
Artificial Intelligence
53
Algorithms that help machines improve through supervised, unsupervised, and reinforcement learning
Machine Learning
54
Subset of AI and Data Science tool
Machine Learning
55
Explicit programming is used to solve problems Rules can be manually specified
Rule-based algorithms
56
Samples are used for training The decision-making rules are complex or difficult to describe Rules are automatically learned by machines
Machine Learning
57
Small Scale Simple Rule Complexity
Simple Problems
58
Large Scale Simple Rule Complexity
Rule-based algorithms
59
Small Scale Complex Rule Complexity
Manual Rules
60
Large Scale Complex Rule Complexity
Machine Learning Algorithms
61
enable computers to operate autonomously without explicit programming. ML application are fed with new data, and they can independently learn, grow, develop, and adapt
Machine learning methods
62
adaptively improves with an increase in the number of available samples during the ‘learning’ process
performance of ML algorithms
63
______ can work 24/7 and don’t get tired, need breaks, call in sick, or go on strike
Computers and robots
64
Machines driven by algorithms designed by humans are able to learn ______ and ______ and to fulfill tasks desired by humans
latent rules, inherent patterns
65
______ are better suited than humans for tasks that are routine, repetitive, or tedious
Learning machines
66
______ can mitigate risks caused by fatigue or inattention
automation by machine learning
67
Types of Machine Learning
Supervised Machine Learning Unsupervised Machine Learning Semi-Supervised Learning Reinforcement Learning
68
a collection of data used in machine learning tasks. Each data record is called a sample
Dataset
69
Events or attributes that reflect the performance or nature of a sample in a particular aspect are called ______
features
70
dataset used in the training process, where each sample is referred to as a training sample.
Training set
71
The process of creating a model from data is called _____
learning (training).
72
Testing refers to the process of using the model obtained after learning for prediction.
Test set
73
The dataset used is called a _____, and each sample is called a _____
test set, test sample
74
(1) Project Setup
Understand the business goals Choose the solution to your problem.
75
Speak with your stakeholders and deeply understand the business goal behind the model being proposed. A deep understanding of your business goals will help you scope the necessary technical solution, data sources to be collected, how to evaluate model performance, and more
Understand the business goals
76
Once you have a deep understanding of your problem - focus on which category of models drives the highest impact.
Choose the solution to your problem.
77
(2) Data Preparation
Data Collection Data Cleaning Feature Engineering Split the data
78
Collect all the data you need for your models, whether from your own organization, public, or paid sources
Data Collection
79
Turn the messy raw data into clean, tidy data ready for analysis.
Data Cleaning
80
Manipulate the datasets to create variables (features) that improve your model’s prediction accuracy. Create the same features in both the training set and the testing set
Feature Engineering
81
Randomly divide the records in the dataset into a training set and a testing set. For a more reliable assessment of model performance, generate multiple training and testing sets using cross-validation
Split the data
82
(3) Modeling
Hyperparameter tuning Train your models Make predictions Assess model performance
83
For each model, use ______ using techniques to improve model performance.
Hyperparameter tuning
84
Fit each model to the training set
Train your models
85
Make predictions on the testing set
Make predictions
86
For each model, calculate performance metrics on the testing set such as accuracy, recall, and precision
Assess model performance
87
(4) Deployment
Deploy the model Monitor model performance Improve your model
88
Embed the model you choose in dashboards, applications, or wherever you need it
Deploy the model
89
Regularly test the performance of your model as your data changes to avoid model drift
Monitor model performance
90
Continuously iterate and improve your model post-deployment. Replace your model with an updated version to improve performance
Improve your model
91
Phase 1: Learning
Preprocessing Learning Testing
92
Preprocessing:
Clean Data Format Data
93
Learning:
Supervised Unsupervised Reinforcement
94
Testing:
Measure Performance Test Algorithm
95
Phase 2: Prediction
New Data + Trained Model = Prediction -> Predicted Data
96
Machine Learning Languages
Python R C++
97
Big Data Tools
MemSQL Apache Spark
98
General Machine Learning Frameworks
Numpy Scikit-learn NLTK
99
Data Analysis & Visualization Tools
Pandas Matplotlib Jupyter Notebook Weka Tableau
100
Macine Learning Frameworks for Natural Network Modeling
Pytorch Kenas Caffe 2 Tensorflow & Tensorboard
101
Top Programming Languages for ML
Python R Java Julia Scala C++ JavaScript Lisp Haskell Go
102
Why Python?
Easy-to-Read Syntax Extensive Libraries and Frameworks Strong Community Support Flexibility Compatibility with Other Languages Scalability and Performance
103
Most popular ______ that are used in data analysis, data science, machine learning (ML), artificial intelligence (AI), natural language processing (NLP), deep learning, and by data scientists:
Python libraries
104
Top 10 Python Libraries
Pandas Matplotlib Tensorflow SciPy Scrapy NumPy SeaBorn Keras Pytorch SQLModel
105
A very popular tool and the most prominent Python library for ML
Scikit-learn
106
is one of the fundamental packages for scientific computing
Numpy
107
is a collection of functions for scientific computing
Scipy
108
is the primary scientific plotting library
Matplotlib
109
is a library for data wrangling and analysis
Pandas
110
A Python distribution made for large-scale data processing, predictive analysis, and scientific computing
Anaconda
111
is an interactive environment for running code in the browser
Jupyter Notebook
112
Applications of Machine Learning
Manufacturing Healthcare E-commerce Automobile Insurance Transportation
113
credit scoring, algorithmic trading
Computational finance
114
facial recognition, motion tracking, object detection
Computer vision
115
DNA sequencing, brain tumor detection, drug discovery
Computational biology
116
predictive maintenance
Automotive, aerospace, and manufacturing
117
voice recognition
Natural language processing
118
contains missing values or the data that lacks attributes
Incompleteness
119
contains incorrect records or exceptions.
Noise
120
contains inconsistent records
Inconsistency
121
Without good data, there is no
good model
122
is an observation that seems to be distant from other observations or, more specifically, one observation that follows a different logic or generative process than the other observations
Outlier
123
s the practice of cleaning, altering, and reorganizing raw data prior to processing and analysis, which is also known as data preparation
Preprocessing
124
Preprocessing - is the practice of cleaning, altering, and reorganizing raw data prior to processing and analysis, which is also known as ______
data preparation
125
It is an important step before processing to prepare, _____
prepare data for analysis and modeling by cleaning and transforming
126
Key steps in Data Preprocessing
Data Profiling Data Cleansing Data Reduction Data Transformation Data Enrichment Data Validation
127
Data Preprocessing Techniques
Data Cleansing Feature Engineering
128
Identify and sort out missing data Reduce noisy data Identify and remove duplicates
Data Cleansing
129
Involves techniques used by data scientists to organize the data in ways that make it more efficient to train data models and run inferences against them
Feature Engineering
130
Feature scaling of normalization Data reduction Discretization Feature encoding
Feature Engineering
131
To understand the main characteristics of the data, identify patterns to discover patterns, spot anomalies, test a hypothesis, or check assumptions
Exploratory Data Analysis (EDA)
132
Data Visualization Methods
Visualization Summary Statistics Outlier Detection Correlation Analysis
133
Creating plots and charts to visualize data distributions and relationships
Visualization
134
Calculating measures like mean, median, variance, and standard deviation.
Summary Statistics
135
Identifying unusual data points
Outlier Detection
136
Examining relationships between variables
Correlation Analysis
137
Testing initial assumptions about the data
Hypothesis Testing
138
are useful for visualizing the “count” of values in the data set
Bar plots and Histograms
139
Machine Learning Model Deployment
Training Validation Deployment Monitoring
140
refers to the process of taking a trained Ml model and making it available for use in real-world applications
Machine Learning Model Deployment
141
Before deployment, models need to be thoroughly trained and evaluated. This involves data preprocessing, feature engineering, and rigorous testing to ensure the model is robust and ready for real-world scenarios
Training
142
ML models should be able to handle increased loads and continue to deliver results efficiently. Ensuring the infrastructure can handle the model’s computational requirements is vital, requiring validation and effective testing for scalability before deploying models
Validation
143
Model deployment is the most crucial process of integrating the ML model into its production environment.
Deployment
144
Deployment process entails:
Defining how to extract or process the data in real time Determine the storage required for these processes Collection and predictions of model and data patterns Setting up APIs, tools, and other software environments to support and improve predictions Configuring the hardware (cloud or on-prem environments) to help support the ML model Creating a pipeline for continuous training and parameter tuning
145
This process is the most challenging, involving several moving pieces, tools, data scientists, and ML engineers to collaborate and strategize
Deployment
146
Once deployed, models need to be continuously _____
monitored.
147
Real world data can evolve, and models may drift in their performance.
Monitoring
148
Implementing ______ systems to help to detect deviations and make necessary adjustments in a timely manner
monitoring
149
Best Practices for Successful ML Model Deployment
Choosing the Right Infrastructure Effective Versioning and Tracking Robust Testing and Validation Implementing Monitoring and Alerting
150
covers the ethical and moral obligations of collecting, sharing, and using data, focused on ensuring that data is used fairly, for good
Data Ethics
151
5 Principles of Data Ethics
Ownership Transparency Privacy Intention Outcomes
152
the first principle of data ethics is that an individual has ownership over their personal information. Just as it’s considered stealing to take an item that doesn’t belong to you, it’s unlawful and unethical to collect someone’s personal data without their consent
Ownership
153
In addition to owning their personal information, data subjects have a right to know how you plan to collect, store, and use it. When gathering data, exercise ______
transparency
154
Another ethical responsibility that comes with handling data is ensuring data subjects’ _____. Even if a customer gives your company to collect, store, and analyze their personally identifiable information (PII)
privacy
155
Before collecting data, ask yourself why you need it, what you’ll gain from it, and what changes you’ll be able to make after analysis. If your intention is to hurt others, profit from your subjects’ weaknesses, or any other malicious goal, it’s not ethical to collect their data
Intention
156
even when intentions are good, the outcome of data analysis can cause inadvertent harm to individuals or groups of people.
Outcomes
157
the outcome of data analysis can cause inadvertent harm to individuals or groups of people. This is called a ______
disparate impact
158
Data Privacy Regulation (New Rules of Data)
Rule 1: Trust over Transactions Rule 2: Insight over Identity Rule 3: Flows over silos
159
This first rule is all about consent. Until now, companies have been gathering as much as data as possible on their current and prospective customers’ preferences, habits, and identities, transaction by transaction - often without customers understanding what is happening
Rule 1: Trust over Transactions
160
Firms need to re-think not only how they acquire data from their customers but from each other as well. Currently, companies routinely transfer large amounts of personal identifiable information (PII) through a complex web of data agreements, compromising both privacy and security
Rule 2: Insight over Identity
161
New organizing principle for internal data teams. Once all your customer data has meaningful consent and you are acquiring insight without transferring data, CIOs and CDOs no longer need to work in silos, with one trying to keep data locked up while the other is trying to break it out. Instead, CIOs and CDOs can work together to facilitate the flow of insights
Rule 3: Flows over silos
162
Data Subject Rights
Right to be Informed Right to Damages Right to Access Right to Erasure or Blocking Right to File a Complaint Right to Object Right to Rectify Right to Data Portability
163
is a set of principles and processes for data collection, management, and use. The goal is to ensure that data is accurate, consistent, and available for use, while protecting data privacy and security
Data Governance
164
is a set of policies, procedures, and standards that implements data governance for an organization.
Data Governance Framework
165
The Pillars of Data Governance
Ownership & Accountability Data Quality Data Protection & Safety Data use & Availability Data Management
166
10 Questions to Answer before using AI in Public Sector Algorithmic Decision Making
Objective Use Impacts Assumptions Data Inputs Mitigation Ethics Oversight Evaluation
167
why is the algorithm needed and what outcomes is it intended to enable
Objective
168
In what processes and circumstances is the algorithm appropriate to be used?
Use
169
what impacts - good and bad - could the use of the algorithm have on people?
Impacts
170
what assumptions is the algorithm based on and what are their limitations and potential biases?
Assumptions
171
what datasets is/was the algorithm trained on and what are their limitations and potential biases?
Data
172
what new data does the algorithm use when making decisions?
Inputs
173
what actions have been taken to mitigate the negative impacts that could result from the algorithm’s limitations and potential biases?
Mitigation
174
what assessments has been made of the ethics of using this algorithm?
Ethics
175
what human judgement is needed before acting on the algorithm’s output and who is responsible for ensuring its proper use?
Oversight
176
how, and by what criteria, will the effectiveness of the algorithm be assessed, and by whom?
Evaluation
177
Each example in the dataset is a pair consisting of an input object (such as a _____) and a desired output value (____).
feature vector, label
178
The primary objective of the supervised learning technique is to ______
map the input variable with the output variable
179
Supervised machine learning is further classified into two broad categories:
Regression Classification
180
Regression: target is a _____ variable
continuous
181
Regression Examples
Forecasting future stock price Forecasting energy resources Weather prediction Market trend analysis Predicting the environmental impact of pollutants
182
Classification: target is a ____ variable
categorical
183
Classification Examples
Classifying objects in images Classifying chest X-rays images into COVID positive/negative Handwritten digits recognition Filter Emails into spam or not Activity recognition for wearable devices
184
Refer to algorithms that address classification problems where the output variable is categorical; for example, yes or no, true or false, male or female.
Classification
185
Predicts one of the possible class labels
Classification
186
classification of two classes (yes/no, negative/positive, 0/1
Binary Classification
187
classification of three or more classes
Multiple Classification
188
Classification algorithms include:
Random Forest Algorithm Decision Tree Algorithm Logistics Regression Algorithm Support Vector Machine Algorithm
189
_____ algorithms handle _____ problems where input and output variables have a linear relationship
Regression
190
Regression algorithms include:
Simple Linear Regression Algorithm, Multivariate Regression Algorithm, Decision Tree Algorithm, and Lasso Regression
191
Same with any ML processes, the supervised ML has two phases: the usual ____ and _____, followed by _____
training validation prediction
192
the larger variety of data points your data set contains, the more complex a model you can use without ____
overfitting
193
how well a model performs:
Generalization Overfitting Underfitting
194
If a model is able to make accurate predictions on unseen data, we say it is able to _____ from the training set to the test set
generalize
195
Occurs when a model learns the training data too well, including its noise and outliers
Overfitting
196
occurs when you fit a model too closely to the particularities of the training set and obtain a model that works well on the training set but is not able to generalize to new data
Overfitting
197
performs exceptionally well on training data but poorly on new, unseen data because it has essentially memorized the training data rather than learning the underlying patterns
overfitted model
198
If your model is too simple then you might not be able to capture all the aspects and variability in the data, and your model will do badly even on the training set. Choosing too simple a model is called underfitting
underfitting
199
performs poorly on both training and new data because it hasn’t learned enough from the training data
underfitted
200
The more complex we allow our model to be, the better we will be able to predict on the training data
Model Complexity Curve
201
error from having wrong / too simple assumptions in the learning algorithm
Bias
202
error resulting from sensitivity to the noise / fluctuations in the training data
Variance
203
Low Bias and Low Variance = ?
Good Model
204
the k-NN algorithm is arguably the simplest machine learning algorithm.
k-Nearest Neighbors
205
Building the model consist only of storing the training dataset.
k-Nearest Neighbors
206
To make a prediction for a new data point, the algorithm finds the closest data points in the training dataset - its _______
“nearest neighbors”
207
in its simplest version, the k-NN algorithm only considers exactly one nearest neighbor, which is the closest training data point to the point we want to make a prediction for
k-Neighbors classification
208
Instead of considering only the closest neighbor, we can also consider an _______. This is where the name of the k-nearest neighbors algorithm comes from
arbitrary number, k, of neighbors
209
There is also a regression variant of the _____
k-nearest neighbors algorithm.
210
The k-nearest neighbors algorithm for regression is implemented in the KNeighbors Regressor class in scikit-learn. It’s used similarly to KNeighborsClassifier:
k-NN Estimator
211
_______, also known as the coefficient of determination, is a measure of goodness of a prediction for a regression model, and yields a score between 0 and 1.
The Square Score (R^2)
212
A value of 1 corresponds to the perfect prediction, and a value of 0 corresponds to a constant model that just predicts the mean of the training set responses, y_train:
The Square Score (R^2)
213
The regression model’s score() function returns the coefficient of determination R.
Estimation of the Regression Model
214
Perfect Prediction: target value == prediction -> numerator == denominator
R^2 = 1
215
Predicting the average degree of target value: numerator == denominator,
R^2 = 0
216
Predicting worse than the average can result in
negative numbers
217
Two important parameters to the KNeighbors classifier:
The number of neighbors how you measure distance between data points
218
By default, _____ is used to choose the right distance measure
Euclidean distance
219
Strengths/Advantages of KNN
Easy to understand Works well without any special adjustments Suitable as a first-time models
220
Weaknesses/Disadvantages of KNN
If the number of features or samples is large, the prediction is slow and data preprocessing is important. Does not work well with sparse datasets
221
enerate a formula to create a best-fit line to predict unknown values
Linear models
222
make a prediction using a linear function of the input features
Linear models
223
They are called _____ because they assume there is a ___ relationship between the outcome variable and each of its predictors
linear
224
several real-life scenarios follow linear relations between dependent and independent variables.
Application of Linear Models
225
Application of Linear Models Example
The relationship between the boiling point of water and change in altitude The relationship between spending on advertising and the revenue of an organization The relationship between the amount of fertilizer used and crop yields Performance of athletes and their training regimen
226
Types of Linear Models
Linear Regression Logistics Regression
227
The algorithm is used for solving regression problems
Linear Regression
228
Final output of the model is numeric value (numerical predictions).
Linear Regression
229
The algorithm maps a linear relationship between the input features(X) and the output (y)
Linear Regression
230
Linear model for classification problems
Logistics Regression
231
It generates a probability between 0 and 1. This happens by fitting a logistic function, also known as the sigmoid function.
Logistics Regression
232
Logistic Regression generates a probability between 0 and 1. This happens by fitting a logistic function, also known as the _____. The function first transforms the linear regression output between 0 and 1. After that, a predefined threshold helps to determine the probability of the output values
sigmoid function
233
is the simplest and most classic linear method for regression
Linear Regression (aka Ordinary Least Squares)
234
Linear regression finds the parameters w and b that minimize the _____ between predictions and the true regression targets, y, on the training set.
mean square error
235
The ______ is the sum of the squared differences between the predictions and the true values.
mean square error
236
The “slope”parameters (w), also called _______, are stored in the coef_attribute,
weights or coefficients
237
the offset or ______ is stored in the intercept_attribute:
intercept (b)
238
a model that allows us to control complexity. One of the most commonly used alternatives to standard linear regression is ____
ridge regression
239
is also a linear model for regression, so the formula is used to make predictions is the same one used for OLS
Ridge Regression
240
Each feature should have as little effect on the outcome as possible (which translates to having a small slope), while still predicting well. This constraints is an example of what is called ______
regularization.
241
Regularization means explicitly restricting a model to avoid _____
overfitting.
242
The particular kind of Regularization used by ridge regression is known as
L2 regularization
243
Ridge regression is implemented in ___ function.
linear_model
244
a higher alpha means a more restricted model, so we expect the entries of coef_ to have smaller magnitude for a high value of alpha than for a low value of alpha
Ridge Coef
245
a higher alpha means ______, so we expect the entries of coef_ to have smaller magnitude for a high value of alpha than for a low value of alpha
a more restricted model
246
plots that show model performance as a function of dataset size are called _____
learning curves
247
An alternative to Ridge for regularizing linear regression is _____
Lasso
248
As with ridge regression, using the lasso also restricts coefficients to be close to zero, but in a slightly different way, called _____
L1 regularization
249
The consequence of L1 is that when using lasso, some coefficients are exactly zero. This means some features are ______ by the model
entirely ignored
250
A ____ allowed us to fit a more complex model which worked better on the training and testing.
lower alpha
251
If only some of the many traits are considered important, ____
Lasso
252
When you want a model that is easy to analyze and understand, ___
Lasso