Python UNIT-5
Python UNIT-5
Python UNIT-5
UNIT-5
Supervised learning
Unsupervised learning
Reinforcement learning
Supervised learning
Supervised learning is the types of machine learning in which
machines are trained using well "labelled" training data, and on
basis of that data, machines predict the output. The labelled data
means some input data is already tagged with the correct output.
In supervised learning, the training data provided to the machines work
as the supervisor that teaches the machines to predict the output
correctly. It applies the same concept as a student learns in the
supervision of the teacher.
Supervised learning is a process of providing input data as well as
correct output data to the machine learning model. The aim of a
supervised learning algorithm is to find a mapping function to map
the input variable(x) with the output variable(y).
In the real-world, supervised learning can be used for Risk Assessment,
Image classification, Fraud Detection, spam filtering, etc.
1. Regression
Regression algorithms are used if there is a relationship between
the input variable and the output variable. It is used for the
prediction of continuous variables, such as Weather forecasting,
Market Trends, etc. Below are some popular Regression
algorithms which come under supervised learning:
Linear Regression
Regression Trees
Non-Linear Regression
Polynomial Regression
2. Classification
Spam Filtering,
Random Forest
Decision Trees
Logistic Regression
K-means clustering
KNN (k-nearest neighbors)
Hierarchal clustering
Anomaly detection
Neural Networks
Apriori algorithm
Policy-based:
Policy-based approach is to find the optimal policy for the maximum future
rewards without using the value function. In this approach, the agent tries to
apply such a policy that the action performed in each step helps to maximize
the future reward.
The policy-based approach has mainly two types of policy:
Deterministic: The same action is produced by the policy (π) at any state.
Stochastic: In this policy, probability determines the produced action.
Policy
Reward Signal
Value Function
Firstly, it trains the model with less amount of training data similar to the
supervised learning models. The training continues until the model gives
accurate results.
The algorithms use the unlabeled dataset with pseudo labels in the next step,
and now the result may not be accurate.
Now, the labels from labeled training data and pseudo labels data are linked
together.
The input data in labeled training data and unlabeled training data are also
linked.
In the end, again train the model with the new combined input as did in the
first step. It will reduce errors and improve the accuracy of the model.
DIFFERENCE BETWEEN SEMI-SUPERVISED AND
REINFORCEMENT LEARNING.
The two steps that you have seen till now are important to learn
about signals. Now, this step will be useful if you want to
generate the audio signal with some predefined parameters. Note
that this step will save the audio signal in an output file.
Feature Extraction from Speech: This is the most important step
in building a speech recognizer because after converting the
speech signal into the frequency domain, we must convert it into
the usable form of feature vector. We can use different feature
extraction techniques like MFCC, PLP, PLP-RASTA etc. for this
purpose.
Recognition of Spoken Words: Speech recognition means that
when humans are speaking, a machine understands it. Here we
are using Google Speech API in Python to make it happen. We
need to install the following packages for this −
Pyaudio − It can be installed by using pip install Pyaudio
command.
SpeechRecognition − This package can be installed by using pip
install SpeechRecognition.
Google-Speech-API − It can be installed by using the command
pip install google-api-python-client.
APPLICATION OF MACHINE LEARNING IN MEDICAL
DIAGNOSIS
In medicine, the broad spectrum of algorithms, statistics, and
machine learning AI is constantly increasing. We want to
concentrate on machine learning for medical diagnosis. Yet, in
other areas of healthcare science, this great technology can also be
used. Amongst others, the list of medical machine learning
applications includes:
Drug development.
Learning the symptoms, solutions, and recovery methods, AI can
be vital in designing and manufacturing drugs. It may also help
shorten the time needed to present a new drug on the market.
Organizing health records: Well-sorted info on health issues, drugs,
treatment, and other records is vital in any organized institution.
Keeping up-to-date facts and figures shortens the processing time
when quick and on-point medical decisions are needed.
In many cases around the world, the use of machine learning is still
limited. Physicians do not always completely rely on AI, rather
considering it as an addition to their diagnosis. Yet, the truth is that
machine learning needs to be used more often. Why? Well, to keep
on learning. Through gathering information of symptoms and
diseases it can constantly develop new efficient solutions.
Linear Models
LogisticRegression
Support Vector Machines
Non-linear Models
K-Nearest Neighbours
Kernel SVM
Naïve Bayes
Decision Tree Classification
Random Forest Classification
Clustering or cluster analysis is a machine learning technique,
which groups the unlabelled dataset. It can be defined as "A way
of grouping the data points into different clusters, consisting of
similar data points. The objects with the possible similarities
remain in a group that has less or no similarities with another
group."
Image segmentation