Skip to main content

Model Training.

Data scientists have access to many libraries and packages that help with model development. Some of the most common for Python are XGBoost, Keras, and scikit-learn. These packages are already available in the Katonic SDK(Auto ML).

Once we are done with the text preprocessing like removing unnecessary punctuations, symbols and converting those text into numerical features. We need to use them to train Machine Learning models. For that we are going to Katonic's Auto ML tool which will keep track of all your experiments that you're doing inside a Notebook and store them in an Experiments Registry. From there we can compare different models and find the best model.

Before doing any model training in the Notebook, you need to set an experiment using katonic Auto ML package.

from katonic.ml.client import set_exp
from katonic.ml.classification import Classifier

exp_name = set_exp("bad_loan_prediction")

The models that you're going to train will get stored under the Experiment name that you gave. In this case the experiment name is bad_loan_prediction.

We are using so many Machine Learning models in order to do the training.

Before starting the model training we need to initialize a Auto ML Classifier.

classifier = Classifier(X_train, X_test, Y_train, Y_test, experiment_name = "bad_loan_prediction")

Now we have configured the Classifier with the training and validation data along with the Experiemnt name, we can now train any model using a single line of code.

Logistic Regression.

classifier.LogisticRegression()

That's it just by writing one line of code, we can train the model.

Gradient Boosting Classifier.

classifier.GradientBoostingClassifier()

Random Forest Classifier.

classifier.RandomForestClassifier()

XG Boost Classifier.

classifier.XGBClassifier()

Decision Tree Classifier.

classifier.DecisionTreeClassifier()

K Neighbors Classifier.

classifier.KNeighborsClassifier()

All the performance metrices and the model information will get catalogued in the Experiments Section.