SlideShare a Scribd company logo
MACHINE LEARNING
(USING R)
SUKHWINDER SINGH ME CS
A COMPUTER PROGRAM IS SAID TO LEARN FROM EXPERIENCE E WITH RESPECT TO SOME TASK TAND
SOME PERFORMANCE MEASURE PIF ITS PERFORMANCE ON T, AS MEASURED BY P, IMPROVES WITH
EXPERIENCE E.
TOPIC: REGRESSION AND CLASSIFICATION
• Regression :- A linear Regression is approach of modeling for finding the
relation between a input variable(X) and output variable(Y).
• simple linear regression: we have a single input attribute (x) and we
want to use linear regression,
• multiple linear regression:If we had multiple input attributes
(e.g. x1, x2, x3, etc.)
Model Evaluation Parameter:- r,R,RMSE,MSE,MAE,Accuracy
Example:- linear model, Polynomial Regression
LINEAR MODEL
lm()
• Based on training data, the learning process computes one weight for each
feature to form a model that can predict or estimate the target value
• formula <- as.formula(paste(target, "~", paste(c(inputs), collapse = "+")))
• Model <- lm(formula, trainDataset) Predicted <- predict(model, testDataset)
• Correlation: r <- cor(Actual,Predicted ), Rsquare = R <- r * r,
• RMSE <- mean(abs(Actual-Predicted)),
• Accuracy <- mean(abs(Actual-Predicted)<=1) Accuracy <- round(accuracy,4)
*100
TOPIC: CLASSIFICATION
• Classification is the task of approximating a mapping function (f) from input variables (X)
to discrete output variables (y).
• Model Evaluation parameter: Confusion matrix,
• Senstivity=TP/TP+FN
• Specificity=TN/TN+FP
• ,Precision=TP/TP+FP
• Accuracy=TP+TN/TP+TN+FN+FP
• Model Support Vector Machines,Decision Trees, Neural Networks
INFORMATION GAIN
• Information gain is the difference of the information in two terms of information before
splitting and information and after splitting using Entropy. Max the Information
gain max the information an attribute consists.
• Entropy is the sum of the probability of each
label times the log probability of that same label.
Decision Tree based on Information gain
model <- rpart(formula, trainDataset, method="class)
FEATURE SELECTION
• Feature: It is a measurable term that play an vital role in the life of dataset. Higher the information of an
attribute greater the chances of its selection.
• Wrapper Method(Supervised): An approach to train system with best subset and estimate the error of
the model. Several technique used in Wrapper methods are:
Foreword: Start from 0 to n, Select attribute with best result.
Backword: Start from bottom and eliminate them one by one till best result.
Recursive feature Elimination.: Use Foreword and backword and select best outcome for your model.
• Filter method(unsupervised): We have to find co-relation or some other statisitical relationship between
target feature and input feature. Pearson, LDA, CHI-Square model are used to predict the best feature.
• Embedded Method:it is combination of Wrapper and Filter Method. Lasso, Ridge regression model
used in this.
NEURAL NETWORK
nnet()
• Neural network is a system of hardware and/or software patterned after the operation of
neurons in the human brain. Neural networks.
• Input Layer | Hidden Layer(Processing layer) | Output layer
• Activation function: wi * xi wii * xii (Weight of connection* Value of input)
• Linear Activation: y=x Sigmoid Activation: y=
1
1+ⅇ−𝑥
• Foreword propagation, backword propagation
• library(nnet) model<- nnet(formula, trainDataset, size=10)
GA (GENETIC ALGORITHM)
ga()
• Genetic Algorithms (GAs) are search based algorithms based on the concepts
of natural selection and genetics.
• Population | Chromosomes | Gene | Allele
• Evaluation: to check parameter
• Selection: Select best parents
• Crossover:Randomised parents to makes new off-spring.
One point croosover | multi point crossover | uniform crossover
• Mutation: New Child born from selected parents
Bit Flip mutation | Swap mutation | Scramble mutation | Inverse mutation
SVM (SUPPORT VECTOR MACHINE)
ksvm()
SVM is a supervised machine learning algorithm that can be employed for both classification and regression
purposes. based on the idea of finding a hyperplane that best divides a dataset into two classes
Hyperplane: a line that linearly separates and classifies a set of data, data points to be as far away from the
hyperplane as possible
Kernal: defines the similarity or a distance measure between new data and the support vectors.
Linear: K(x, xi) = sum(x * xi)
Polynomial: K(x,xi) = 1 + sum(x * xi)^d
Radial: K(x,xi) = exp(-gamma * sum((x – xi^2))
model <- ksvm(formula, trainDataset, kernel="rbfdot")
ENSEMBLING
• Ensembling is a technique of combining two or more algorithms of similar/dissimilar types called base
learners.
• Averaging: It’s the average of predictions from models in case of regression problem classification
problem.
• Majority vote: It’s the prediction with maximum vote / recommendation from
multiple models predictions while predicting the outcomes of a classification problem.
• Weighted average: Different weights are applied to predictions from multiple
models then taking the average which means giving high/low importance to model.
• Bagging: choose ‘n’ observations or rows out of the original dataset each row is selected with
replacement from the original dataset in each iteration. Boosting: First algorithm is trained on the entire
dataset and the subsequent algorithms are built by fitting the residuals of the first
CONCEPT LEARNING
• : learning a category description (concept) from a set of positive and negative training It is Set of objects
defined over large set. It consist of approximating Boolean values function. c:x->X
A search problem for best fitting hypothesis in a hypotheses space.
h is a set of constraints on attributes
• An instance x satisfies an hypothesis h iff all the constraints expressed by h are satisfied by the attribute
values in x.
• Example 1: x1: Sunny, Warm, Normal, Strong, Warm, Same h1: Sunny, ?, ?, Strong, ?, Same Satisfies? Yes
• Example 2: x2: Sunny, Warm, Normal, Strong, Warm, Same h2: Sunny, ?, ?, Ø, ?, Same Satisfies? No
• Most generic <?,?,?,?,?> | most specific <∅, ∅, ∅, ∅, ∅>
FIND S
• A concept c is maximally specific if it covers all positive hypothesis
• A concept c is maximally general if it does not cover any hypothesis
S – set of hypothesis (candidate concepts) = maximum specific generalizations
G – set of hypothesis (candidate concepts) = maximum general specializations
Example: <big, red, circle>F || <small><red,circle>T
Start for Gi, else there is –ve hypothesis starts from Si.
S0=<?,red,circle>
G1=G0
G0
INDUCTIVE VS ANALYTICAL LEARNING
• Inductive learning require a certain number of training examples to achieve a given level of
generalization accuracy. Higher the number of training increase the accuracy., identify feature and
distinguish them in positive/negative feature.
• Ex. Decision tree, Neural network, Genetic algorithm.
• Analytical learning uses the learner’s prior knowledge and deductive reasoning to analyze
individual training examples, in order to discriminate the relevant features from the irrelevant.
• EBL uses prior knowledge to analyze, explain each training example in order to infer which
example feature are relevant to the target function and which are ir-relevent.
INDUCTIVE VS ANALYTICAL LEARNING
• The Inductive Generalization Problem
Given: • Instances | Hypotheses | Target Concept | Training examples of target concept
Determine: Hypotheses consistent with the training examples
Hypothesis: data
The Analytical Generalization Problem
Given: • Instances | Hypotheses | Target Concept | Training examples of target concept | Domain theory
for explaining examples
• Determine: Hypotheses consistent with the training examples and the domain theory
Hypothesis: domain theory
EBL-EXPLANATION BASED LEARNING
• Initialize hypothesis = {}
• For each positive training example not covered by hypothesis:
• 1. Explain how training example satisfies target concept, in terms of domain theory
• 2. Analyze the explanation to determine the most general conditions under which this explanation
(proof) holds
• 3. Refine the hypothesis by adding a new rule, whose preconditions are the above conditions, and
whose consequent asserts the target concept

More Related Content

What's hot

3_learning.ppt
3_learning.ppt3_learning.ppt
3_learning.ppt
butest
 
Max Entropy
Max EntropyMax Entropy
Max Entropy
jianingy
 
Introduction to Reinforcement Learning
Introduction to Reinforcement LearningIntroduction to Reinforcement Learning
Introduction to Reinforcement Learning
Edward Balaban
 
A Maximum Entropy Approach to the Loss Data Aggregation Problem
A Maximum Entropy Approach to the Loss Data Aggregation ProblemA Maximum Entropy Approach to the Loss Data Aggregation Problem
A Maximum Entropy Approach to the Loss Data Aggregation Problem
Erika G. G.
 
Meta-learning of exploration-exploitation strategies in reinforcement learning
Meta-learning of exploration-exploitation strategies in reinforcement learningMeta-learning of exploration-exploitation strategies in reinforcement learning
Meta-learning of exploration-exploitation strategies in reinforcement learning
Université de Liège (ULg)
 
Principle of Maximum Entropy
Principle of Maximum EntropyPrinciple of Maximum Entropy
Principle of Maximum Entropy
Jiawang Liu
 
Learning for exploration-exploitation in reinforcement learning. The dusk of ...
Learning for exploration-exploitation in reinforcement learning. The dusk of ...Learning for exploration-exploitation in reinforcement learning. The dusk of ...
Learning for exploration-exploitation in reinforcement learning. The dusk of ...
Université de Liège (ULg)
 
"Naive Bayes Classifier" @ Papers We Love Bucharest
"Naive Bayes Classifier" @ Papers We Love Bucharest"Naive Bayes Classifier" @ Papers We Love Bucharest
"Naive Bayes Classifier" @ Papers We Love Bucharest
Stefan Adam
 
Naive Bayes Classifier
Naive Bayes ClassifierNaive Bayes Classifier
Naive Bayes Classifier
Arunabha Saha
 
MS CS - Selecting Machine Learning Algorithm
MS CS - Selecting Machine Learning AlgorithmMS CS - Selecting Machine Learning Algorithm
MS CS - Selecting Machine Learning Algorithm
Kaniska Mandal
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
Prof. Dr. K. Adisesha
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
umeskath
 
Scalable sentiment classification for big data analysis using naive bayes cla...
Scalable sentiment classification for big data analysis using naive bayes cla...Scalable sentiment classification for big data analysis using naive bayes cla...
Scalable sentiment classification for big data analysis using naive bayes cla...
Tien-Yang (Aiden) Wu
 
An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier
ananth
 
Big Data Analysis
Big Data AnalysisBig Data Analysis
Big Data Analysis
NBER
 
Machine learning by Dr. Vivek Vijay and Dr. Sandeep Yadav
Machine learning by Dr. Vivek Vijay and Dr. Sandeep YadavMachine learning by Dr. Vivek Vijay and Dr. Sandeep Yadav
Machine learning by Dr. Vivek Vijay and Dr. Sandeep Yadav
Agile Testing Alliance
 
Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programming
Soumya Mukherjee
 
Introduction to Supervised ML Concepts and Algorithms
Introduction to Supervised ML Concepts and AlgorithmsIntroduction to Supervised ML Concepts and Algorithms
Introduction to Supervised ML Concepts and Algorithms
NBER
 
Aaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clusteringAaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clustering
AminaRepo
 
ppt
pptppt
ppt
butest
 

What's hot (20)

3_learning.ppt
3_learning.ppt3_learning.ppt
3_learning.ppt
 
Max Entropy
Max EntropyMax Entropy
Max Entropy
 
Introduction to Reinforcement Learning
Introduction to Reinforcement LearningIntroduction to Reinforcement Learning
Introduction to Reinforcement Learning
 
A Maximum Entropy Approach to the Loss Data Aggregation Problem
A Maximum Entropy Approach to the Loss Data Aggregation ProblemA Maximum Entropy Approach to the Loss Data Aggregation Problem
A Maximum Entropy Approach to the Loss Data Aggregation Problem
 
Meta-learning of exploration-exploitation strategies in reinforcement learning
Meta-learning of exploration-exploitation strategies in reinforcement learningMeta-learning of exploration-exploitation strategies in reinforcement learning
Meta-learning of exploration-exploitation strategies in reinforcement learning
 
Principle of Maximum Entropy
Principle of Maximum EntropyPrinciple of Maximum Entropy
Principle of Maximum Entropy
 
Learning for exploration-exploitation in reinforcement learning. The dusk of ...
Learning for exploration-exploitation in reinforcement learning. The dusk of ...Learning for exploration-exploitation in reinforcement learning. The dusk of ...
Learning for exploration-exploitation in reinforcement learning. The dusk of ...
 
"Naive Bayes Classifier" @ Papers We Love Bucharest
"Naive Bayes Classifier" @ Papers We Love Bucharest"Naive Bayes Classifier" @ Papers We Love Bucharest
"Naive Bayes Classifier" @ Papers We Love Bucharest
 
Naive Bayes Classifier
Naive Bayes ClassifierNaive Bayes Classifier
Naive Bayes Classifier
 
MS CS - Selecting Machine Learning Algorithm
MS CS - Selecting Machine Learning AlgorithmMS CS - Selecting Machine Learning Algorithm
MS CS - Selecting Machine Learning Algorithm
 
Machine Learning
Machine LearningMachine Learning
Machine Learning
 
Naive bayes
Naive bayesNaive bayes
Naive bayes
 
Scalable sentiment classification for big data analysis using naive bayes cla...
Scalable sentiment classification for big data analysis using naive bayes cla...Scalable sentiment classification for big data analysis using naive bayes cla...
Scalable sentiment classification for big data analysis using naive bayes cla...
 
An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier An Overview of Naïve Bayes Classifier
An Overview of Naïve Bayes Classifier
 
Big Data Analysis
Big Data AnalysisBig Data Analysis
Big Data Analysis
 
Machine learning by Dr. Vivek Vijay and Dr. Sandeep Yadav
Machine learning by Dr. Vivek Vijay and Dr. Sandeep YadavMachine learning by Dr. Vivek Vijay and Dr. Sandeep Yadav
Machine learning by Dr. Vivek Vijay and Dr. Sandeep Yadav
 
Machine learning and linear regression programming
Machine learning and linear regression programmingMachine learning and linear regression programming
Machine learning and linear regression programming
 
Introduction to Supervised ML Concepts and Algorithms
Introduction to Supervised ML Concepts and AlgorithmsIntroduction to Supervised ML Concepts and Algorithms
Introduction to Supervised ML Concepts and Algorithms
 
Aaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clusteringAaa ped-16-Unsupervised Learning: clustering
Aaa ped-16-Unsupervised Learning: clustering
 
ppt
pptppt
ppt
 

Similar to Machine learning

Data mining knowledge representation Notes
Data mining knowledge representation NotesData mining knowledge representation Notes
Data mining knowledge representation Notes
RevathiSundar4
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptx
Ruby Shrestha
 
Predictive analytics
Predictive analyticsPredictive analytics
Predictive analytics
Dinakar nk
 
Nearest neighbour algorithm
Nearest neighbour algorithmNearest neighbour algorithm
Nearest neighbour algorithm
Anmitas1
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
gmorishita
 
ngboost.pptx
ngboost.pptxngboost.pptx
ngboost.pptx
Hadrian7
 
Unit 3 – AIML.pptx
Unit 3 – AIML.pptxUnit 3 – AIML.pptx
Unit 3 – AIML.pptx
hiblooms
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
AmAn Singh
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
Nazmus Sakib
 
ML SFCSE.pptx
ML SFCSE.pptxML SFCSE.pptx
ML SFCSE.pptx
NIKHILGR3
 
CounterFactual Explanations.pdf
CounterFactual Explanations.pdfCounterFactual Explanations.pdf
CounterFactual Explanations.pdf
Bong-Ho Lee
 
Data Science and Machine Learning with Tensorflow
 Data Science and Machine Learning with Tensorflow Data Science and Machine Learning with Tensorflow
Data Science and Machine Learning with Tensorflow
Shubham Sharma
 
2.7 other classifiers
2.7 other classifiers2.7 other classifiers
2.7 other classifiers
Krish_ver2
 
Supervised Learning.pptx
Supervised Learning.pptxSupervised Learning.pptx
Machine Learning : why we should know and how it works
Machine Learning : why we should know and how it worksMachine Learning : why we should know and how it works
Machine Learning : why we should know and how it works
Kevin Lee
 
SVM - Functional Verification
SVM - Functional VerificationSVM - Functional Verification
SVM - Functional Verification
Sai Kiran Kadam
 
Machine Learning Notes for beginners ,Step by step
Machine Learning Notes for beginners ,Step by stepMachine Learning Notes for beginners ,Step by step
Machine Learning Notes for beginners ,Step by step
SanjanaSaxena17
 
Week_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxWeek_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptx
muhammadsamroz
 
L1 intro2 supervised_learning
L1 intro2 supervised_learningL1 intro2 supervised_learning
L1 intro2 supervised_learning
Yogendra Singh
 
Computational Learning Theory ppt.pptxhhhh
Computational Learning Theory ppt.pptxhhhhComputational Learning Theory ppt.pptxhhhh
Computational Learning Theory ppt.pptxhhhh
zoobiarana76
 

Similar to Machine learning (20)

Data mining knowledge representation Notes
Data mining knowledge representation NotesData mining knowledge representation Notes
Data mining knowledge representation Notes
 
The ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptxThe ABC of Implementing Supervised Machine Learning with Python.pptx
The ABC of Implementing Supervised Machine Learning with Python.pptx
 
Predictive analytics
Predictive analyticsPredictive analytics
Predictive analytics
 
Nearest neighbour algorithm
Nearest neighbour algorithmNearest neighbour algorithm
Nearest neighbour algorithm
 
Model Selection and Validation
Model Selection and ValidationModel Selection and Validation
Model Selection and Validation
 
ngboost.pptx
ngboost.pptxngboost.pptx
ngboost.pptx
 
Unit 3 – AIML.pptx
Unit 3 – AIML.pptxUnit 3 – AIML.pptx
Unit 3 – AIML.pptx
 
Supervised and unsupervised learning
Supervised and unsupervised learningSupervised and unsupervised learning
Supervised and unsupervised learning
 
Introduction to Machine Learning
Introduction to Machine LearningIntroduction to Machine Learning
Introduction to Machine Learning
 
ML SFCSE.pptx
ML SFCSE.pptxML SFCSE.pptx
ML SFCSE.pptx
 
CounterFactual Explanations.pdf
CounterFactual Explanations.pdfCounterFactual Explanations.pdf
CounterFactual Explanations.pdf
 
Data Science and Machine Learning with Tensorflow
 Data Science and Machine Learning with Tensorflow Data Science and Machine Learning with Tensorflow
Data Science and Machine Learning with Tensorflow
 
2.7 other classifiers
2.7 other classifiers2.7 other classifiers
2.7 other classifiers
 
Supervised Learning.pptx
Supervised Learning.pptxSupervised Learning.pptx
Supervised Learning.pptx
 
Machine Learning : why we should know and how it works
Machine Learning : why we should know and how it worksMachine Learning : why we should know and how it works
Machine Learning : why we should know and how it works
 
SVM - Functional Verification
SVM - Functional VerificationSVM - Functional Verification
SVM - Functional Verification
 
Machine Learning Notes for beginners ,Step by step
Machine Learning Notes for beginners ,Step by stepMachine Learning Notes for beginners ,Step by step
Machine Learning Notes for beginners ,Step by step
 
Week_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptxWeek_1 Machine Learning introduction.pptx
Week_1 Machine Learning introduction.pptx
 
L1 intro2 supervised_learning
L1 intro2 supervised_learningL1 intro2 supervised_learning
L1 intro2 supervised_learning
 
Computational Learning Theory ppt.pptxhhhh
Computational Learning Theory ppt.pptxhhhhComputational Learning Theory ppt.pptxhhhh
Computational Learning Theory ppt.pptxhhhh
 

Recently uploaded

International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
gerogepatton
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
Rahul
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
gestioneergodomus
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
jpsjournal1
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
IJECEIAES
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
MDSABBIROJJAMANPAYEL
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
VICTOR MAESTRE RAMIREZ
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
IJECEIAES
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
Dr Ramhari Poudyal
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
camseq
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
IJECEIAES
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
University of Maribor
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
RadiNasr
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
ClaraZara1
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
kandramariana6
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
Mukeshwaran Balu
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
KrishnaveniKrishnara1
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
wisnuprabawa3
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
heavyhaig
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
mahammadsalmanmech
 

Recently uploaded (20)

International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...International Conference on NLP, Artificial Intelligence, Machine Learning an...
International Conference on NLP, Artificial Intelligence, Machine Learning an...
 
ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024ACEP Magazine edition 4th launched on 05.06.2024
ACEP Magazine edition 4th launched on 05.06.2024
 
DfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributionsDfMAy 2024 - key insights and contributions
DfMAy 2024 - key insights and contributions
 
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECTCHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
CHINA’S GEO-ECONOMIC OUTREACH IN CENTRAL ASIAN COUNTRIES AND FUTURE PROSPECT
 
Embedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoringEmbedded machine learning-based road conditions and driving behavior monitoring
Embedded machine learning-based road conditions and driving behavior monitoring
 
Properties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptxProperties Railway Sleepers and Test.pptx
Properties Railway Sleepers and Test.pptx
 
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student MemberIEEE Aerospace and Electronic Systems Society as a Graduate Student Member
IEEE Aerospace and Electronic Systems Society as a Graduate Student Member
 
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
Electric vehicle and photovoltaic advanced roles in enhancing the financial p...
 
Literature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptxLiterature Review Basics and Understanding Reference Management.pptx
Literature Review Basics and Understanding Reference Management.pptx
 
Modelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdfModelagem de um CSTR com reação endotermica.pdf
Modelagem de um CSTR com reação endotermica.pdf
 
Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...Advanced control scheme of doubly fed induction generator for wind turbine us...
Advanced control scheme of doubly fed induction generator for wind turbine us...
 
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
Presentation of IEEE Slovenia CIS (Computational Intelligence Society) Chapte...
 
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdfIron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
Iron and Steel Technology Roadmap - Towards more sustainable steelmaking.pdf
 
6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)6th International Conference on Machine Learning & Applications (CMLA 2024)
6th International Conference on Machine Learning & Applications (CMLA 2024)
 
132/33KV substation case study Presentation
132/33KV substation case study Presentation132/33KV substation case study Presentation
132/33KV substation case study Presentation
 
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
ACRP 4-09 Risk Assessment Method to Support Modification of Airfield Separat...
 
22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt22CYT12-Unit-V-E Waste and its Management.ppt
22CYT12-Unit-V-E Waste and its Management.ppt
 
New techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdfNew techniques for characterising damage in rock slopes.pdf
New techniques for characterising damage in rock slopes.pdf
 
Technical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prismsTechnical Drawings introduction to drawing of prisms
Technical Drawings introduction to drawing of prisms
 
Question paper of renewable energy sources
Question paper of renewable energy sourcesQuestion paper of renewable energy sources
Question paper of renewable energy sources
 

Machine learning

  • 1. MACHINE LEARNING (USING R) SUKHWINDER SINGH ME CS A COMPUTER PROGRAM IS SAID TO LEARN FROM EXPERIENCE E WITH RESPECT TO SOME TASK TAND SOME PERFORMANCE MEASURE PIF ITS PERFORMANCE ON T, AS MEASURED BY P, IMPROVES WITH EXPERIENCE E.
  • 2. TOPIC: REGRESSION AND CLASSIFICATION • Regression :- A linear Regression is approach of modeling for finding the relation between a input variable(X) and output variable(Y). • simple linear regression: we have a single input attribute (x) and we want to use linear regression, • multiple linear regression:If we had multiple input attributes (e.g. x1, x2, x3, etc.) Model Evaluation Parameter:- r,R,RMSE,MSE,MAE,Accuracy Example:- linear model, Polynomial Regression
  • 3. LINEAR MODEL lm() • Based on training data, the learning process computes one weight for each feature to form a model that can predict or estimate the target value • formula <- as.formula(paste(target, "~", paste(c(inputs), collapse = "+"))) • Model <- lm(formula, trainDataset) Predicted <- predict(model, testDataset) • Correlation: r <- cor(Actual,Predicted ), Rsquare = R <- r * r, • RMSE <- mean(abs(Actual-Predicted)), • Accuracy <- mean(abs(Actual-Predicted)<=1) Accuracy <- round(accuracy,4) *100
  • 4. TOPIC: CLASSIFICATION • Classification is the task of approximating a mapping function (f) from input variables (X) to discrete output variables (y). • Model Evaluation parameter: Confusion matrix, • Senstivity=TP/TP+FN • Specificity=TN/TN+FP • ,Precision=TP/TP+FP • Accuracy=TP+TN/TP+TN+FN+FP • Model Support Vector Machines,Decision Trees, Neural Networks
  • 5. INFORMATION GAIN • Information gain is the difference of the information in two terms of information before splitting and information and after splitting using Entropy. Max the Information gain max the information an attribute consists. • Entropy is the sum of the probability of each label times the log probability of that same label. Decision Tree based on Information gain model <- rpart(formula, trainDataset, method="class)
  • 6. FEATURE SELECTION • Feature: It is a measurable term that play an vital role in the life of dataset. Higher the information of an attribute greater the chances of its selection. • Wrapper Method(Supervised): An approach to train system with best subset and estimate the error of the model. Several technique used in Wrapper methods are: Foreword: Start from 0 to n, Select attribute with best result. Backword: Start from bottom and eliminate them one by one till best result. Recursive feature Elimination.: Use Foreword and backword and select best outcome for your model. • Filter method(unsupervised): We have to find co-relation or some other statisitical relationship between target feature and input feature. Pearson, LDA, CHI-Square model are used to predict the best feature. • Embedded Method:it is combination of Wrapper and Filter Method. Lasso, Ridge regression model used in this.
  • 7. NEURAL NETWORK nnet() • Neural network is a system of hardware and/or software patterned after the operation of neurons in the human brain. Neural networks. • Input Layer | Hidden Layer(Processing layer) | Output layer • Activation function: wi * xi wii * xii (Weight of connection* Value of input) • Linear Activation: y=x Sigmoid Activation: y= 1 1+ⅇ−𝑥 • Foreword propagation, backword propagation • library(nnet) model<- nnet(formula, trainDataset, size=10)
  • 8. GA (GENETIC ALGORITHM) ga() • Genetic Algorithms (GAs) are search based algorithms based on the concepts of natural selection and genetics. • Population | Chromosomes | Gene | Allele • Evaluation: to check parameter • Selection: Select best parents • Crossover:Randomised parents to makes new off-spring. One point croosover | multi point crossover | uniform crossover • Mutation: New Child born from selected parents Bit Flip mutation | Swap mutation | Scramble mutation | Inverse mutation
  • 9. SVM (SUPPORT VECTOR MACHINE) ksvm() SVM is a supervised machine learning algorithm that can be employed for both classification and regression purposes. based on the idea of finding a hyperplane that best divides a dataset into two classes Hyperplane: a line that linearly separates and classifies a set of data, data points to be as far away from the hyperplane as possible Kernal: defines the similarity or a distance measure between new data and the support vectors. Linear: K(x, xi) = sum(x * xi) Polynomial: K(x,xi) = 1 + sum(x * xi)^d Radial: K(x,xi) = exp(-gamma * sum((x – xi^2)) model <- ksvm(formula, trainDataset, kernel="rbfdot")
  • 10. ENSEMBLING • Ensembling is a technique of combining two or more algorithms of similar/dissimilar types called base learners. • Averaging: It’s the average of predictions from models in case of regression problem classification problem. • Majority vote: It’s the prediction with maximum vote / recommendation from multiple models predictions while predicting the outcomes of a classification problem. • Weighted average: Different weights are applied to predictions from multiple models then taking the average which means giving high/low importance to model. • Bagging: choose ‘n’ observations or rows out of the original dataset each row is selected with replacement from the original dataset in each iteration. Boosting: First algorithm is trained on the entire dataset and the subsequent algorithms are built by fitting the residuals of the first
  • 11. CONCEPT LEARNING • : learning a category description (concept) from a set of positive and negative training It is Set of objects defined over large set. It consist of approximating Boolean values function. c:x->X A search problem for best fitting hypothesis in a hypotheses space. h is a set of constraints on attributes • An instance x satisfies an hypothesis h iff all the constraints expressed by h are satisfied by the attribute values in x. • Example 1: x1: Sunny, Warm, Normal, Strong, Warm, Same h1: Sunny, ?, ?, Strong, ?, Same Satisfies? Yes • Example 2: x2: Sunny, Warm, Normal, Strong, Warm, Same h2: Sunny, ?, ?, Ø, ?, Same Satisfies? No • Most generic <?,?,?,?,?> | most specific <∅, ∅, ∅, ∅, ∅>
  • 12. FIND S • A concept c is maximally specific if it covers all positive hypothesis • A concept c is maximally general if it does not cover any hypothesis S – set of hypothesis (candidate concepts) = maximum specific generalizations G – set of hypothesis (candidate concepts) = maximum general specializations Example: <big, red, circle>F || <small><red,circle>T Start for Gi, else there is –ve hypothesis starts from Si. S0=<?,red,circle> G1=G0 G0
  • 13. INDUCTIVE VS ANALYTICAL LEARNING • Inductive learning require a certain number of training examples to achieve a given level of generalization accuracy. Higher the number of training increase the accuracy., identify feature and distinguish them in positive/negative feature. • Ex. Decision tree, Neural network, Genetic algorithm. • Analytical learning uses the learner’s prior knowledge and deductive reasoning to analyze individual training examples, in order to discriminate the relevant features from the irrelevant. • EBL uses prior knowledge to analyze, explain each training example in order to infer which example feature are relevant to the target function and which are ir-relevent.
  • 14. INDUCTIVE VS ANALYTICAL LEARNING • The Inductive Generalization Problem Given: • Instances | Hypotheses | Target Concept | Training examples of target concept Determine: Hypotheses consistent with the training examples Hypothesis: data The Analytical Generalization Problem Given: • Instances | Hypotheses | Target Concept | Training examples of target concept | Domain theory for explaining examples • Determine: Hypotheses consistent with the training examples and the domain theory Hypothesis: domain theory
  • 15. EBL-EXPLANATION BASED LEARNING • Initialize hypothesis = {} • For each positive training example not covered by hypothesis: • 1. Explain how training example satisfies target concept, in terms of domain theory • 2. Analyze the explanation to determine the most general conditions under which this explanation (proof) holds • 3. Refine the hypothesis by adding a new rule, whose preconditions are the above conditions, and whose consequent asserts the target concept