0% found this document useful (0 votes)
32 views1 page

Inverse

The document discusses various machine learning concepts like clustering, k-means clustering, cost functions, and gradient descent. Clustering involves grouping similar data points and finding patterns in each group. K-means clustering partitions observations into k clusters where each observation belongs to the cluster with the nearest mean. A cost function measures the success of a model by calculating the difference between predicted and actual values, and gradient descent is used to minimize this cost function during training by adjusting weights in the direction of the negative gradient.

Uploaded by

farida1971yasmin
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)
32 views1 page

Inverse

The document discusses various machine learning concepts like clustering, k-means clustering, cost functions, and gradient descent. Clustering involves grouping similar data points and finding patterns in each group. K-means clustering partitions observations into k clusters where each observation belongs to the cluster with the nearest mean. A cost function measures the success of a model by calculating the difference between predicted and actual values, and gradient descent is used to minimize this cost function during training by adjusting weights in the direction of the negative gradient.

Uploaded by

farida1971yasmin
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/ 1

Clustering: Clustering involves grouping sets of similar data (based on defined criteria).

It’s Explain linear regression in term of cost function.


useful for segmenting data into several groups and performing analysis on each data set to A cost function is a formula that calculates the result of a
find patterns. Clustering is the task of dividing the population or data points into a number of particular mathematical operation. It may be used to
groups such that data points in the same groups are more similar to other data points in the evaluate the performance of a machine – learning
same group and dissimilar to the data points in other groups. It is basically a collection of algorithm.
objects on the basis of similarity and dissimilarity between them. A cost function is away of measuring the success of an
ML project. It is a numeric value that indicates the
K-means clustering algorithm – It is the simplest unsupervised learning algorithm that success or failure of a particular model without needing
solves clustering problem. K-means algorithm partitions n observations into k clusters to understand the inner workings of a model.
where each observation belongs to the cluster with the nearest mean serving as a prototype Let us first understand the linear Regression Suppose
of the cluster. we have a data set here, and this is a housing data set
wherein there are two columns the size of the House and
What is the cost function? A cost function is a way of measuring the success of an ML project.
the price of the House in INR, and these dots are the data
It is a numeric value that indicates the success or failure of a particular model without
points from the data set, and now we also call them as
needing to understand the inner workings of a model. This is useful in many situations, such
training data.
as when an engineer wants to know if the cost of building a model is worth it. Also, they can
variable (Price of House), X denotes the size of the
use a cost function if they want to compare different models or versions of the same model.
House and a 0 is the intercept. The linear regression
In any case, where it’s essential to know if a project was successful or not, cost functions can
model will fit a straight line to our data, as shown in fig,
be beneficial.
and it will tell us what is the price of the House when we
Why is the cost function needed? Basically, our machine learning model predicts the new
know the size of the House. Suppose this housing
value. We aim to have the predicted value as close as possible to the predicted value. If the
company sells houses having areas under 600 to 1500
model predicts the value close to the actual value, then we will say it’s a good model. So here
square feet. So the prices will vary according to the size
is where cost function plays an important role. This cost function is needed to calculate the
of the plot.
difference between actual and predicted values. So here it is nothing, just the difference
between the actual values-predicted values. K-Medoids: K-medoids clustering is a variant of K-
A gradient is nothing but a derivative that defines the effects on outputs of the function with means that is more robust to noises and outliers.
a little bit of variation in inputs. Instead of using the mean point as the center of a
Gradient Descent (GD) is a widely used optimization algorithm in deep learning that is used cluster, K-medoids uses an actual point in the cluster to
to minimize the cost function of a neural network model during training. It works by represent it. Medoid is the most centrally located
iteratively adjusting the weights or parameters of the model in the direction of the negative object of the cluster, with minimum sum of distances to
gradient of the cost function until the minimum of the cost function is reached. other points.
How the Gradient Descent algorithm works: Self-organize map: Lending- Identifying clusters of
For the sake of complexity, we can write our loss function for the single row as below borrowers for potential default sinre-payments.
Customer Segmentation- Customers with similar
In the above function characteristics can be clustered to gather for further
x and y are our input data i.e constant. To find the optimal value of weight w and bias b. we analysis like churn rate, loyalty, promotions etc.
partially differentiate with respect to w and b. This is also said that we will find the gradient A Gaussian mixture model can be used for clustering,
of loss function J(w,b) with respect to w and b to find the optimal value of w and b. which is the task of grouping a set of data points into
clusters. GMMs can be used to find clusters in data sets
What is Singular Matrix? Describe the causes and the solution.
where the clusters may not be clearly defined.
A singular matrix is a square matrix if its determinant is 0. i.e., a square matrix A is singular if Additionally, GMMs can be used to estimate the
and only if det A = 0. We know that the inverse of a matrix A is found using the formula A-1 probability that a new data point belongs to each
= (adj A) / (det A). Here det A (the determinant of A) is in the denominator. We are aware cluster.
that a fraction is NOT defined if its denominator is 0. Hence A-1 is NOT defined when det A = Hard clustering is method to grouping the data items
0. i.e., the inverse of a singular matrix is NOT defined. i.e., there does not exist any matrix B such that each item is only assigned to one cluster, K-
such that AB = BA = I (where I is the identity matrix). Means is one of them.
While Soft clustering is method to grouping the data
From the above explanation, a square matrix 'A' is said to be singular if
items such that an item can exist in multiple clusters,
det A = 0 (which is also written as |A| = 0) (or) A-1 is NOT defined (i.e., A is non-invertible). Fuzzy C-Means (FCM) is an example.

Here are some singular matrix properties based upon its definition.
Supervised machine learning turns data into real,
Every singular matrix is a square matrix.
actionable insights. It enables organizations to use data
The determinant of a singular matrix is 0.
to understand and prevent unwanted outcomes or boost
The inverse of a singular matrix is NOT defined and hence it is non-invertible.
desired outcomes for their target variable.
if any two rows or any two columns are identical, then its det is 0 and hence its a singular
Supervised Machine Learning Applications
matrix.
Predictive analytics (house prices, stock exchange
if all the elements of a row or column are zeros, then its determinant is 0 and hence it is a
prices, etc.)
singular matrix.
Text recognition
if one of the rows (columns) is a scalar multiple of the other row (column) then the
Spam detection
determinant is 0 and hence it is a singular matrix.
Customer sentiment analysis
A null matrix of any order is a singular matrix. The rank of a singular matrix is definitely less
Object detection (e.g. face detection)
than the order of the matrix. For example, the rank of a 3x3 matrix is less than 3.
All rows and columns of a singular matrix are NOT linearly independent.

Under the umbrella of supervised learning fall: Classification, Regression and


Forecasting.
Classification: In classification tasks, the machine learning program must draw
a conclusion from observed values and determine to what category new
observations belong. For example, when filtering emails as ‘spam’ or ‘not
spam’, the program must look at existing observational data and filter the
emails accordingly.
Regression: In regression tasks, the machine learning program must estimate –
and understand – the relationships among variables. Regression analysis
focuses on one dependent variable and a series of other changing variables –
making it particularly useful for prediction and forecasting.
Forecasting: Forecasting is the process of making predictions about the future
based on the past and present data, and is commonly used to analyze trends.

You might also like