bc4a5f5d29bb5a74d9cb254ff4dfed916676c8aa,examples/model_selection/example_cross_validation.py,,,#,16

Before Change



// store the residuals for each model
m1_residuals = []
m2_residuals = []

for train_window_indices, val_index in cv.split(train):
    tr_fold = train[train_window_indices]
    model1.fit(tr_fold)

After Change



// Pick based on which has a lower mean error rate
m1_average_error = np.average(model1_cv_scores)
m2_average_error = np.average(model2_cv_scores)
errors = [m1_average_error, m2_average_error]
models = [model1, model2]

// print out the answer
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tgsmith61591/pmdarima
Commit Name: bc4a5f5d29bb5a74d9cb254ff4dfed916676c8aa
Time: 2019-11-01
Author: tgsmith61591@gmail.com
File Name: examples/model_selection/example_cross_validation.py
Class Name:
Method Name:


Project Name: dnouri/skorch
Commit Name: a5f83e8f1e29c62070333d6ce48009e2fdb323b9
Time: 2017-07-19
Author: benjamin.bossan@ottogroup.com
File Name: inferno/callbacks.py
Class Name: AverageLoss
Method Name: on_epoch_end


Project Name: streamlit/streamlit
Commit Name: a9ec1a8df7bbfd99d1e166fe5d72bafcc23c915b
Time: 2018-02-03
Author: adrien.g.treuille@gmail.com
File Name: periodic_table.py
Class Name:
Method Name: