Posts

Linear Regression Understanding by CHIRAG

Image
  Linear Regression 1 .)Linear regression is a supervised learning algorithm used when target / dependent variable continues real number. 2.)Linear regression is a type of statistical analysis used to predict the relationship between dependent and independent Variables using BEST FIT LINE. 3.) It work on the principle of ordinary least square (OLS)/ Mean square errror (MSE) Simple Linear Regression In a simple linear regression, there is one independent variable and one dependent variable. The model estimates the slope and intercept of the line of best fit, which represents the relationship between the variables. The slope represents the change in the dependent variable for each unit change in the independent variable, while the intercept represents the predicted value of the dependent variable when the independent variable is zero. Mathematically, we can represent a linear regression as: y= a0+a1x+ ε Y= Dependent Variable (Target Variable) X= Independent Variable (predictor Variab...

SVMs Classification Understanding by CHIRAG

Image
What is a Support Vector Machine?  1.)  It is a supervised machine learning problem where we try to find a hyperplane that best separates the two classes.   2.) Support Vector Machines   (SVMs in short) are machine learning algorithms that are used for classification and regression purposes. SVMs are one of the powerful machine learning algorithms for classification, regression and outlier detection purposes.  3.)  An SVM classifier builds a model that assigns new data points to one of the given categories.   4.)Thus, it can be viewed as a non-probabilistic binary linear classifier.   Don’t get confused between SVM and logistic regression. Both the algorithms try to find the best hyperplane, but the main difference is logistic regression is a probabilistic approach whereas support vector machine is based on statistical approaches. Support Vector Machines intuition   Now, we should be familiar with some SVM terminology. Hyperplane A hyperplane...

Overfitting , Underfitting Bias & Variance Understanding by CHIRAG

Image
  What is Overfitting? Overfitting means model has High accuracy score on training data but low accuracy score on test data. (That means our model best fit line satisfied all the training data points . ie. Low Training Error & High Testing Error & High Training Accuracy & Low Test Accuracy ) Reasons for Overfitting:   High variance(High Test Error) .  Low Bias(Low Training Error). The model is too complex. The size of the training data. What is Bias? Bias is the difference between the average prediction of our model and the correct value which we are trying to predict. A model with high bias pays very little attention to the training data and oversimplifies the model. Let’s assume we have trained the model and are trying to predict values with input ‘x_train’. The predicted values are y_predicted.  Bias is the error rate of y_predicted and y_train. In simple terms.   think of bias as the error rate of the training data. When the error rate is high,...