Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XGBoost model added for Chicago Food Inspection #98

Merged
merged 4 commits into from Apr 10, 2019

Conversation

Projects
None yet
3 participants
@socratesk
Copy link
Contributor

commented Feb 3, 2017

The XGBoost model performs better than RandomForest model in both Train and Test data sets. The comparison metrics can be found at the bottom of the "31_xgboost_model_evaluation.R"

#Random Forest: Time difference of 6.554264 days
#XGBoost: Time difference of 7.790698 days

socratesk added some commits Feb 2, 2017

XGBoost Model added for Chicago Food Inspection
The XGBoost model performs better than RandomForest model in both Train and Test data sets. The comparison metrics can be found at the bottom of the "31_xgboost_model_evaluation.R" 

#Random Forest: Time difference of 6.554264 days
#XGBoost: 	    Time difference of 7.790698 days
XGBoost Model and XGBoost data files uploaded
The XGBoost predicted "dat" data set and XGBoost model are uploaded so that they can be readily used by "31_xgboost_model_evaluation.R" file.
Merge pull request #1 from socratesk/socratesk-ChiFood-MoreModels
XGBoost Model added for Chicago Food Inspection

@tomschenkjr tomschenkjr requested a review from geneorama Feb 3, 2017

@tomschenkjr tomschenkjr self-assigned this Feb 3, 2017

@tomschenkjr

This comment has been minimized.

Copy link
Contributor

commented Feb 6, 2017

@socratesk - thank you! This looks very promising. The XGBoost obviously is a good candidate since the 7.8 day improvement is greater than the 7.4 day improvement we see with our logit model.

We are working on a couple of other projects and will be doing a code review on your contribution as soon as we can. We will be validating your results as a second pair of eyes and will follow-up with any questions. If the results hold, we will incorporate your contributions to the model that drives food inspections in the city.

Again, thank you and will be in touch soon!

@socratesk

This comment has been minimized.

Copy link
Contributor Author

commented Feb 15, 2017

Hi Tom,

I prepared an App and uploaded it in ShinyApps for Chicago Food Inspection. You may goto the app using this link. Since it is uploaded under free-tier some of the models may get disconnected however most of the functionalities and models will still work. Will migrate it under paid-tier shortly.

Let me know what you think.

Thanks!

@geneorama geneorama changed the base branch from master to dev Sep 21, 2017

Update xgboost code for current standards
The numbers work out to be the same in the evaluation, but I updated 

 - the test / train indices to be Boolean rather than numbers
 - switches to mm as matrix not data table
 - updated for new input data, with new feature creation


also removed some of the code that was not needed; setting the path, and reinstalling packages from the startup
@geneorama
Copy link
Member

left a comment

After modifying the import to mirror recent changes to the code, I think this will make a valuable addition to the code base.

Show resolved Hide resolved CODE/30_xgboost_model.R
Show resolved Hide resolved CODE/30_xgboost_model.R Outdated
Show resolved Hide resolved CODE/30_xgboost_model.R

@geneorama geneorama merged commit 17033a7 into Chicago:dev Apr 10, 2019

1 check passed

clahub All contributors have signed the Contributor License Agreement.
Details
@socratesk
Copy link
Contributor Author

left a comment

The changes look ok to me.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.