Data Science, Stats, Passion #R #SQL #Python #D3 #SC2 #DOTA #CSGO #OW #FGC #NBA #NFL #EPL #Nerdist #GeeklyInc #DLM #ELM... find me: here

From Bayesian Linear Regression in Python: Using Machine Learning to Predict Student Grades Part 1 by Will Koehrsen

For regression, a good naive baseline is simply to guess the median value of the target for every observation in the test data. In our problem, the median is 12, so let’s assess the accuracy of a model that naively predicts 12…

From Bayesian Linear Regression in Python: Using Machine Learning to Predict Student Grades Part 1 by Will Koehrsen

While we are performing feature selection, we also split the data into a training and testing set using a Scikit-learn function. This is necessary because we need to have a hold-out test set to evaluate our model and make sure …

From Bayesian Linear Regression in Python: Using Machine Learning to Predict Student Grades Part 1 by Will Koehrsen

Correlations can only be calculated between numerical variables, so to find the relationship between categorical variables and grade, we have to one-hot encode the categorical variable and then calculate the correlation coefficient. One-hot encoding is a process that creates one column for every category within a categorical variable. Here is an example categorical column before and after one-hot encoding: