Machine Learning QNA
Machine Learning QNA
Machine Learning QNA
It is branch of computer science which gives computer the ability to learn without being explicitly programmed.
What is Regression?
Regression is a process of establishing relationship between dependent and independent variable.
It is a supervised machine learning technique which is used to predict continuous values.
The ultimate goal of the regression algorithm is to plot a best-fit line or a curve between the data
What is Classification?
Classification is a process of categorizing a given set of data into classes.
It can be performed on both structured or unstructured data.
The process starts with predicting the class of given data points. The classes are often referred to as target, label or categories
What is Regularization?
Regularization is a techinique used to address over-fitting and feature selection.
There is two types of regularization
L1 Regularization (Lasso Regression)
L2 Regularization (Ridge Regression)
The key difference between these two is the penalty terms.
In Lasso Regression (Least Absolute Shrinkage and Selection Operator) adds " absolute value of magnitude" of coefficient as penality
term to the loss function.
In Ridge Regression, it adds "squared magnitude" of the coefficient as penalty term to the loss function.
Explain KNN?
K nestest neighbors is a simple algorithm that stores all available cases and classifies new cases based on a similarity measures.
It is an approach to data classification that estimates how likely a data point is to be a member of one group or the other depending
on what group the data points nearest to it are in.
What is entropy?
Entropy is a measure of the randomness in the information being processed.
The higher the entropy, the harder is is to draw any conclusion from that information.
title
In the above diagram, the ‘Age’ attribute in the left-hand side of the tree has been pruned as it has more importance on the right-hand
side of the tree, hence removing overfitting.
Reduced error pruning is perhaps the simplest version: replace each node. If it doesn’t decrease predictive accuracy, keep it pruned.
While simple, this heuristic actually comes pretty close to an approach that would optimize for maximum accuracy.
OR
1. Pick at random K datapoints from the training set.
2. Building the Decision Tree associated to these k data points.
3. Choose the N number tree you want to build & repeat step 1 & 2.
4. For a new data point, make each one of your N trees predict, the category to which data points belongs and assign the new data point
to the category that wins the majority, in case of regression, it takes the average of the output by different trees.
Explain Clustering?
Clustering is an unsupervised techniques that involves the grouping or clustering of data points.
The overall goal is to divide data into distinct groups such that ibservations within each group are similar.
It's frequently used for customer segmentation, fraud detection and document classification.
Common clustering techniques include k-means clustering, hierarchical clustering, mean shift clustering and density-based clustering.
While each technique has different method in fining clusters, they all aim to achieve the same thing.
Explain Bagging?
Bagging stands for Bootstrap Aggragation.
Bagging tries to implement similar learners on small sample populations and then takes a mean of all the predictions.
In generalised bagging, we can use different learners on different population.
As we expect this helps us to reduce the variance error.
Explain Boosting?
Boosting is an iterative technique which adjust the wieght of an observation based on the last classification.
If an observation was classified incorrectly, it tries to increase the weight of this observation and viz.
Boosting in general decreases the bias error and builds strong predictive models.
However, they may overfit on the training data.
title
The critical difference here is that KNN needs labeled points and is thus supervised learning, while k-means doesn’t—and is thus
unsupervised learning.
Forexample-: Type I error as telling a man he is pregnant, while Type II error means you tell a pregnant woman she isn’t carrying a
baby.
Keep the model simpler: reduce variance by taking into account fewer variables and parameters, thereby removing some of the
noise in the training data.
Use cross-validation techniques such as k-folds cross-validation.
Use regularization techniques such as LASSO that penalize certain model parameters if they’re likely to cause overfitting.
Where n is the learning rate which depicts the magnitude of the step size. A
A small learning rate will take more time to reach the minimum than a larger learning rate.
But one should be careful that a too-large learning rate might skip the minimum.
The above steps will repeat for i iterations.
Both learning rate and no. of iterations are hyper-parameters.
These hyperparameters must be set by the developer to fine-tune the entire process of finding the minimum.
title