Machine Learning

 




Outline of Machine learning - ML

1) Introduction of Machine Learning
2) What is ML , Types of ML . Python packages used in ML
3) Supervised learning
4) Regression and Application of ML
5) Classification and Applications
6) Unsupervised algorithum
7) Recommended system






ML replicates human behaviour.


Features of ML includes

1) supervised learning
2) Regression 
3) Unsupervised learning
4) Recommended system

With the help of demo, hand-on excercise and spotlight videos you will be able to understand the whole concept of ML

ML is basically an algorithum of supervised learning which prepares the data . Clusters and associated algo helps in the functioning of "how recommended engine works "?
ML was introduced in the year 1959 to replicate the human behaviour for making the intelligent system that can work automatically based on input or fed data.

Machine Learning = Algorithum 

Deep Learning = Neural network

Artificial intelligence used ML and DL  to solve the problem in hand

classified data + Predictive tool ==> generate next move

ML algo helps to predict and classify and improve performance of sofware application.

Uses of  ML : 

1) Make weather forcasting
2) Traffic rules
3) E-mail degradation
4) farming

ML is basically dependent on DATA

Performance of algo is evaluated based on the quality of the input data

Types of ML

1) Algo - Self trained
2) Algo - Identify pattern

Algorithum could be :

1) Supervised
2) Unsupervised
3) Re-inforcement

Supervised Learining

1) Classification
2) Regression


Unsupervised learning means some hidden pattern and relationship exist between the entitities. This helps in identifying the anomalies based on some common languages or commands

Reiforcement learining ==> interprets rewards based on  the algo when it find the correct solution . if output is not proper the algo reiterates itslef to find a better result. Example youtube video recommends Games, plays and autocorrect options.

ML Model

Data extraction , raw data input preprocesses features , output, model training , predict deployement.

Iterative pipeline

MLOP - Machine learing operations is the set of practices that combines ML + Data Engineering = Devops aims to improve communication between ML and operations, shorten and manage cyclic process.

MLOPs consist of 3 phases :

1) Designing
2) Model Dev - Includes applicability of ML for the problem verified by the proof of concept.
3) Operations -  Deleivers the develped ML model in production

Tools used for MLOP are

* Kubeflow
*MLFlow
* DVC - Data version control
* Pachyderm metaflow
* Kedro
* seldom care

CI - Continuous improvement
CD - Continuous deleivery

CI & CD system is used to test and deploy system help in supportng in business enviroment

AutoML involves in building and deployment of system based on predefined templates, framwork and process to speed upt the time to completion , enhance function of ML model.


Tools for  AutoML :

1) Run AI 
2) Auto keras
3)H2O autoML, SMAC, Autoweka
4) Auto SKlearn, Auto pytorich
5) Robo

Python packages or Libraries  used in ML : Numpy, Pandas, Tensor flow , Matplotlib , assara, scipy, keras, Pytorch, scikit-learn.

Numpy and pandas helps to manage preparation , loading and manupulation of data. Tensor flow and aesare is used for the fast  numerical computing. Matplotlib is used to plot the data. scipy is used to solve mathmatical equation and algorithum. Scikit is used to provide efficient version of common algo to develop ML models. Keras makes the implementation of neural network easy. While pytorch specilizes in deep learining applications and accelerates the path from prototyping to deployment. 

Google colab is a setup of coding environment on local machine such as laptop / desktop or cloud solution.

Cloud solutions enables to run Python notebooks on browser using the GCP (Google cloud platform)

Google colab is used only for research and learing not commercial purpose. To code on local machine use official documents to ensure that the device specification suits the python package requirements. Goolge colab is sued to run ML. ML replicates human behaviour.


Python can be used to easily perform complex tasks and build ML models and to repidly build the Python prototypes.

why go for Python

As Python is easy to use , code readability , open source community, OOPS oriented.

What is a Python package 

Python package  = folder / module  / building block

a module is a pre-written code which is imported.

Python packages from different libraries are used to build ML models to work faster.

Key points

ML is the ability of a machine to learn from and replicate human behaviour
ML refers to algorithum that learn and perform based on the input data.
DL - Deep learning refers to layers of neural networks.
DL is built with ML algorithum to solve complex problems.
 Machine learning pipeline includes  ==> Data preparation ==> Feature extaction ==> model training ==> test data ==> mode ==> predictions

2. Supervised learning : In this machine are trained with labelled data as input. ML model identify patterns and methods ==> learn from them ==> predicts output

if any prediction is incorrect an operator knows to correct it.
 Process continues untill algorithum achieves the highest accuracy.

Supervised learning algo includes : linear and logistic regression , multi-class classification, decision tree and support vector machines.


Supervised learning is used to detect :

Forest fires
oil and gas tragedies
Shipping fires 
building fires

The training data to create a classification model for fire incident detection includes :

1) outcome  labelled as fire incident or not
2) rate of increase of speed
3) temerature
4) smoke levels
5) areas spread of fire.


Training data can eliminate false positives like cooking fire or a campfire

Training model helps fire departments classify levels of incidents. allows fire department to recognize and classify real life situations and dispatch sufficient resources.

supervised learing algorithum is of two types such as :

1) Classfication 
2) Regression

classification algorithum segregates data into two  or more categories. with one or more inputs, classificaton model predicts the value of one or more outcomes.
Example : Classification model used to segregate the emails into spam or ham. The model examines the data to find patterns and methods to determine wheather email is ham or spam.

On the other hand Regressiion algorithum establishes the relationship between input and output variables They are suitable for the situations where the output variable is a real or continuous value. A regression algorithum is best used to forecast or predict the value of the stock market.

Supervised learning is a type of machine learning where the  input data and output data are provided.
Machines are trained with labelled data as input. ML model identify :

1. Pattern and methods
2. learn from user
3. predicts output

if any prdiction is incorrect an operator knows to correct it.

The process continues algorithum achieves the highest accuracy. Supervised ML algo includes linear logistics regression, decison tree, multiclass classification and support vector machines.


Labelled data + labels + Machine ==> ML Model + Test data ==> Predictions

Industrial illustration of a model to determine if an incident is a fire incident or not.

training data + Feature extraction ==> ML classifier + Test data ==> Predictions

overfitting term basically defines how ML models are learning and applying whay they learned.

What is bias in ML? 

bias = error in the model

high bias is a big difference between the actual and predicted values. this is not good for a model.
while low bias indicates that the difference between the actual and predicted values is low.

Qs What is Variance in ML?

Variance indicates how scattered data is .
high variance indicates more scattered data and low variance indicates less scattered data.

Qs What is overfitting?

overfit indicates a low bias and high variance in the data.

overfitting happens when a model focuses on too many details in the training dataset to the extent that it has a negative impact on the performance of the model on a new dataset.

for example if you trained a ML model which predicts only -2 degree climate change in considered overfit. The model will not consider any other temperature and will not predict correctly.
underfit is high bias and high variance in the data it is said to be underfit. underfitting is easily detactable as id exhibit poor performance on the training dataset.
 
a Model is underfit if it it is trained with limited features like temperature and wind speed. if the model will  not encounter other climate conditions like rain or snow it will be able to detect patterns so if a model performs well on training data and testing data it is a good model.

model + performed well on training data ==> yes ==> performed well on testing data ==> yes ==> Good model.

if model performs well with training dat but not with testing data it is overfit

model + performed well on training data ==> yes ==> performed well on testing data ==> No==> Overfit.


if a model does n ot perform well on both training and testing data it is underfit


model + performed well on training data ==> No ==> performed well on testing data ==> No==> Underfit.























No comments:

Post a Comment

If you have any query or doubt, please let me know. I will try my level best to resolve the same at earliest.

Resources That will Make You Better at IT, Education and specifically in Digital Marketing.: Build career in Medical coding in 2021

Resources That will Make You Better at IT, Education and specifically in Digital Marketing.: Build career in Medical coding in 2021 :  As He...