0% found this document useful (0 votes)
96 views

Explain in Detail Different Types of Machine Learning Models?

The document discusses different types of machine learning models including supervised, unsupervised, semi-supervised, and reinforcement learning. It then provides details on binary classification, geometric modeling, feature construction and transformation, and performing regression with an example.

Uploaded by

Sirisha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
96 views

Explain in Detail Different Types of Machine Learning Models?

The document discusses different types of machine learning models including supervised, unsupervised, semi-supervised, and reinforcement learning. It then provides details on binary classification, geometric modeling, feature construction and transformation, and performing regression with an example.

Uploaded by

Sirisha
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

ML MID1

Explain in detail different types of Machine Learning models?


Based on the methods and way of learning, machine learning is divided into mainly four types,
which are:
1. Supervised Machine Learning
2. Unsupervised Machine Learning
3. Semi-Supervised Machine Learning
4. Reinforcement Learning

1.Supervised Machine Learning


The main goal of the supervised learning technique is to map the input variable(x) with the
output variable(y). Some real-world applications of supervised learning are Risk Assessment,
Fraud Detection, Spam filtering, etc.
Categories of Supervised Machine Learning
Supervised machine learning can be classified into two types of problems, which are given
below:
o Classification
o Regression
2. Unsupervised Machine Learning
Unsupervised learning is different from the Supervised learning technique; as its name suggests,
there is no need for supervision. It means, in unsupervised machine learning, the machine is
trained using the unlabeled dataset, and the machine predicts the output without any supervision.
Categories of Unsupervised Machine Learning
Unsupervised Learning can be further classified into two types, which are given below:
o Clustering
o Association
3. Semi-Supervised Learning
Semi-Supervised learning is a type of Machine Learning algorithm that lies between Supervised
and Unsupervised machine learning. It represents the intermediate ground between Supervised
(With Labelled training data) and Unsupervised learning (with no labelled training data)
algorithms and uses the combination of labelled and unlabeled datasets during the training
period.
4. Reinforcement Learning
Reinforcement learning works on a feedback-based process, in which an AI agent (A
software component) automatically explore its surrounding by hitting & trail, taking
action, learning from experiences, and improving its performance. Agent gets rewarded for
each good action and get punished for each bad action; hence the goal of reinforcement learning
agent is to maximize the rewards.
Due to its way of working, reinforcement learning is employed in different fields such as Game
theory, Operation Research, Information theory, multi-agent systems.

Explain about binary classification and related tasks.


Binary classification
A supervised machine learning task that is used to predict which of two classes (categories) an
instance of data belongs to. The input of a classification algorithm is a set of labeled examples,
where each label is an integer of either 0 or 1. The output of a binary classification algorithm is a
classifier, which you can use to predict the class of new unlabeled instances. Examples of binary
classification scenarios include:
• Understanding sentiment of Twitter comments as either "positive" or "negative".
• Diagnosing whether a patient has a certain disease or not.
• Making a decision to mark an email as "spam" or not.
• Determining if a photo contains a particular item or not, such as a dog or fruit.
Binary classification inputs and outputs

For best results with binary classification, the training data should be balanced (that is, equal
numbers of positive and negative training data). Missing values should be handled before
training.

The input label column data must be Boolean. The input features column data must be a fixed-
size vector of Single.

These trainers output the following columns:

Output Column Column Description


Name Type
Score Single The raw score that was calculated by the model
PredictedLabel Boolean The predicted label, based on the sign of the score. A negative score maps
to false and a positive score maps to true.

Explain in detail about geometric model.


Geometric Modeling
The culture of design & manufacturing incorporates various crucial aspects for the production of
a market efficient product. Computer-aided Engineering or CAE comes up as a central part of
the entire manufacturing process. Over the years, the function of CAE has evolved so much that
it has developed its applications depending upon the type of usage and execution. Geometric
Modeling happens to be one of the most popular CAE applications.
The computer/software generated mathematical representation of an object’s geometry is called
Geometric Modeling. As curves are easy to manipulate and bend as per application, geometric
modeling uses curves extensively to construct surfaces. The formation of curves can be achieved
by,
A set of points,
Analytic functions, or
Other curves/functions
The mathematical representation of an object can be displayed on a computer and used for
generation of drawings; which go on for analysis and eventual manufacturing of the object. In
general, there are three conventional steps to create a geometric model:
• Creating key geometric elements by using commands like points, lines, and circles.
• Applying Transformations on the geometric elements using commands like rotation,
achieve scaling, and other related transformations functions.
• Constructing the geometric model using various commands that integrates the elements
of the geometric model to form the desired shape.
REPRESENTAION OF GEOMETRIC MODELS
• Two Dimensional or 2D: It projects a two-dimensional view and is used for flat objects.
• 1 2D: It projects the views beyond the 2D and enables viewing of 3D objects that have no
sidewall details.
• Three Dimensional or 3D: This representation permits complete three-dimensional
viewing of the model with intricate geometry. The most leading process of geometric
modeling in 3D is Solid modeling.
TYPES OF GEOMETRIC MODELINGS
Depending upon the representations of objects, geometric modeling system can be classified into
three categories, which are:
• Solid modeling
• Wireframe modeling
• Surface modeling
Describe Feature Construction and Transformation of Machine learning
Feature Construction: The manual construction of new features from raw data
The best results come down to you, the practitioner, crafting the features.
Feature importance and selection can inform you about the objective utility of features, but those
features have to come from somewhere.
You need to manually create them. This requires spending a lot of time with actual sample data
(not aggregates) and thinking about the underlying form of the problem, structures in the data
and how best to expose them to predictive modeling algorithms.
With tabular data, it often means a mixture of aggregating or combining features to create new
features, and decomposing or splitting features to create new features.
With textual data, it often means devising document or context specific indicators relevant to the
problem. With image data, it can often mean enormous amounts of time prescribing automatic
filters to pick out relevant structures.
This is the part of feature engineering that is often talked the most about as an artform, the part
that is attributed the importance and signalled as the differentiator in competitive machine
learning.
Feature Transformation
Feature transformation is simply a function that transforms features from one representation to
another. But why would we transform our features? Well there are many reasons, such as:
1. data types are not suitable to be fed into a machine learning algorithm, e.g. text,
categories
2. feature values may cause problems during the learning process, e.g. data represented in
different scales
3. we want to reduce the number of features to plot and visualize data, speed up training or
improve the accuracy of a specific model
In this article we will focus on three main transformation techniques:
• Handling categorical variables
• Feature scaling
• Principal Component Analysis
Demonstrate how to perform Regression with an Example
In statistical modeling, regression analysis is a set of statistical processes for estimating the
relationships between a dependent variable (often called the 'outcome' or 'response' variable) and
one or more independent variables (often called 'predictors', 'covariates', 'explanatory variables'
or 'features'). The most common form of regression analysis is linear regression, in which one
finds the line (or a more complex linear combination) that most closely fits the data according to
a specific mathematical criterion.
How does it work?
In order to conduct a regression analysis, you gather the data on the variables in question.
You take all of your monthly sales numbers for, say, the past three years and any data on the
independent variables you’re interested in. So, in this case, let’s say you find out the average
monthly rainfall for the past three years as well. Then you plot all of that information on a chart
that looks like this:
The y-axis is the amount of sales (the dependent variable, the thing you’re interested in, is
always on the y-axis) and the x-axis is the total rainfall. Each blue dot represents one month’s
data—how much it rained that month and how many sales you made that same month.
Now imagine drawing a line through the chart above, one that runs roughly through the middle
of all the data points. This line will help you answer, with some degree of certainty, how much
you typically sell when it rains a certain amount.

This is called the regression line and it’s drawn (using a statistics program like SPSS or STATA
or even Excel) to show the line that best fits the data. In other words, explains Redman, “The red
line is the best explanation of the relationship between the independent variable and dependent
variable.”
In addition to drawing the line, your statistics program also outputs a formula that explains the
slope of the line and looks something like this:
Y= mx + c + error
Illustrate how to handle more than two classes in beyond Binary Classification.
Handling more than two classes
Certain concepts are fundamentally binary. For instance, the notion of a coverage curve does not
easily generalise to more than two classes. We will now consider general issues related to having
more than two classes in classification, scoring and class probability estimation. The discussion
will address two issues: how to evaluate multi-class performance, and how to build multi-class
models out of binary models. The latter is necessary for some models, such as linear classifiers,
that are primarily designed to separate two classes. Other models, including decision trees,
handle any number of classes quite naturally.
Multi-class classification
Classification tasks with more than two classes are very common. For instance, once a patient
has been diagnosed as suffering from a rheumatic disease, the doctor will want to classify him or
her further into one of several variants. If we have k classes, performance of a classifier can be
assessed using a k-by-k contingency table. Assessing performance is easy if we are interested in
the classifier's accuracy, which is still the sum of the descending diagonal of the contingency
table, divided by the number of test instances.
Examples of multi-class classification are
• classification of news in different categories,
• classifying books according to the subject,
• classifying students according to their streams etc.

In these, there are different classes for the response variable to be classified in and thus
according to the name, it is a Multi-class classification.
Illustrate the following
a. One-versus-one voting.
One vs. One (OvO)

Figure 10: Photo via ScienceDirect.com

In One-vs-One classification, for the N-class instances dataset, we have to generate the N* (N-

1)/2 binary classifier models. Using this classification approach, we split the primary dataset into

one dataset for each class opposite to every other class.

Taking the above example, we have a classification problem having three types: Green, Blue,

and Red (N=3).

We divide this problem into N* (N-1)/2 = 3 binary classifier problems:


• Classifier 1: Green vs. Blue

• Classifier 2: Green vs. Red

• Classifier 3: Blue vs. Red

Each binary classifier predicts one class label. When we input the test data to the classifier, then

the model with the majority counts is concluded as a result.

b. Loss based decoding.

c. Coverage counts as scores.


Illustrate the following
i. Most general consistent hypothesis
A hypothesis, h, is a most general hypothesis if it covers none of the negative examples and there
is no other hypothesis h′ that covers no negative examples, such that h is strictly more specific
than h′.

ii. Closed concepts in path through the hypothesis


Concept Learning:
Acquiring the definition of a general category from given sample positive and negative training
examples of the category.
• Concept Learning can seen as a problem of searching through a predefined space of potential
hypotheses for the hypothesis that best fits the training examples.
• The hypothesis space has a general-to-specific ordering of hypotheses, and the search can be
efficiently organized by taking advantage of a naturally occurring structure over the hypothesis
space.
A Formal Definition for Concept Learning: Inferring a boolean-valued function from training
examples of its input and output.
• An example for concept-learning is the learning of bird-concept from the given examples of
birds (positive examples) and non-birds (negative examples)

Demonstrate the application of a Decision Tree with an example.


Decision Trees are a type of Supervised Machine Learning (that is you explain what the input is
and what the corresponding output is in the training data) where the data is continuously split
according to a certain parameter. The tree can be explained by two entities, namely decision
nodes and leaves. The leaves are the decisions or the final outcomes. And the decision nodes are

where the data is split.


An example of a decision tree can be explained using above binary tree. Let’s say you want to
predict whether a person is fit given their information like age, eating habit, and physical
activity, etc. The decision nodes here are questions like ‘What’s the age?’, ‘Does he exercise?’,
‘Does he eat a lot of pizzas’? And the leaves, which are outcomes like either ‘fit’, or ‘unfit’. In
this case this was a binary classification problem (a yes no type problem).

Illustrate First-Order rule learning in detail.


First-Order Logic:
All expressions in first-order logic are composed of the following attributes:
1. constants — e.g. tyler, 23, a
2. variables — e.g. A, B, C
3. predicate symbols — e.g. male, father (True or False values only)
4. function symbols — e.g. age (can take on any constant as a value)
5. connectives — e.g. ∧, ∨, ¬, →, ←
6. quantifiers — e.g. ∀, ∃
Term: It can be defined as any constant, variable or function applied to any term. e.g. age(bob)
Literal: It can be defined as any predicate or negated predicate applied to any terms. e.g.
female(sue), father(X, Y)
It has 3 types:
• Ground Literal — a literal that contains no variables. e.g. female(sue)
• Positive Literal — a literal that does not contain a negated predicate. e.g. female(sue)
• Negative Literal — a literal that contains a negated predicate. e.g. father(X,Y)
Clause – It can be defined as any disjunction of literals whose variables are universally
quantified.

where,

M1, M2, ...,Mn --> literals (with variables universally quantified)


V --> Disjunction (logical OR)
Horn clause — It can be defined as any clause containing exactly one positive literal.

Then the horn clause can be written as

where,
H --> Horn Clause
L1,L2,...,Ln --> Literals

(A ⇠ B) --> can be read as 'if B then A' [Inductive Logic]

and

∧ --> Conjunction (logical AND)


∨ --> Disjunction (logical OR)
¬ --> Logical NOT
First Order Inductive Learner (FOIL)
In machine learning, first-order inductive learner (FOIL) is a rule-based learning algorithm. It
is a natural extension of SEQUENTIAL-COVERING and LEARN-ONE-RULE algorithms. It
follows a Greedy approach.
Inductive Learning:
Inductive learning analyzing and understanding the evidence and then using it to determine the
outcome. It is based on Inductive Logic.

Illustrate Rule set for Ranking and Probability estimation


Demonstrate descriptive rule learning.
Descriptive Rule Discovery In descriptive rule discovery, the key emphasis lies on finding rules
that describe patterns and regularities that can be observed in a given dataset. In contrast to
predictive rule learning , the focus lies on finding individual rules. Consequently, evaluation does
typically not focus on predictive performance, but on the statistical validity of the found rules.
Predominant in the literature are two main tasks, namely subgroup discovery, where a given
property of interest is analyzed (supervised learning), and association rule discovery, where
arbitrary dependencies between attributes can be considered (unsupervised learning).
Subgroup Discovery
The task of subgroup discovery was defined as follows: Given a population of individuals and a
property of those individuals that we are interested in, find population subgroups that are
statistically ‘most interesting’, e.g., are as large as possible and have the most unusual statistical
(distributional) characteristics with respect to the property of interest. Thus, a subgroup may be
considered as an IF-THEN rule that relates a set of independent variables to a target variable of
interest. The condition of the rule (the rule body or antecedent) typically consists of a
conjunction of Boolean terms, so-called features, each one constituting a constraint that needs to
be satisfied by an example. If all constraints are satisfied, the rule is said to fire, and the example
is said to be covered by the rule. The rule head (also called the consequent or conclusion)
consists of a single class value, which is predicted in case the rule fires. In the simplest case, this
is a binary target class c, and we want to find one or more rules that are predictive for this class.

You might also like