d623df33ce938f8cfc57b025f963cdb1a8eda4ca,numerox/model.py,logisticPCA,fit_predict,#logisticPCA#Any#Any#Any#,175
Before Change
def fit_predict(self, dfit, dpre, tournament):
pipe = Pipeline([("pca", PCA(n_components=self.p["nfeatures"])),
("lr", LogisticRegression(C=self.p["inverse_l2"]))])
yfit = dfit.y_for_tournament(tournament)
pipe.fit(dfit.x, yfit)
yhat = pipe.predict_proba(dpre.x)[:, 1]
return dpre.ids, yhat
After Change
def fit_predict(self, dfit, dpre, tournament):
pipe = Pipeline([("pca", PCA(n_components=self.p["nfeatures"])),
("lr", LogisticRegression(C=self.p["inverse_l2"]))])
pipe.fit(dfit.x, dfit.y[tournament])
yhat = pipe.predict_proba(dpre.x)[:, 1]
return dpre.ids, yhat
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 4
Instances
Project Name: kwgoodman/numerox
Commit Name: d623df33ce938f8cfc57b025f963cdb1a8eda4ca
Time: 2018-08-10
Author: kwgoodman@gmail.com
File Name: numerox/model.py
Class Name: logisticPCA
Method Name: fit_predict
Project Name: kwgoodman/numerox
Commit Name: d623df33ce938f8cfc57b025f963cdb1a8eda4ca
Time: 2018-08-10
Author: kwgoodman@gmail.com
File Name: numerox/model.py
Class Name: extratrees
Method Name: fit_predict
Project Name: kwgoodman/numerox
Commit Name: d623df33ce938f8cfc57b025f963cdb1a8eda4ca
Time: 2018-08-10
Author: kwgoodman@gmail.com
File Name: numerox/model.py
Class Name: randomforest
Method Name: fit_predict
Project Name: kwgoodman/numerox
Commit Name: d623df33ce938f8cfc57b025f963cdb1a8eda4ca
Time: 2018-08-10
Author: kwgoodman@gmail.com
File Name: numerox/model.py
Class Name: example_predictions
Method Name: fit_predict
Project Name: kwgoodman/numerox
Commit Name: d623df33ce938f8cfc57b025f963cdb1a8eda4ca
Time: 2018-08-10
Author: kwgoodman@gmail.com
File Name: numerox/model.py
Class Name: mlpc
Method Name: fit_predict
Project Name: kwgoodman/numerox
Commit Name: d623df33ce938f8cfc57b025f963cdb1a8eda4ca
Time: 2018-08-10
Author: kwgoodman@gmail.com
File Name: numerox/model.py
Class Name: logistic
Method Name: fit_predict