a09d1f3c4b979972c6594133c21b2783c9234482,mltsp/tests/test_build_model.py,,test_build_model_rfr,#,31
Before Change
def test_build_model_rfr():
Test main model building method - RFR
shutil.copy(pjoin(DATA_PATH, "test_reg_targets.npy"),
pjoin(cfg.FEATURES_FOLDER, "TEMP_TEST01_targets.npy"))
shutil.copy(pjoin(DATA_PATH, "test_features.csv"),
pjoin(cfg.FEATURES_FOLDER, "TEMP_TEST01_features.csv"))
build_model.create_and_pickle_model("TEMP_TEST01", "RFR", "TEMP_TEST01")
assert os.path.exists(pjoin(cfg.MODELS_FOLDER,
"TEMP_TEST01.pkl"))
model = joblib.load(pjoin(cfg.MODELS_FOLDER,
"TEMP_TEST01.pkl"))
os.remove(pjoin(cfg.MODELS_FOLDER, "TEMP_TEST01.pkl"))
os.remove(pjoin(cfg.FEATURES_FOLDER, "TEMP_TEST01_targets.npy"))
os.remove(pjoin(cfg.FEATURES_FOLDER, "TEMP_TEST01_features.csv"))
assert hasattr(model, "predict")
assert "sklearn.ensemble.forest.RandomForestRegressor" in str(type(model))
After Change
def test_build_model_rfr():
Test main model building method - RFR
build_model.create_and_pickle_model("test", "RFR", "test_reg")
model = joblib.load(pjoin(cfg.MODELS_FOLDER, "test.pkl"))
assert hasattr(model, "predict")
assert "sklearn.ensemble.forest.RandomForestRegressor" in str(type(model))
In pattern: SUPERPATTERN
Frequency: 6
Non-data size: 23
Instances Project Name: cesium-ml/cesium
Commit Name: a09d1f3c4b979972c6594133c21b2783c9234482
Time: 2015-11-10
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_build_model.py
Class Name:
Method Name: test_build_model_rfr
Project Name: cesium-ml/cesium
Commit Name: a09d1f3c4b979972c6594133c21b2783c9234482
Time: 2015-11-10
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_build_model.py
Class Name:
Method Name: test_build_model_ridge_cv
Project Name: cesium-ml/cesium
Commit Name: a09d1f3c4b979972c6594133c21b2783c9234482
Time: 2015-11-10
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_build_model.py
Class Name:
Method Name: test_build_model_lin_reg
Project Name: cesium-ml/cesium
Commit Name: a09d1f3c4b979972c6594133c21b2783c9234482
Time: 2015-11-10
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_build_model.py
Class Name:
Method Name: test_build_model_rfr
Project Name: cesium-ml/cesium
Commit Name: a09d1f3c4b979972c6594133c21b2783c9234482
Time: 2015-11-10
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_build_model.py
Class Name:
Method Name: test_build_model_lin_class
Project Name: cesium-ml/cesium
Commit Name: a09d1f3c4b979972c6594133c21b2783c9234482
Time: 2015-11-10
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_build_model.py
Class Name:
Method Name: test_build_model_rfc
Project Name: cesium-ml/cesium
Commit Name: a09d1f3c4b979972c6594133c21b2783c9234482
Time: 2015-11-10
Author: brettnaul@gmail.com
File Name: mltsp/tests/test_build_model.py
Class Name:
Method Name: test_build_model_ard_reg