5980329d949dd0d9764357a70c36da44645ce503,google_analytics/model_template.py,,,#,5
Before Change
final_pred = final_test["fullVisitorId"]
final_pred[train_yht] = test_y
final_pred = final_pred.sort(["fullVisitorId"])
final_by_ind = final_pred.groupby(["fullVisitorId"]).sum()
final_by_ind = final_by_ind.add_suffix("_sum").reset_index()
final_by_ind["PredictedLogRevenue"] = np.log1p(final_by_ind["train_yht_sum"])
//submit
final_by_ind.to_csv("cam_pred1.csv")
After Change
final_by_ind = final_by_ind.reset_index()
//merge the predictions with the sample sub
submission = submission.merge(final_by_ind, on = "fullVisitorId", how = "left")
//fill nas and move to right column name
submission["PredictedLogRevenue"] = submission["test_pred"].fillna(0.0)
submission = submission.drop(["test_pred"], axis = 1)
//submit the output
submission.to_csv("cam_lightgbm_pred2.csv", index = False)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 8
Instances
Project Name: CNuge/kaggle-code
Commit Name: 5980329d949dd0d9764357a70c36da44645ce503
Time: 2018-10-18
Author: nugentc@uoguelph.ca
File Name: google_analytics/model_template.py
Class Name:
Method Name:
Project Name: CNuge/kaggle-code
Commit Name: 5980329d949dd0d9764357a70c36da44645ce503
Time: 2018-10-18
Author: nugentc@uoguelph.ca
File Name: google_analytics/model_template.py
Class Name:
Method Name:
Project Name: neuropsychology/NeuroKit.py
Commit Name: 8c05bf284a980fe07b8635e5c9415dea24fb0026
Time: 2017-04-28
Author: dom.mak19@gmail.com
File Name: examples/UnderDev/EMG/test_EMG.py
Class Name:
Method Name:
Project Name: CNuge/kaggle-code
Commit Name: 5980329d949dd0d9764357a70c36da44645ce503
Time: 2018-10-18
Author: nugentc@uoguelph.ca
File Name: google_analytics/xgb_predict_spending.py
Class Name:
Method Name: