SlideShare une entreprise Scribd logo
1  sur  5
Télécharger pour lire hors ligne
First Course on Supervised Learning for Practitioners
Raman Kannan
Chapter 1: Course Overview
The three basic questions one should ask to learn anything
what is Machine Learning (ML)?
Why ML?
how ML -- doing starts here
What is ML?
Machine Learning is a particular approach to making sense out of data. ML is vastly different from
traditional programming where you construct sequence of statements which are coded to process data
in a particular format. When we write software using traditional programming methods, the application
you write, cannot and will never do anything you did not explicitly code for. ML is different in that
regard. ML will learn from all the data it has seen and learn as it goes along and is able to infer when
some new (never seen before data) is presented.
Act of forming general principles from particulars is known as generalization or inductive
reasoning. In classification, ML algorithms observe given instances (particulars) and make inferences
about scenarios never seen before.
ML applications perform a given task better with more data (or with experience)
because ML programs identify patterns and show signs of leveraging such patterns just as a mammalian
brain does. Therefore, in summary, classification is about generalization aka inductive reasoning.
Why ML?
We cannot be writing traditional software given the deluge of data. We need a technique which can
learn from data and process data without a programmer anticipating and coding everything in a piece of
code. Such a goal would be futile. We need a new approach.
Why now?
ML is an ancient discipline since 1959 --Arthur Samuelson coined this terminology ML-- but it nearly
faded away (1) in the 80s, because it required a lot of data (2) significant computational power, and (3)
Only DoD and other major gov agencies and large coporations could finance such
projects. In contrast, the human brain learns in real-time, 24x7 for 15 to 20 years, with a capacity to
store 4.7 billion books or 670 million web pages [1], before it is useful at all.
Now with the advent of internet, we have more data -- and a smartphone has more computing power --
computing capacity is cheap -- due to vastly improved communication (sharing,disseminating)
capabilities, cloud, hw/sw improvements
-and therefore- (1) and (2) are not valid anymore. Even small firms with modest resources can now
undertake M/L initiatives --
(3) is not valid anymore because we have IBM, Google, FB,MSFT,AMZN and other such companies
that can undertake such projects. DoD is not the only game in town, Elon Musk, Jeff Bezos are also in
town and they dont know idling.
M/L is popular and in demand now. There is a prevalence of practitioners labeling everything as M/L or
some-sort of learning whether or not there is any learning. Machine Learning started off as a discipline
of Artificial Intelligence, better known as AI. There is a tendency to find a way to label a solution as an
AI Solution, when there is no basis for such a label. Both AI and ML are valuable and powerful body of
knowledge and there is no need to fall into a hype vortex which can only fizzle out with
disenchantment.
In these essays we will avoid doing such things. We will focus on classical machine learning and
exclude NLP, Deep Learning (DL) and Neural Nets. They are important and DL can do what we can
do, sometimes better and faster. But we cannot learn anything as we will not know why it did what it
did. They are indistinguishable from astrology or magic. A non-trivial DL solution cannot be easily
explained. Notwithstanding, these topics, NLP and DL deserve a full length semester long study.
Now, then, learning can be achieved in many different ways and accordingly,
there are three main branches of learning in ML
-- supervised learning (aka classification)
-- unsupervised learning (aka clustering)
-- reinforcement learning
Learning generally involved perceiving the essence beyond what is evident in perceptible dimensions,
mostly 3D. Beyond 3D, it is twister and many problems are beyond 3D -- in that sense dimensionality
reduction techniques can also be considered as a major field of ML.
Better claim is that M/L draws from other mature subjects including linear algebra, calculus, statistics,
information retrieval and optimization.
We will focus entirely on classical supervised learning techniques.
What is Classification?
In classification, we are given a set of observations in the form of records. Each observation is
composed of set of features and a class variable. ML algorithms learn hidden patterns in the given
dataset, and learn to associate a class given feature vector. In ML, therefore, features are independent
variables (IV) and the class variable is the dependent variable (DV). There is almost always more than
one IV (multi-variate) and exactly one dependent variable (DV).
In summary, “Machine Learning is the science of getting computers to learn and act like humans do,
and improve their learning over time in autonomous fashion, by feeding them data and information in
the form of observations and real-world interactions.” [2]
In supervised learning we seek to find a function or a method to determine the class (DV) given the
features (IV).
Classification algorithms seek to find a function f, such that,
DV = f(IV)
Thus, we can abstract the supervised learning in terms of predictor variables (IV) and output variable
(DV).
Predictor variables are also known as
independent variables,
regressors,
features,
covariates,
input variables.
Predictors can be numerical (height,weight,salary) or categorical ( gender, color )
Output variables are also known as
class variable,
dependent variable or
class labels.
When the output variable is quantitative, -- we use regression techniques (OLS).
When the output variable is qualitative (ordinal,nominal) -- it is called classification.
The scope of this course are Classification techniques -aka- Supervised Learning.
As an academic in my research, I am interested in fundamental improvements to classification,
applications of classification, in particular understanding text corpus -- NLP.
There are many classification methods:
-- probabilistic methods, considering entire dataset, properties of individuals are not a significant factor
-- instance based methods -- individual properties are all that matters -- distance based how similar are
two objects
-- logic based decision making -- extract rules to classify
-- topological methods
Examples of probabilistic methods:
Logistic Regression
Fishers Discriminant Analysis (LDA,QDA, etc)
Naive Bayes
Example of instance based classification:
kNN -- nearest neighbor
Example of Logic Based classification:
Decision Tree
topological methods
Support Vector Machines (SVM) -- (kernel methods)
These are individual learners. Individual learners, having seen a particular
set of observations, are subject to the bias and variability in the inferences they make.
Therefore, one can seek to improve by combining them.
One fundamental method to improve anything is the
Iterative method -- do something, find out where it went wrong (what makes it inefficient), optimize
(compensate) and repeat until no further improvements can be made or a target performance has been
achieved.
Practitioners refer to this technique as boosting.
batch method -- learn from several subsets of data and average them -- aka bagging
ensemble method -- in bagging all features are considered -- what if we learn using different features
and average them -- when we apply this to Decision tree -- we get random forest
stacking -- all three combination methods above, perturb a single kind of learner. Therefore, we could
imagine combining learners of different kinds (probabilistic, logic-based, instance based and
topological learners) and such a method is called stacking.
First Task, Mind your data.
Avoid GIGO. Quality data has the potential to result in quality analysis. Without quality nothing of
value can be harnessed. Data Quality is paramount. Inappropriate use, results in useless inferences.
Therefore, we must seek to understand data at a deeper level
-- relating to data
-- how many features
-- are all features equally important
-- are they collinear or correlated with each other,
-- are they correlated with the outcome variable
-- how many classes
-- binary or multiple
-- imbalanced dataset some classes are rare and under-represented
-- Splitting data into training and testing
-- reproducibility and repeatability
-- scale effects -- some features have wider range, exhibit much different dispersion,
-- requires standardization either scaling or normalization
-- curse of dimensionality (merely mentioned here)
-- a dataset is a 2-D matrix,
-- columns as features (length, width, color, blood type ) and
-- observations as rows.
-- we are mostly dealing with rectangular matrices in machine learning
-- dimensionality reduction using well known linear algebra techniques
Principal Component Analysis (aka in physics Eigen Value Decomposition),
Cholesky (positive definitive matrices) and
SVD (rectangular matrices)
-- how to interpret the model output in a transformed coordinate space back
in the real world in which the business operates.
All these perspectives and considerations are all very important to gain the most out of M/L or A/I.
Classifier Performance
-- relating to performance
-- metrics to assess performance of a supervised learner
-- classifiers
-- true positives, true negatives -- model is consistent with the reality
-- false positive -- models says it is positive but in reality that observation is negative
-- false negative -- model says it is negative but in reality that observation is positive
-- accuracy, sensitivity, specificity, recall, precision and F1
-- RoC curves and Area Under the Curve (AUC)
-- Null deviance and residual deviance
-- regression
-- R-squared, adjusted R-squared, RMSe
-- F-statistic, AIC,BIC
-- irreducible error, bayes factor
-- theoretical bound on the smallest error
-- source of errors
-- inability to estimate population parameters given a sample
-- bias and underfitting
-- sample is NOT representative of the population
-- simpler models are more prone to bias
-- we have observed 44 presidents all of whom happen to be males
-- that is a biased sample not good for making sound inference
-- all were caucasian ancestory until Obama
-- under-fitting occurs where the algorithm is unable to learn
-- if the model is unable to achieve 65% accuracy during training phase,
one may conclude the model is unable to learn
-- variance and overfitting
-- due to the variability in the measuring or observation methods
-- both variance and bias cannot be simultaneously reduced
-- Variance/Bias manifest as over-fitting/under-fitting respectively
-- that is, when a learner is unable to classify correctly even when it has seen the data
-- over-fitting occurs when a learner has been over trained or the model is overly complex and
it has captured noise in the training data along with the signal
-- when the performance of a classifier degrades when presented with never seen before data --
it is a sign of inability to generalize -- result of overfitting
-- be suspect of AUC=1 or perfect scores or error free learning tools.
-- If your model is classifying with 100% accuracy it is not necessarily a good thing.
-- And on occasion, classifier performance remains in the low teens or below 30% and that is
not -- necessarily a poor reflection of our process. Some processes do not
conform to any process
or pattern --for example volcano eruptions, and earth-quakes are hard to predict --.
-- there is no such thing as perfect -- please reject the pursuit of perfection. There AINT no
such thing.
-- Variance reduction strategies
-- Cross Validation
-- Ensemble methods are a reliable way to reduce overfitting, i.e.. reduce variability as they
aggregate
several individual classifiers susceptible to variance. In general, aggregation results in
smoothening.
[1] https://www.telegraph.co.uk/news/science/science-news/12114150/Human-brain-can-store-4.7-
billion-books-ten-times-more-than-originally-thought.html
[2] https://emerj.com/ai-glossary-terms/what-is-machine-learning/

Contenu connexe

Tendances

CART: Not only Classification and Regression Trees
CART: Not only Classification and Regression TreesCART: Not only Classification and Regression Trees
CART: Not only Classification and Regression TreesMarc Garcia
 
CART – Classification & Regression Trees
CART – Classification & Regression TreesCART – Classification & Regression Trees
CART – Classification & Regression TreesHemant Chetwani
 
2018 p 2019-ee-a2
2018 p 2019-ee-a22018 p 2019-ee-a2
2018 p 2019-ee-a2uetian12
 
Understanding the Machine Learning Algorithms
Understanding the Machine Learning AlgorithmsUnderstanding the Machine Learning Algorithms
Understanding the Machine Learning AlgorithmsRupak Roy
 
Classification and regression trees (cart)
Classification and regression trees (cart)Classification and regression trees (cart)
Classification and regression trees (cart)Learnbay Datascience
 
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai UniversityMadhav Mishra
 
Data Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model SelectionData Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model SelectionDerek Kane
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsSalah Amean
 
Logistic regression
Logistic regressionLogistic regression
Logistic regressionRupak Roy
 
Data mining: Classification and prediction
Data mining: Classification and predictionData mining: Classification and prediction
Data mining: Classification and predictionDataminingTools Inc
 
04 Classification in Data Mining
04 Classification in Data Mining04 Classification in Data Mining
04 Classification in Data MiningValerii Klymchuk
 
Data Mining: Concepts and Techniques — Chapter 2 —
Data Mining:  Concepts and Techniques — Chapter 2 —Data Mining:  Concepts and Techniques — Chapter 2 —
Data Mining: Concepts and Techniques — Chapter 2 —Salah Amean
 
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Simplilearn
 
Data.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and predictionData.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and predictionMargaret Wang
 
Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Derek Kane
 

Tendances (18)

CART: Not only Classification and Regression Trees
CART: Not only Classification and Regression TreesCART: Not only Classification and Regression Trees
CART: Not only Classification and Regression Trees
 
CART – Classification & Regression Trees
CART – Classification & Regression TreesCART – Classification & Regression Trees
CART – Classification & Regression Trees
 
2018 p 2019-ee-a2
2018 p 2019-ee-a22018 p 2019-ee-a2
2018 p 2019-ee-a2
 
Understanding the Machine Learning Algorithms
Understanding the Machine Learning AlgorithmsUnderstanding the Machine Learning Algorithms
Understanding the Machine Learning Algorithms
 
Classification and regression trees (cart)
Classification and regression trees (cart)Classification and regression trees (cart)
Classification and regression trees (cart)
 
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai UniversityMachine Learning Unit 4 Semester 3  MSc IT Part 2 Mumbai University
Machine Learning Unit 4 Semester 3 MSc IT Part 2 Mumbai University
 
Linear discriminant analysis
Linear discriminant analysisLinear discriminant analysis
Linear discriminant analysis
 
Data Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model SelectionData Science - Part III - EDA & Model Selection
Data Science - Part III - EDA & Model Selection
 
Random forest
Random forestRandom forest
Random forest
 
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic ConceptsData Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
Data Mining:Concepts and Techniques, Chapter 8. Classification: Basic Concepts
 
Logistic regression
Logistic regressionLogistic regression
Logistic regression
 
Data mining: Classification and prediction
Data mining: Classification and predictionData mining: Classification and prediction
Data mining: Classification and prediction
 
04 Classification in Data Mining
04 Classification in Data Mining04 Classification in Data Mining
04 Classification in Data Mining
 
Data Mining: Concepts and Techniques — Chapter 2 —
Data Mining:  Concepts and Techniques — Chapter 2 —Data Mining:  Concepts and Techniques — Chapter 2 —
Data Mining: Concepts and Techniques — Chapter 2 —
 
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
Machine Learning Tutorial Part - 2 | Machine Learning Tutorial For Beginners ...
 
Classification Continued
Classification ContinuedClassification Continued
Classification Continued
 
Data.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and predictionData.Mining.C.6(II).classification and prediction
Data.Mining.C.6(II).classification and prediction
 
Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests Data Science - Part V - Decision Trees & Random Forests
Data Science - Part V - Decision Trees & Random Forests
 

Similaire à Chapter01 introductory handbook

ML crash course
ML crash courseML crash course
ML crash coursemikaelhuss
 
Introduction to Machine Learning.
Introduction to Machine Learning.Introduction to Machine Learning.
Introduction to Machine Learning.butest
 
Machine Learning basics
Machine Learning basicsMachine Learning basics
Machine Learning basicsNeeleEilers
 
On Machine Learning and Data Mining
On Machine Learning and Data MiningOn Machine Learning and Data Mining
On Machine Learning and Data Miningbutest
 
Lecture #1: Introduction to machine learning (ML)
Lecture #1: Introduction to machine learning (ML)Lecture #1: Introduction to machine learning (ML)
Lecture #1: Introduction to machine learning (ML)butest
 
ML DL AI DS BD - An Introduction
ML DL AI DS BD - An IntroductionML DL AI DS BD - An Introduction
ML DL AI DS BD - An IntroductionDony Riyanto
 
machinecanthink-160226155704.pdf
machinecanthink-160226155704.pdfmachinecanthink-160226155704.pdf
machinecanthink-160226155704.pdfPranavPatil822557
 
Data Science in Industry - Applying Machine Learning to Real-world Challenges
Data Science in Industry - Applying Machine Learning to Real-world ChallengesData Science in Industry - Applying Machine Learning to Real-world Challenges
Data Science in Industry - Applying Machine Learning to Real-world ChallengesYuchen Zhao
 
Machine learning with Big Data power point presentation
Machine learning with Big Data power point presentationMachine learning with Big Data power point presentation
Machine learning with Big Data power point presentationDavid Raj Kanthi
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AIVishal Singh
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial IntelligenceLuca Bianchi
 
Machine learning it is time...
Machine learning it is time...Machine learning it is time...
Machine learning it is time...Sandip Chatterjee
 
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...PhD Assistance
 
Reinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-LearningReinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-LearningAbdullah al Mamun
 
MachineLlearning introduction
MachineLlearning introductionMachineLlearning introduction
MachineLlearning introductionThe IOT Academy
 
Machine learning presentation (razi)
Machine learning presentation (razi)Machine learning presentation (razi)
Machine learning presentation (razi)Rizwan Shaukat
 

Similaire à Chapter01 introductory handbook (20)

ML crash course
ML crash courseML crash course
ML crash course
 
Introduction to Machine Learning.
Introduction to Machine Learning.Introduction to Machine Learning.
Introduction to Machine Learning.
 
Introduction to machine learning
Introduction to machine learningIntroduction to machine learning
Introduction to machine learning
 
Machine Learning basics
Machine Learning basicsMachine Learning basics
Machine Learning basics
 
On Machine Learning and Data Mining
On Machine Learning and Data MiningOn Machine Learning and Data Mining
On Machine Learning and Data Mining
 
Machine Learning - Deep Learning
Machine Learning - Deep LearningMachine Learning - Deep Learning
Machine Learning - Deep Learning
 
Lecture #1: Introduction to machine learning (ML)
Lecture #1: Introduction to machine learning (ML)Lecture #1: Introduction to machine learning (ML)
Lecture #1: Introduction to machine learning (ML)
 
ML DL AI DS BD - An Introduction
ML DL AI DS BD - An IntroductionML DL AI DS BD - An Introduction
ML DL AI DS BD - An Introduction
 
machinecanthink-160226155704.pdf
machinecanthink-160226155704.pdfmachinecanthink-160226155704.pdf
machinecanthink-160226155704.pdf
 
Machine Can Think
Machine Can ThinkMachine Can Think
Machine Can Think
 
Data Science in Industry - Applying Machine Learning to Real-world Challenges
Data Science in Industry - Applying Machine Learning to Real-world ChallengesData Science in Industry - Applying Machine Learning to Real-world Challenges
Data Science in Industry - Applying Machine Learning to Real-world Challenges
 
Machine learning with Big Data power point presentation
Machine learning with Big Data power point presentationMachine learning with Big Data power point presentation
Machine learning with Big Data power point presentation
 
Knowledge representation in AI
Knowledge representation in AIKnowledge representation in AI
Knowledge representation in AI
 
Introduction to Artificial Intelligence
Introduction to Artificial IntelligenceIntroduction to Artificial Intelligence
Introduction to Artificial Intelligence
 
Machine learning it is time...
Machine learning it is time...Machine learning it is time...
Machine learning it is time...
 
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
Machine Learning On Big Data: Opportunities And Challenges- Future Research D...
 
Reinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-LearningReinforcement Learning, Application and Q-Learning
Reinforcement Learning, Application and Q-Learning
 
MachineLlearning introduction
MachineLlearning introductionMachineLlearning introduction
MachineLlearning introduction
 
Introduction to ml
Introduction to mlIntroduction to ml
Introduction to ml
 
Machine learning presentation (razi)
Machine learning presentation (razi)Machine learning presentation (razi)
Machine learning presentation (razi)
 

Plus de Raman Kannan

Essays on-civic-responsibilty
Essays on-civic-responsibiltyEssays on-civic-responsibilty
Essays on-civic-responsibiltyRaman Kannan
 
M12 boosting-part02
M12 boosting-part02M12 boosting-part02
M12 boosting-part02Raman Kannan
 
M12 random forest-part01
M12 random forest-part01M12 random forest-part01
M12 random forest-part01Raman Kannan
 
M11 bagging loo cv
M11 bagging loo cvM11 bagging loo cv
M11 bagging loo cvRaman Kannan
 
M10 gradient descent
M10 gradient descentM10 gradient descent
M10 gradient descentRaman Kannan
 
M09-Cross validating-naive-bayes
M09-Cross validating-naive-bayesM09-Cross validating-naive-bayes
M09-Cross validating-naive-bayesRaman Kannan
 
Augmented 11022020-ieee
Augmented 11022020-ieeeAugmented 11022020-ieee
Augmented 11022020-ieeeRaman Kannan
 
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...Raman Kannan
 
A voyage-inward-02
A voyage-inward-02A voyage-inward-02
A voyage-inward-02Raman Kannan
 
Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923Raman Kannan
 
A data scientist's study plan
A data scientist's study planA data scientist's study plan
A data scientist's study planRaman Kannan
 
Cognitive Assistants
Cognitive AssistantsCognitive Assistants
Cognitive AssistantsRaman Kannan
 
How to-run-ols-diagnostics-02
How to-run-ols-diagnostics-02How to-run-ols-diagnostics-02
How to-run-ols-diagnostics-02Raman Kannan
 
Sdr dodd frankbirdseyeview
Sdr dodd frankbirdseyeviewSdr dodd frankbirdseyeview
Sdr dodd frankbirdseyeviewRaman Kannan
 
Risk management framework
Risk management frameworkRisk management framework
Risk management frameworkRaman Kannan
 
Innovation: Cost or Rejuvenation
Innovation: Cost or RejuvenationInnovation: Cost or Rejuvenation
Innovation: Cost or RejuvenationRaman Kannan
 

Plus de Raman Kannan (20)

Essays on-civic-responsibilty
Essays on-civic-responsibiltyEssays on-civic-responsibilty
Essays on-civic-responsibilty
 
M12 boosting-part02
M12 boosting-part02M12 boosting-part02
M12 boosting-part02
 
M12 random forest-part01
M12 random forest-part01M12 random forest-part01
M12 random forest-part01
 
M11 bagging loo cv
M11 bagging loo cvM11 bagging loo cv
M11 bagging loo cv
 
M10 gradient descent
M10 gradient descentM10 gradient descent
M10 gradient descent
 
M09-Cross validating-naive-bayes
M09-Cross validating-naive-bayesM09-Cross validating-naive-bayes
M09-Cross validating-naive-bayes
 
M06 tree
M06 treeM06 tree
M06 tree
 
M07 svm
M07 svmM07 svm
M07 svm
 
M03 nb-02
M03 nb-02M03 nb-02
M03 nb-02
 
Augmented 11022020-ieee
Augmented 11022020-ieeeAugmented 11022020-ieee
Augmented 11022020-ieee
 
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
Chapter 2: R tutorial Handbook for Data Science and Machine Learning Practiti...
 
A voyage-inward-02
A voyage-inward-02A voyage-inward-02
A voyage-inward-02
 
Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923Evaluating classifierperformance ml-cs6923
Evaluating classifierperformance ml-cs6923
 
A data scientist's study plan
A data scientist's study planA data scientist's study plan
A data scientist's study plan
 
Cognitive Assistants
Cognitive AssistantsCognitive Assistants
Cognitive Assistants
 
Joy of Unix
Joy of UnixJoy of Unix
Joy of Unix
 
How to-run-ols-diagnostics-02
How to-run-ols-diagnostics-02How to-run-ols-diagnostics-02
How to-run-ols-diagnostics-02
 
Sdr dodd frankbirdseyeview
Sdr dodd frankbirdseyeviewSdr dodd frankbirdseyeview
Sdr dodd frankbirdseyeview
 
Risk management framework
Risk management frameworkRisk management framework
Risk management framework
 
Innovation: Cost or Rejuvenation
Innovation: Cost or RejuvenationInnovation: Cost or Rejuvenation
Innovation: Cost or Rejuvenation
 

Dernier

Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Callshivangimorya083
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfMarinCaroMartnezBerg
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Delhi Call girls
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxolyaivanovalion
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...shivangimorya083
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxolyaivanovalion
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz1
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxolyaivanovalion
 

Dernier (20)

Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip CallDelhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
Delhi Call Girls CP 9711199171 ☎✔👌✔ Whatsapp Hard And Sexy Vip Call
 
FESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdfFESE Capital Markets Fact Sheet 2024 Q1.pdf
FESE Capital Markets Fact Sheet 2024 Q1.pdf
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
Best VIP Call Girls Noida Sector 22 Call Me: 8448380779
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
VidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptxVidaXL dropshipping via API with DroFx.pptx
VidaXL dropshipping via API with DroFx.pptx
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...Vip Model  Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
Vip Model Call Girls (Delhi) Karol Bagh 9711199171✔️Body to body massage wit...
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
BigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptxBigBuy dropshipping via API with DroFx.pptx
BigBuy dropshipping via API with DroFx.pptx
 
Invezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signalsInvezz.com - Grow your wealth with trading signals
Invezz.com - Grow your wealth with trading signals
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
Smarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptxSmarteg dropshipping via API with DroFx.pptx
Smarteg dropshipping via API with DroFx.pptx
 

Chapter01 introductory handbook

  • 1. First Course on Supervised Learning for Practitioners Raman Kannan Chapter 1: Course Overview The three basic questions one should ask to learn anything what is Machine Learning (ML)? Why ML? how ML -- doing starts here What is ML? Machine Learning is a particular approach to making sense out of data. ML is vastly different from traditional programming where you construct sequence of statements which are coded to process data in a particular format. When we write software using traditional programming methods, the application you write, cannot and will never do anything you did not explicitly code for. ML is different in that regard. ML will learn from all the data it has seen and learn as it goes along and is able to infer when some new (never seen before data) is presented. Act of forming general principles from particulars is known as generalization or inductive reasoning. In classification, ML algorithms observe given instances (particulars) and make inferences about scenarios never seen before. ML applications perform a given task better with more data (or with experience) because ML programs identify patterns and show signs of leveraging such patterns just as a mammalian brain does. Therefore, in summary, classification is about generalization aka inductive reasoning. Why ML? We cannot be writing traditional software given the deluge of data. We need a technique which can learn from data and process data without a programmer anticipating and coding everything in a piece of code. Such a goal would be futile. We need a new approach. Why now? ML is an ancient discipline since 1959 --Arthur Samuelson coined this terminology ML-- but it nearly faded away (1) in the 80s, because it required a lot of data (2) significant computational power, and (3) Only DoD and other major gov agencies and large coporations could finance such projects. In contrast, the human brain learns in real-time, 24x7 for 15 to 20 years, with a capacity to store 4.7 billion books or 670 million web pages [1], before it is useful at all. Now with the advent of internet, we have more data -- and a smartphone has more computing power -- computing capacity is cheap -- due to vastly improved communication (sharing,disseminating) capabilities, cloud, hw/sw improvements -and therefore- (1) and (2) are not valid anymore. Even small firms with modest resources can now undertake M/L initiatives -- (3) is not valid anymore because we have IBM, Google, FB,MSFT,AMZN and other such companies that can undertake such projects. DoD is not the only game in town, Elon Musk, Jeff Bezos are also in town and they dont know idling. M/L is popular and in demand now. There is a prevalence of practitioners labeling everything as M/L or some-sort of learning whether or not there is any learning. Machine Learning started off as a discipline
  • 2. of Artificial Intelligence, better known as AI. There is a tendency to find a way to label a solution as an AI Solution, when there is no basis for such a label. Both AI and ML are valuable and powerful body of knowledge and there is no need to fall into a hype vortex which can only fizzle out with disenchantment. In these essays we will avoid doing such things. We will focus on classical machine learning and exclude NLP, Deep Learning (DL) and Neural Nets. They are important and DL can do what we can do, sometimes better and faster. But we cannot learn anything as we will not know why it did what it did. They are indistinguishable from astrology or magic. A non-trivial DL solution cannot be easily explained. Notwithstanding, these topics, NLP and DL deserve a full length semester long study. Now, then, learning can be achieved in many different ways and accordingly, there are three main branches of learning in ML -- supervised learning (aka classification) -- unsupervised learning (aka clustering) -- reinforcement learning Learning generally involved perceiving the essence beyond what is evident in perceptible dimensions, mostly 3D. Beyond 3D, it is twister and many problems are beyond 3D -- in that sense dimensionality reduction techniques can also be considered as a major field of ML. Better claim is that M/L draws from other mature subjects including linear algebra, calculus, statistics, information retrieval and optimization. We will focus entirely on classical supervised learning techniques. What is Classification? In classification, we are given a set of observations in the form of records. Each observation is composed of set of features and a class variable. ML algorithms learn hidden patterns in the given dataset, and learn to associate a class given feature vector. In ML, therefore, features are independent variables (IV) and the class variable is the dependent variable (DV). There is almost always more than one IV (multi-variate) and exactly one dependent variable (DV). In summary, “Machine Learning is the science of getting computers to learn and act like humans do, and improve their learning over time in autonomous fashion, by feeding them data and information in the form of observations and real-world interactions.” [2] In supervised learning we seek to find a function or a method to determine the class (DV) given the features (IV). Classification algorithms seek to find a function f, such that, DV = f(IV) Thus, we can abstract the supervised learning in terms of predictor variables (IV) and output variable (DV). Predictor variables are also known as independent variables, regressors, features, covariates, input variables.
  • 3. Predictors can be numerical (height,weight,salary) or categorical ( gender, color ) Output variables are also known as class variable, dependent variable or class labels. When the output variable is quantitative, -- we use regression techniques (OLS). When the output variable is qualitative (ordinal,nominal) -- it is called classification. The scope of this course are Classification techniques -aka- Supervised Learning. As an academic in my research, I am interested in fundamental improvements to classification, applications of classification, in particular understanding text corpus -- NLP. There are many classification methods: -- probabilistic methods, considering entire dataset, properties of individuals are not a significant factor -- instance based methods -- individual properties are all that matters -- distance based how similar are two objects -- logic based decision making -- extract rules to classify -- topological methods Examples of probabilistic methods: Logistic Regression Fishers Discriminant Analysis (LDA,QDA, etc) Naive Bayes Example of instance based classification: kNN -- nearest neighbor Example of Logic Based classification: Decision Tree topological methods Support Vector Machines (SVM) -- (kernel methods) These are individual learners. Individual learners, having seen a particular set of observations, are subject to the bias and variability in the inferences they make. Therefore, one can seek to improve by combining them. One fundamental method to improve anything is the Iterative method -- do something, find out where it went wrong (what makes it inefficient), optimize (compensate) and repeat until no further improvements can be made or a target performance has been achieved. Practitioners refer to this technique as boosting. batch method -- learn from several subsets of data and average them -- aka bagging ensemble method -- in bagging all features are considered -- what if we learn using different features and average them -- when we apply this to Decision tree -- we get random forest stacking -- all three combination methods above, perturb a single kind of learner. Therefore, we could imagine combining learners of different kinds (probabilistic, logic-based, instance based and topological learners) and such a method is called stacking.
  • 4. First Task, Mind your data. Avoid GIGO. Quality data has the potential to result in quality analysis. Without quality nothing of value can be harnessed. Data Quality is paramount. Inappropriate use, results in useless inferences. Therefore, we must seek to understand data at a deeper level -- relating to data -- how many features -- are all features equally important -- are they collinear or correlated with each other, -- are they correlated with the outcome variable -- how many classes -- binary or multiple -- imbalanced dataset some classes are rare and under-represented -- Splitting data into training and testing -- reproducibility and repeatability -- scale effects -- some features have wider range, exhibit much different dispersion, -- requires standardization either scaling or normalization -- curse of dimensionality (merely mentioned here) -- a dataset is a 2-D matrix, -- columns as features (length, width, color, blood type ) and -- observations as rows. -- we are mostly dealing with rectangular matrices in machine learning -- dimensionality reduction using well known linear algebra techniques Principal Component Analysis (aka in physics Eigen Value Decomposition), Cholesky (positive definitive matrices) and SVD (rectangular matrices) -- how to interpret the model output in a transformed coordinate space back in the real world in which the business operates. All these perspectives and considerations are all very important to gain the most out of M/L or A/I. Classifier Performance -- relating to performance -- metrics to assess performance of a supervised learner -- classifiers -- true positives, true negatives -- model is consistent with the reality -- false positive -- models says it is positive but in reality that observation is negative -- false negative -- model says it is negative but in reality that observation is positive -- accuracy, sensitivity, specificity, recall, precision and F1 -- RoC curves and Area Under the Curve (AUC) -- Null deviance and residual deviance -- regression -- R-squared, adjusted R-squared, RMSe -- F-statistic, AIC,BIC -- irreducible error, bayes factor -- theoretical bound on the smallest error -- source of errors -- inability to estimate population parameters given a sample -- bias and underfitting -- sample is NOT representative of the population -- simpler models are more prone to bias -- we have observed 44 presidents all of whom happen to be males
  • 5. -- that is a biased sample not good for making sound inference -- all were caucasian ancestory until Obama -- under-fitting occurs where the algorithm is unable to learn -- if the model is unable to achieve 65% accuracy during training phase, one may conclude the model is unable to learn -- variance and overfitting -- due to the variability in the measuring or observation methods -- both variance and bias cannot be simultaneously reduced -- Variance/Bias manifest as over-fitting/under-fitting respectively -- that is, when a learner is unable to classify correctly even when it has seen the data -- over-fitting occurs when a learner has been over trained or the model is overly complex and it has captured noise in the training data along with the signal -- when the performance of a classifier degrades when presented with never seen before data -- it is a sign of inability to generalize -- result of overfitting -- be suspect of AUC=1 or perfect scores or error free learning tools. -- If your model is classifying with 100% accuracy it is not necessarily a good thing. -- And on occasion, classifier performance remains in the low teens or below 30% and that is not -- necessarily a poor reflection of our process. Some processes do not conform to any process or pattern --for example volcano eruptions, and earth-quakes are hard to predict --. -- there is no such thing as perfect -- please reject the pursuit of perfection. There AINT no such thing. -- Variance reduction strategies -- Cross Validation -- Ensemble methods are a reliable way to reduce overfitting, i.e.. reduce variability as they aggregate several individual classifiers susceptible to variance. In general, aggregation results in smoothening. [1] https://www.telegraph.co.uk/news/science/science-news/12114150/Human-brain-can-store-4.7- billion-books-ten-times-more-than-originally-thought.html [2] https://emerj.com/ai-glossary-terms/what-is-machine-learning/