586b49b07574f7812101248c94d73ef1fb2a5c12,mltsp/tests/test_predict.py,,test_add_to_predict_results_dict,#,37
Before Change
[1, 2, 3], {"f1": 2}, "TEST001", 5)
npt.assert_array_equal(results_dict["TT"]["ts_data"], [1, 2, 3])
npt.assert_equal(len(results_dict["TT"]["pred_results"]), 3)
for fname in ["TEST001_features.csv", "TEST001_targets.npy"]:
os.remove(pjoin(cfg.FEATURES_FOLDER, fname))
def test_do_model_predictions():
Test model predictions
generate_model_rfc()
for suffix in ["targets.npy", "features.csv"]:
After Change
Test add data to predict results dict
results_dict = {}
preds = pd.Series({"class1": 0.2, "class2": 0.5, "class3": 0.3}, name=0)
ts_data = np.array([[1., 2., 3.], [4., 5., 6.]])
predict.add_to_predict_results_dict_classification_proba(
results_dict, preds, "TT.dat",
ts_data, {"f1": 2}, "TEST001", 5)
npt.assert_array_equal(results_dict["TT"]["ts_data"], ts_data)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances
Project Name: cesium-ml/cesium
Commit Name: 586b49b07574f7812101248c94d73ef1fb2a5c12
Time: 2015-11-11
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_predict.py
Class Name:
Method Name: test_add_to_predict_results_dict
Project Name: invesalius/invesalius3
Commit Name: bfaca5dcfc55113e3f8fd3134e21ae9567a4097c
Time: 2016-08-12
Author: totonixsame@gmail.com
File Name: invesalius/data/viewer_slice.py
Class Name: Viewer
Method Name: UpdateCanvas
Project Name: enthought/chaco
Commit Name: 256b425def54f146ac9b7ade21a5cd7c25097583
Time: 2012-08-09
Author: jminardi@enthought.com
File Name: chaco/tools/legend_highlighter.py
Class Name: LegendHighlighter
Method Name: normal_left_down