Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov
-
Upload
ruby-meditation -
Category
Technology
-
view
97 -
download
2
Transcript of Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov
![Page 1: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/1.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
What It Is And How It Works
Machine Learning
Volodymyr VorobiovSoftware Development Consultant at RubyGarage
![Page 2: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/2.jpg)
Machine learning is a subset of art i f ic ia l inte l l igence whose goal is to g ive computers the abi l i ty to teach themselves, whereas art i f ic ia l inte l l igence is a general concept of smart machines. In other words, art i f ic ia l inte l l igence is implemented through machine learning or - to be more precise - through machine learning a lgor i thms.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
artificialintelligence
TEACH YOUR COMPUTER
![Page 3: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/3.jpg)
EXAMPLES OF HOW MACHINE LEARNING IS USED IN THE REAL WORLD
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
- Facia l recognit ion - Voice recognit ion- Text recognit ion- Diagnost ics into medic ine, - Sel f-dr iv ing cars- Robots behavior adjustment- Ads target ing, - Predict ions in f inancia l t rading- Vir tual and augmented real i ty- Astronomy and space ???
![Page 4: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/4.jpg)
The 21st century is the age of data. I t ’s l i tera l ly everywhere. In fact , there has been an exponent ia l growth in the volume of data over the past decade; the tota l amount of data doubles every two years. Most of i t , however, isn’t used. Huge volumes of data can be tagged, structured, and analyzed, reveal ing a lot of valuable informat ion. Only machine learning a lgor i thms can easi ly cope with th is task.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
WHY THE FUTURE BELONGS TO MACHINE LEARNING
![Page 5: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/5.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
HOW MACHINE LEARNING WORKS
Preprocessing Learinng Evaluation Prediction
Labels
RawData
Labels
Labels
Final Model New DataTraining Dataset
Test Dataset
LearningAlgorithm
(putting data into the necessary shape)
(creating a model with the help of training data)
(model assessment using test data)
application of the model)
![Page 6: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/6.jpg)
TOOLS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
- Python - Pandas - Powerful data analysis l ibrary for Python Pandas is a powerful data analysis Python l ibrary that provides flexible and fast data structures for processing “relational” or “labeled” data. This is a fundamental data analysis toolkit in Python. - Scikit-learn - Machine Learning in Python These are simple and effective open-source tools for data mining and analysis. - Statsmodels This is a Python module providing functions and classes to estimate different statistical models as well as to conduct tests and explore statistical data. The Statsmodels module offers a comprehensive l ist of result statistics. - Matplotl ib Matplotl ib is a Python 2D plotting l ibrary that releases publication quality f igures in multiple formats and interactive environments in different platforms.
![Page 7: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/7.jpg)
The quality of the data and the amount of useful information that itcontains are key factors that determine how well a machine learning algorithm can learn. Therefore, it is absolutely crit ical that we makesure to examine and preprocess a dataset before we feed it to a learning algorithm.- Removing and imputing missing values from the dataset- Getting categorical data into shape for machine learning algorithms- Selecting relevant features for the model construction
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
DATA PREPROCESSING
![Page 8: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/8.jpg)
DATA PREPROCESSING DATASET PRESENTATION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Independent variables Dependent variables
![Page 9: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/9.jpg)
IMPORTING THE DATASET
![Page 10: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/10.jpg)
IMPORTING THE DATASET
![Page 11: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/11.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
DEALING WITH MISSING DATA
Most computat ional tools are unable to handle such missing values or would produce unpredictable results i f we s imply ignored them. Therefore, i t is crucia l that we take care of those missing values before we proceed with further analyses.
![Page 12: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/12.jpg)
- El iminating samples or features with missing valuesThe easiest solut ion to th is problem is s imply to remove samples with missing values f rom a dataset . However, th is seemingly handy approach has a number of drawbacks. For example, removing too many of such samples is l ike ly to compromise the qual i ty of the analys is .
- Imputing missing valuesThe solut ion is to use var ious interpolat ion techniques that help to “guess” the missing values f rom other samples in a dataset .
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
DEALING WITH MISSING DATA
![Page 13: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/13.jpg)
IMPUTING MISSING VALUES
![Page 14: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/14.jpg)
IMPUTING MISSING VALUES RESULTS
![Page 15: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/15.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
HANDLING CATEGORICAL DATA
![Page 16: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/16.jpg)
ENCODE LABELS
![Page 17: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/17.jpg)
ENCODE LABELS RESULTS
![Page 18: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/18.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
DUMMY VARIABLES
![Page 19: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/19.jpg)
DUMMY VARIABLES
![Page 20: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/20.jpg)
DUMMY VARIABLES RESULTS
![Page 21: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/21.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
DUMMY VARIABLE TRAP
![Page 22: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/22.jpg)
PARTITIONING A DATASET INTO TRAINING AND TEST SETS
![Page 23: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/23.jpg)
TRAINING AND TEST SETS RESULTS
![Page 24: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/24.jpg)
BRINGING FEATURES ONTO THE SAME SCALE
![Page 25: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/25.jpg)
SAME SCALE RESULTS
![Page 26: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/26.jpg)
TRAINING AND SELECTING A PREDICTIVE MODEL
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
- Supervised learning - Regression - Classi f icat ion
- Unsupervised learning - Cluster ing - Dimensional i ty Reduct ion
- Reinforcement Learning
- Associat ion Rule Learning
- Natural Language Processing
- Deep Learning
- Model Select ion
![Page 27: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/27.jpg)
SUPERVISED LEARNING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
For making predictions about the future
RegressionFor predict ing cont inuous outcomes
ClassificationFor predict ing c lass labels
![Page 28: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/28.jpg)
REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Regression models (both linear and non-linear) are used for predicting a real value,
like salary for example. If your independent variable is time,
then you are forecasting future values, otherwise your model is predicting
present but unknown values.
![Page 29: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/29.jpg)
SIMPLE LINEAR REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
y
x
Constant Coefficent
Dependent variable (DV) Independent variable (IV)
y = b + b*x 1 10
![Page 30: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/30.jpg)
DATASET PRESENTATION. EXPERIENCE AND SALARY.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 31: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/31.jpg)
SIMPLE LINEAR REGRESSION TRAINING
![Page 32: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/32.jpg)
SIMPLE LINEAR REGRESSION TRAINING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 33: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/33.jpg)
MULTIPLE LINEAR REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Constant Coefficent
Dependent variable (DV) Independent variable (IVs)
y = b + b*x + b*x ... + b*x1 1 2 2 n n0
![Page 34: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/34.jpg)
DATASET PRESENTATION. INVESTMENT FUND STATISTIC.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 35: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/35.jpg)
MULTIPLE LINEAR REGRESSION TRAINING
![Page 36: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/36.jpg)
EVALUATING REGRESSION MODELS PERFORMANCE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
1. All-in
2. Backward Elimination
3. Forward Selection
4. Bidirectional Elimination
5. Score Comparison
Stepwise
Regression
![Page 37: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/37.jpg)
BACKWARD ELIMINATION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
STEP 1: Select a significance level to stay in the model (e.g. SL = 0.05)
STEP 2: Fit the full model with all possible predictors
STEP 3: Consider the predictor with the highest P-value. If P > SL, go to STEP 4, otherwise go to FIN
STEP 4: Remove the predictor
STEP 5: Fit model without this variable*
![Page 38: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/38.jpg)
BACKWARD ELIMINATION TRAINING
![Page 39: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/39.jpg)
BACKWARD ELIMINATION TRAINING STEP 1
![Page 40: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/40.jpg)
BACKWARD ELIMINATION TRAINING STEP 4
![Page 41: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/41.jpg)
EVALUATING PERFORMANCE R-SQUARED
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
SUM (y - y^) -> min2
ii
Experience
Simple Linear Regression:Salary ($)
y i
y i
![Page 42: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/42.jpg)
EVALUATING PERFORMANCE R-SQUARED
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
SS = SUM (y - y^) 2
i ires
SS = SUM (y - y ) 2
i avgtot
y avg
Experience
Simple Linear Regression:Salary ($)
![Page 43: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/43.jpg)
EVALUATING PERFORMANCE ADJUSTED R-SQUARED
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
p - number of regressorsn - sample size
![Page 44: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/44.jpg)
ADJUSTED R-SQUARED STEP 3
![Page 45: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/45.jpg)
ADJUSTED R-SQUARED STEP 4
![Page 46: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/46.jpg)
ADJUSTED R-SQUARED STEP 5
![Page 47: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/47.jpg)
POLYNOMIAL REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
y
x
y = b + b x + b x1 1 2 12
0
![Page 48: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/48.jpg)
POLYNOMIAL REGRESSION. DATASET PRESENTATION.
BLUFFING DETECTOR
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 49: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/49.jpg)
POLYNOMIAL REGRESSION. FITTING THE DATASET
![Page 50: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/50.jpg)
POLYNOMIAL REGRESSION. TRAINING THE MODEL
![Page 51: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/51.jpg)
POLYNOMIAL REGRESSION RESULTS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 52: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/52.jpg)
SUPPORT VECTOR REGRESSION BASED ON SUPPORT VECTOR MACHINE
![Page 53: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/53.jpg)
SUPPORT VECTOR REGRESSION. RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 54: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/54.jpg)
WHAT IF
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
X1
X2
![Page 55: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/55.jpg)
DECISION TREE REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Split 4
Split 2
Split 1
Split 3200
20 40
170
X1
X2
1023
0.7-64.1300.5
65.7
Y
![Page 56: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/56.jpg)
DECISION
TREE REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
X < 20 1
X < 200 2
300.5 65.7 1023
-64.1 0.7
X < 1702
X < 401
yes no
yes no yes no
yes no
![Page 57: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/57.jpg)
DECISION TREE REGRESSION TRAINING
![Page 58: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/58.jpg)
DECISION TREE REGRESSION RESULT
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 59: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/59.jpg)
ENSEMBLE LEARNING. RANDOM FOREST REGRESSION.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
STEP 1: Pick at random K data points from the Training set.
STEP 2: Build the Decision Tree associated to these K data points.
STEP 3: Choose the number Ntree of trees you want to build and repeat STEPS 1 & 2
STEP 4: For a new data point, make each one of your Ntree trees predict the value of Y to for the data point in question, and assign the new data point the average across all of the predicted Y values.
![Page 60: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/60.jpg)
RANDOM FOREST REGRESSION TRAINING
![Page 61: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/61.jpg)
RANDOM FOREST REGRESSION RESULT
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 62: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/62.jpg)
REGRESSION MODELS. PROS AND CONS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 63: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/63.jpg)
CLASSIFICATION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Unlike regression where you predict a continuous number,
you use classification to predict a category.
There is a wide variety of classification applications from medicine to marketing.
![Page 64: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/64.jpg)
LOGISTIC REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
This is new:Action (Y/N)
Age
We know this:Salary ($)
Experience
y = b0 + b1*x
![Page 65: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/65.jpg)
LOGISTIC REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Action (Y/N) Action (Y/N)
Age Age
![Page 66: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/66.jpg)
LOGISTIC REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 67: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/67.jpg)
LOGISTIC REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 68: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/68.jpg)
LOGISTIC REGRESSION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 69: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/69.jpg)
LOGISTIC REGRESSION PREDICTION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 70: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/70.jpg)
DATASET PRESENTATION. SOCIAL NETWORK ADS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 71: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/71.jpg)
LOGISTIC REGRESSION. PREPROCESSING
![Page 72: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/72.jpg)
LOGISTIC REGRESSION. TRAINING
![Page 73: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/73.jpg)
LOGISTIC REGRESSION. TRAINING SET RESULTS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 74: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/74.jpg)
LOGISTIC REGRESSION. TEST SET RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 75: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/75.jpg)
K-NEAREST NEIGHBORS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 76: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/76.jpg)
K-NEAREST NEIGHBORS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
STEP 1: Choose the number K of neighbors
STEP 2: Take the K nearest neighbors of the new data point, according to the Euclidean distance
STEP 3: Among these K neighbors, count the number of data points in each category
STEP 4: Assign the new data point to the category where you counted the most neighbors
Your Model is Ready
![Page 77: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/77.jpg)
K-NEAREST NEIGHBORS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 78: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/78.jpg)
K-NEAREST NEIGHBORS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Category 1: 3 neighbors
Category 2: 2 neighbors
![Page 79: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/79.jpg)
K-NEAREST NEIGHBORS. TRAINING
![Page 80: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/80.jpg)
K-NEAREST NEIGHBORS. TRAINING SET RESULTS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 81: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/81.jpg)
K-NEAREST NEIGHBORS. TEST SET RESULTS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 82: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/82.jpg)
SUPPORT VECTOR MACHINES
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 83: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/83.jpg)
SUPPORT VECTOR MACHINES TRAINING
![Page 84: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/84.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
SUPPORT VECTOR MACHINES. TRAINING SET RESULTS.
![Page 85: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/85.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
SUPPORT VECTOR MACHINES. TEST SET RESULTS.
![Page 86: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/86.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 87: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/87.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 88: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/88.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 89: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/89.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 90: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/90.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 91: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/91.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 92: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/92.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 93: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/93.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
KERNEL SVM
![Page 94: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/94.jpg)
KERNEL SVM TRAINING
![Page 95: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/95.jpg)
NAIVE BAYES. TRAINING SET RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 96: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/96.jpg)
NAIVE BAYES. TEST SET RESULTS.
RUBY
GAR
AGE
201
7
TECH
NO
LOG
Y MATTERS
![Page 97: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/97.jpg)
NAIVE BAYES
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Bayes Theorem
![Page 98: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/98.jpg)
DRIVER OR WAALKER.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 99: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/99.jpg)
NAIVE BAYES. BAYES THEOREM. WALKS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 100: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/100.jpg)
NAIVE BAYES. BAYES THEOREM. DRIVES.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 101: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/101.jpg)
NAIVE BAYES. P(WALKS).
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 102: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/102.jpg)
NAIVE BAYES. P(X).
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 103: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/103.jpg)
NAIVE BAYES. P(X|WALKS).
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 104: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/104.jpg)
NAIVE BAYES. P(WALKS|X).
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 105: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/105.jpg)
NAIVE BAYES. P(DRIVES|X).
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 106: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/106.jpg)
NAIVE BAYES
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 107: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/107.jpg)
NAIVE BAYES. NEW WALKER.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 108: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/108.jpg)
NAIVE BAYES. TRAINING.
![Page 109: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/109.jpg)
NAIVE BAYES. TRAINING SET RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 110: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/110.jpg)
NAIVE BAYES. TEST SET RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 111: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/111.jpg)
DECISION TREE CLASSIFICATION
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 112: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/112.jpg)
DECISION TREE CLASSIFICATION. TRAINING.
![Page 113: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/113.jpg)
DECISION TREE CLASSIFICATION. TRAINING SET RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 114: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/114.jpg)
DECISION TREE CLASSIFICATION. TEST SET RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 115: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/115.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
RANDOM FOREST CLASSIFICATION
STEP 1: Pick at random K data points from the Training set.
STEP 2: Build the Decision Tree associated to these K data points.
STEP 3: Choose the number Ntree of trees you want to build and repeat STEPS 1 & 2
STEP 4: For a new data point, make each one of your Ntree trees predict the category towhich the data point belongs, and assign the new data point to the category that winsthe majority vote.
![Page 116: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/116.jpg)
RANDOM FOREST CLASSIFICATION. TRAINING
![Page 117: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/117.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
RANDOM FOREST CLASSIFICATION. TRAINING SET RESULTS
![Page 118: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/118.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
RANDOM FOREST CLASSIFICATION. TEST SET RESULTS.
![Page 119: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/119.jpg)
EVALUATING CLASSIFICATION MODELS PERFORMANCE.FALSE POSITIVES & FALSE NEGATIVES.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 120: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/120.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
EVALUATING CLASSIFICATION MODELS PERFORMANCE.CONFUSION MATRIX.
![Page 121: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/121.jpg)
CLASSIFICATION MODELS. PROS AND CONS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 122: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/122.jpg)
CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Clustering is similar to classi�cation, but the basis is di�erent. In Clustering you don’t know what you are looking for, and you are trying to identify some segments or clusters in your data. When you use clustering algorithms on your dataset, unexpected things can suddenly pop up like structures, clusters and groupings you would have never thought of otherwise.
![Page 123: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/123.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 124: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/124.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
STEP 1: Choose the number K of clusters
STEP 2: Select at random K points, the centroids (not necessarily from your dataset)
STEP 3: Assign each data point to the closest centroid -> That forms K clusters
STEP 4: Compute and place the new centroid of each cluster
STEP 5: Reassign each data point to the new closest centroid. If any reassignment took place, go to STEP 4, otherwise go to FIN.
Your Model is Ready
![Page 125: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/125.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
K-MEANS CLUSTERING
![Page 126: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/126.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
K-MEANS CLUSTERING
![Page 127: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/127.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 128: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/128.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 129: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/129.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 130: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/130.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 131: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/131.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 132: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/132.jpg)
K-MEANS CLUSTERING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 133: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/133.jpg)
K-MEANS CLUSTERING RANDOM INITIALIZATION PROBLEM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 134: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/134.jpg)
K-MEANS CLUSTERING RANDOM INITIALIZATION PROBLEM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 135: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/135.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
K-MEANS CLUSTERING RANDOM INITIALIZATION PROBLEM
![Page 136: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/136.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
K-MEANS CLUSTERING RANDOM INITIALIZATION PROBLEM
![Page 137: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/137.jpg)
K-MEANS SELECTING THE NUMBER OF CLUSTERS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 138: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/138.jpg)
K-MEANS SELECTING THE NUMBER OF CLUSTERS
RUBY
GAR
AGE
201
7
TECH
NO
LOG
Y MATTERS
![Page 139: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/139.jpg)
DATASET PRESENTATION. MALL CUSTOMERS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 140: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/140.jpg)
K-MEANS. TRAINING. OPTIMAL NUMBER OF CLUSTERS.
![Page 141: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/141.jpg)
K-MEANS. OPTIMAL NUMBER OF CLUSTERS RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 142: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/142.jpg)
K-MEANS TRAINING
![Page 143: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/143.jpg)
K-MEANS. RESULT
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 144: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/144.jpg)
HIERARCHICAL CLUSTERING
RUBY
GAR
AGE
201
7
TECH
NO
LOG
Y MATTERS
![Page 145: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/145.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
HIERARCHICAL CLUSTERING AGGLOMERATIVE
STEP 1: Make each data point a single-point cluster That forms N clusters
STEP 2: Take the two closest data points and make them one cluster That forms N-1 clusters
STEP 3: Take the two closest clusters and make them one cluster That forms N-2 clusters
STEP 4: Repeat STEP 3 until there is only one cluster
FIN
![Page 146: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/146.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 147: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/147.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 148: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/148.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 149: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/149.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 150: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/150.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 151: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/151.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 152: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/152.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 153: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/153.jpg)
HIERARCHICAL CLUSTERING AGGLOMERATIVE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 154: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/154.jpg)
HIERARCHICAL CLUSTERING DENDROGRAMS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 155: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/155.jpg)
HIERARCHICAL CLUSTERING DENDROGRAMS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 156: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/156.jpg)
HIERARCHICAL CLUSTERING DENDROGRAMS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 157: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/157.jpg)
HIERARCHICAL CLUSTERING DENDROGRAMS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 158: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/158.jpg)
HIERARCHICAL CLUSTERING DENDROGRAMS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
4 clusters
![Page 159: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/159.jpg)
DENDROGRAMS OPTIMAL NUMBER OF CLUSTERS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 160: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/160.jpg)
DENDROGRAMS OPTIMAL NUMBER OF CLUSTERS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 161: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/161.jpg)
DENDROGRAM. FINDING THE OPTIMAL NUMBER OF CLUSTERS.
![Page 162: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/162.jpg)
DENDROGRAM. RESULTS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 163: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/163.jpg)
HIERARCHICAL CLUSTERING. TRAINING.
![Page 164: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/164.jpg)
HIERARCHICAL CLUSTERING RESULT
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 165: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/165.jpg)
CLUSTERING MODELS. PROS AND CONS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 166: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/166.jpg)
REINFORCEMENT LEARNING
Reinforcement Learning is a branch of Machine Learning, also called Online Learning. It is used to solve interacting problems where the data observed up to time t is consideredto decide which action to take at time t + 1.
It is also used for Arti�cial Intelligence when training machines to performtasks such as walking. Desired outcomes provide the AI with reward,undesired with punishment. Machines learn through trial and error.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 167: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/167.jpg)
THE MULTI-ARMED BANDIT PROBLEMHot to bet to maximize your return
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 168: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/168.jpg)
THE MULTI-ARMED BANDIT PROBLEM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 169: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/169.jpg)
THE MULTI-ARMED BANDIT PROBLEM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 170: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/170.jpg)
UPPER CONFIDENCE BOUND ALGORITHM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 171: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/171.jpg)
UPPER CONFIDENCE BOUND ALGORITHM
RUBY
GAR
AGE
201
7
TECH
NO
LOG
Y MATTERS
![Page 172: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/172.jpg)
UPPER CONFIDENCE BOUND ALGORITHM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 173: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/173.jpg)
UPPER CONFIDENCE BOUND ALGORITHM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 174: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/174.jpg)
UPPER CONFIDENCE BOUND ALGORITHM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 175: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/175.jpg)
UPPER CONFIDENCE BOUND ALGORITHM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 176: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/176.jpg)
UPPER CONFIDENCE BOUND ALGORITHM
RUBY
GAR
AGE
201
7
TECH
NO
LOG
Y MATTERS
![Page 177: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/177.jpg)
RANDOM SELECTION
![Page 178: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/178.jpg)
RANDOM SELECTION. RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 179: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/179.jpg)
UPPER CONFIDENCE BOUND. TRAINING.
![Page 180: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/180.jpg)
UPPER CONFIDENCE BOUND. RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 181: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/181.jpg)
THOMPSON SAMPLING ALGORITHM
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 182: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/182.jpg)
BAYESIAN INFERENCE
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 183: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/183.jpg)
BAYESIAN INFERENCE. EXPLANATION.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 184: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/184.jpg)
CREATING DISTRIBUTION BASED ON AN INITIAL DATA
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 185: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/185.jpg)
PULLING RANDOM VALUES FROM DISTRIBUTIONS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 186: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/186.jpg)
ADJUSTING THE PERCEPTION OF THE WORLD
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 187: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/187.jpg)
THE FINAL MODEL
RUBY
GAR
AGE
201
761
TECH
NO
LOG
Y MATTERS
![Page 188: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/188.jpg)
UCB VS THOMPSON SAMPLING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 189: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/189.jpg)
THOMPSON SAMPLING ALGORITHM. TRAINING.
![Page 190: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/190.jpg)
THOMPSON SAMPLING ALGORITHM. RESULTS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 191: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/191.jpg)
NATURAL LANGUAGE PROCESSING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Natural Language Processing (or NLP) is applying Machine Learningmodels to text and language.Teaching machines to understand what is said in spokenand written word is the focus of Natural.
![Page 192: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/192.jpg)
NATURAL LANGUAGE PROCESSING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Natural Language Processing (or NLP) is applying Machine Learningmodels to text and language.Teaching machines to understand what is said in spokenand written word is the focus of Natural.
![Page 193: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/193.jpg)
NATURAL LANGUAGE PROCESSING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
Language Processing.Whenever you dictate something into your iPhone / Android devicethat is then converted to text, that’s an NLP algorithm in action.
![Page 194: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/194.jpg)
NATURAL LANGUAGE PROCESSING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
You can use NLP on an article to predict somecategories of the articles you are trying to segment.You can use NLP on a book to predict the genre of the book.
![Page 195: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/195.jpg)
NATURAL LANGUAGE PROCESSING
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
A very well-known model in NLP is the Bag of Words model.It is a model used to preprocess the texts to classify before�tting the classi�cation algorithms on the observationscontaining the texts.
![Page 196: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/196.jpg)
DATASET PRESENTATION. RESTAURANT REVIEWS.
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 197: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/197.jpg)
NLP. TRAINING. IMPORTING THE DATASET AND CLEANING THE TEXTS.
![Page 198: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/198.jpg)
NLP. TRAINING. CLEANING THE TEXTS. RESULTS.
![Page 199: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/199.jpg)
NLP. TRAINING. CREATING THE BAG OF WORDS MODEL.
![Page 200: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/200.jpg)
NLP. CREATING THE BAG OF WORDS MODEL.
![Page 201: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/201.jpg)
NLP. TRAINING. SPLITTING THE DATASET INTO THE TRAINING SET AND TEST SET.
![Page 202: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/202.jpg)
NLP. TRAINING. FITTING NAIVE BAYES TO THE TRAINING SET.
![Page 203: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/203.jpg)
NLP. TRAINING. PREDICTING AND MAKING THE CONFUSION MATRIX.
![Page 204: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/204.jpg)
NLP. CONFUSION MATRIX. RESULTS.
![Page 205: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/205.jpg)
THE NEURON
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 206: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/206.jpg)
HOW DO NEURAL NETWORKS LEARN?
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 207: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/207.jpg)
NEURAL NETWORKS
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
![Page 208: Machine Learning as a Daily Work for a Programmer- Volodymyr Vorobiov](https://reader038.fdocuments.in/reader038/viewer/2022110109/5a6479267f8b9a6a568b4641/html5/thumbnails/208.jpg)
RUBY
GAR
AGE
201
7TEC
HN
OLO
GY M
ATTERS
TO BE CONTINUED