Skip to main content

Posts

Showing posts with the label data science statistic

Multiclass logistic regression

  Multiclass logistic regression Instead of  y = 0 , 1  we will expand our definition so that  y = 0 , 1... n . Basically we re-run binary classification multiple times, once for each class. Procedure 1.     Divide the problem into n+1 binary classification problems (+1 because the index starts at 0?). 2.      For each class… 3.      Predict the probability the observations are in that single class. 4.      prediction = <math>max(probability of the classes) For each sub-problem, we select one class (YES) and lump all the others into a second class (NO). Then we take the class with the highest predicted value. Softmax activation The softmax function (softargmax or normalized exponential function) is a function that takes as input a vector of K real numbers, and normalizes it into a probability distribution consisting of K probabilities proportional to the exponentials of...

Linear Regression

What is Linear Regression? Linear Regression is a supervised machine learning algorithm where the predicted output is continuous and has a constant slope. It’s used to predict values within a continuous range, (e.g. sales, price) rather than trying to classify them into categories (e.g. cat, dog). There are two main types: Simple regression Simple linear regression uses traditional slope-intercept form, where  m  and  c  are the variables our algorithm will try to “learn” to produce the most accurate predictions.  x  represents our input data and  y represents our prediction.                                                       y = mx + c Multivariable regression A more complex, multi-v...