b46079a21209220f92ee274f4498e120e9a1b762,mlxtend/regressor/tests/test_stacking_regression.py,,test_weight_ones,#,88
Before Change
stregr.fit(X1, y, sample_weight=np.ones(40)).predict(X1)
mse = 0.21
got = np.mean((stregr.predict(X1) - y) ** 2)
assert round(got, 2) == mse
After Change
svr_rbf = SVR(kernel="rbf")
stregr = StackingRegressor(regressors=[svr_lin, lr, ridge],
meta_regressor=svr_rbf)
pred1 = stregr.fit(X1, y).predict(X1)
pred2 = stregr.fit(X1, y, sample_weight=np.ones(40)).predict(X1)
maxdiff = np.max(np.abs(pred1 - pred2))
assert maxdiff < 1e-3, "max diff is %.4f" % maxdiff
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances
Project Name: rasbt/mlxtend
Commit Name: b46079a21209220f92ee274f4498e120e9a1b762
Time: 2018-09-23
Author: kmori05@gmail.com
File Name: mlxtend/regressor/tests/test_stacking_regression.py
Class Name:
Method Name: test_weight_ones
Project Name: CNuge/kaggle-code
Commit Name: 22f24471540decc49ce7e58c93c7be4d942cfab6
Time: 2018-10-19
Author: nugentc@uoguelph.ca
File Name: google_analytics/nn_predict.py
Class Name:
Method Name:
Project Name: scikit-optimize/scikit-optimize
Commit Name: 45ffcc4d387da3e767ea675640f411dbea349ff0
Time: 2017-06-28
Author: iaroslav.email@gmail.com
File Name: skopt/wrappers/scikit_learn.py
Class Name:
Method Name:
Project Name: shibing624/pycorrector
Commit Name: 77a383e645c7b42ea025511738638e1238b971bb
Time: 2018-04-10
Author: 507153809@qq.com
File Name: pycorrector/rnn_crf/train.py
Class Name:
Method Name: train