hm, was worth a try. What happens if you change the solver to something else
than liblinear, does this issue still persist?
Btw. scikit-learn works with NumPy arrays, not NumPy matrices. Probably
unrelated to your issue, I’d recommend setting
>y_train = df_train.pass_fail.values
>y_tes
Hm that looks kinda convoluted.
Why don't you just do
df_train, df_test, y_train, y_test = train_test_split(logreg_x, logreg_y,
random_state=0)
?
What version of scikit-learn are you using?
Also, you are modifying the inputs. Can you try to do the same but
pass a copy of the input datafra
Sebastian,
That doesn’t do it. With the function:
def log_run(logreg_x, logreg_y):
logreg_x['pass_fail'] = logreg_y
df_train, df_test = train_test_split(logreg_x, random_state=0)
y_train = df_train.pass_fail.as_matrix()
y_test = df_test.pass_fail.as_matrix()
del(df_train['pass
Hi, Chris,
have you set the random seed to a specific, contant integer value? Note that
the default in LogisticRegression is random_state=None. Setting it to some
arbitrary number like 123 may help if you haven’t done so, yet.
Best,
Sebastian
> On Aug 15, 2016, at 5:27 PM, Chris Cameron wrot
Hi all,
Using the same X and y values sklearn.linear_model.LogisticRegression.fit() is
providing me with inconsistent results.
The documentation for sklearn.linear_model.LogisticRegression states that "It
is thus not uncommon, to have slightly different results for the same input
data.” I am e