May 2019
Intermediate to advanced
162 pages
4h 24m
English
Now, as an example, we will look at our example_logistic_regression.py script. We will compare the output of our simple_logistic_regression.py file with that of scikit-learn and prove that we get similar, if not exactly equal, parameters learned in our output. We use the scikit-learn make_classification function to create 100 samples and two features and do train_test_split. First, we will fit our own SimpleLogisticRegression with the model that we just walked through and take 50 steps, as this is a 50 iteration, as shown in the following code:
# -*- coding: utf-8 -*-from __future__ import absolute_importfrom packtml.regression import SimpleLogisticRegressionfrom packtml.utils.plotting import add_decision_boundary_to_axis ...
Read now
Unlock full access