Supporting a New Model
Explore how to support a new regression model in your ML pipeline by integrating the AutoMPG dataset and LinearRegression module. Understand the necessary code changes such as updating dataset and model factories, adjusting config files, and running training with debug options to effectively extend pipeline capabilities.
Supporting a new model
Let’s see what the code for the AutoMPG regressor module looks like.
If we compare this to the iris classifier module, we see similarities, mainly because, like IrisClassifier, this class derives from TrainingMixin, Model, and ReportingMixin. We also see several differences:
We see that this model uses the
LinearRegressionmodule fromscikit-learninstead of theLogisticRegressionmodule we used for iris classification in line 26.The iris classification is a regression problem, so it required related metrics, such as accuracy and confusion matrix. However, this project computes regression-related metrics, such as mean squared error and the coefficient of determination. ...