How it works...

We used the admission data and tried to use the logistic regression with some of the features in order to predict whether a student with a given feature set (vector) will be admitted or not (the label). We fitted the regression, set SGD parameters (you should experiment), and ran the API. We then output intercept and model weights for the regression coefficients. Using the model, we predicted and output some predicted values for visual inspection. The last step was to output MSE and RMSE values for the model. Please note that this was for demonstration purposes only and you should use evaluation metrics demonstrated in the previous chapter for model evaluation and the final selection process. Looking at SME and RMSE, we probably ...

Get Apache Spark 2.x Machine Learning Cookbook now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.