Anuranan Das Summer of Sciences, 2019. Understanding and Implementing Machine Learning
Anuranan Das Summer of Sciences, 2019. Understanding and Implementing Machine Learning
Anuranan Das Summer of Sciences, 2019. Understanding and Implementing Machine Learning
Summer Of Sciences,2019.
Truly indeed, since the invention and intervention of computers into daily life,
mankind can be said to have made considerable progress. One of the most
interesting features of machine learning is that it lies on the boundary of several
different academic disciplines, principally computer science, statistics,
mathematics, and engineering. …machine learning is usually studied as part of
artificial intelligence, which puts it firmly into computer science …understanding
why these algorithms work requires a certain amount of statistical and
mathematical sophistication. In one line, we can aptly say that
The following picture gives a clear indication of the various parts discussed in
machine learning.
As clear from the illustration, Machine learning can be broadly divided into three
parts:
Supervised Learning:
1. Prediction
2. Classification
Unsupervised learning:
1. Clustering
Reinforcement Learning
Supervised Learning:
In Supervised Learning, algorithms learn from labeled data. After understanding
the data, the algorithm determines which label should be given to new data based
on pattern and associating the patterns to the unlabeled new data.
eg: Spam Detection, Churn Prediction, Sentiment Analysis, Dog Breed Detection.
Classification:
Classification is a technique for determining class the dependent belongs to based
on the one or more independent variables.
The function g(z), shown here, maps any real number to the (0, 1) interval, making
it useful for transforming an arbitrary-valued function into a function better
suited for classification, also, as y∞, p1 and for y-∞, p0. So we have
mapped all real into a function giving output range (0,1).
The cost function usually used for this case is given by,
If our correct answer 'y' is 0, then the cost function will be 0 if our hypothesis
function also outputs 0. If our hypothesis approaches 1, then the cost function
will approach infinity.
2.Gaussian Kernel:
After applying K-means algorithm and classification we may get different groups
as:
But only difference in clustering for supervised and unsupervised learning is that in
supervised learning we know definitely what the groups mean(they are labeled)
usually but in case of unsupervised learning we just find clusters in the data later to
find what are the similarities meant to be.
Finding the parameter vector theta: To find the optimal value of the parameters, we
need to minimize the error in the prediction. Intuitively, the closer that the
regression output values are to the expected outputs (given in the training
data), the better the regression is. Now, to measure the magnitude of error
a number of functions are used which are most commonly known as cost
function like L1 norm,L2 norm etc. We usually use L2 norm or more
common, Method of least squares:
With our target to minimize J(θ) and find the considerate values of parameter θ.
Algorithms for finding parameters: Although there are more advanced
optimization methods, they’re mostly rooted in gradient descent. It is the
foundation for training neural nets.
For linear regression, LMS is used usually and the form is given by
For logistic regression however the cross entropy cost function is used.
So in that case:
Pros:
o It works really well with clear margin of separation
o It is effective in high dimensional spaces.
o It is effective in cases where number of dimensions is greater than
the number of samples.
o It uses a subset of training points in the decision function (called
support vectors), so it is also memory efficient.
Cons:
o It doesn’t perform well, when we have large data set because the
required training time is higher
o It also doesn’t perform very well, when the data set has more noise
i.e. target classes are overlapping
o SVM doesn’t directly provide probability estimates, these are
calculated using an expensive five-fold cross-validation. It is related
SVC method of Python scikit-learn library.
The aim of this step is to standardize the range of the continuous initial variables so
that each one of them contributes equally to the analysis.
Mathematically, this can be done by subtracting the mean and dividing by the
standard deviation for each value of each variable.
Once the standardization is done, all the variables will be transformed to the same
scale.
Reinforcement Learning :
In fact, there should be no clear divide between machine learning, deep learning
and reinforcement learning. It is like a parallelogram – rectangle – square relation,
where machine learning is the broadest category and the deep reinforcement
learning the narrowest one.
Although the ideas seem to differ, there is no sharp divide between these
subtypes. Moreover, they merge within projects, as the models are designed not
to stick to a “pure type” but to perform the task in the most effective way
possible.
We are summing reward function r over t, which stands for time steps. So this
objective function calculates all the reward we could obtain by running
through, say, a game. Here, x is the state at a given time step, and a is the
action taken in that state. r is the reward function for x and a.
Footnote:
The correct analogy may actually be that a learning algorithm is like a species. Each simulation the
algorithm runs as it learns could be considered an individual of the species. Just as knowledge from the
algorithm’s runs through the game is collected in the algorithm’s model of the world, the individual
humans of any group will report back via language, allowing the collective’s model of the world,
embodied in its texts, records and oral traditions, to become more intelligent (At least in the ideal case.
The subversion and noise introduced into our collective models is a topic for another post, and probably
for another website entirely.). This puts a finer point on why the contest between algorithms and
individual humans, even when the humans are world champions, is unfair. We are pitting a civilization
that has accumulated the wisdom of 10,000 lives against a single sack of flesh.
References: