Yes, it works fine:
import numpy as np from scipy.stats import norm from sklearn.linear_model import LogisticRegression import json x = np.arange(10)[:, np.newaxis] y = np.array([0,0,0,1,0,0,1,1,1,1])
Output:
[[[0.7558780101653273]], [-3.322083150375962], "l1", 10] [[ True True] [ True True] [ True True] [ True True] [ True True] [ True True] [ True True] [ True True] [ True True] [ True True]]
Thus, the predictions of the original and newly created models are really identical.
source share