Currently, we are working on a school project which is trying to predict the number of crimes in some area/neighbourhood.

There are 8 different categories for crimes and we've tried to find the correlation among those categories and now we only have 4 left. Instead of building a model for each category, we want to predict these 4 categories simultaneously by some multi-output algorithm.

Our sample size is around 27,000 for 6 years (from 2011 to 2016, 4000+ for each year). We are going to use (maybe) cross-validation to build/test our model.

Would you please list 2-3 algorithms which already have fully or partially implemented library in Python (preferred) or R you would recommend to use with our dataset scale? I only found scikit-learn with this algorithm. But it's for classification rather then prediction numbers.

This is a intro-level ML course project, the group is not very experienced in the field and the time is limited so we don't want to implement an algorithm from scratch.

  • $\begingroup$ Welcome to Data science SE. It is very hard to answer your question since everything depends on the data you have and what you are trying to predict. Moreover, I assume your professor wants you to do research and not get an answer from SE. I would recommend to do your own independent research. $\endgroup$ – Stereo Nov 15 '16 at 6:52
  • $\begingroup$ @Stereo Well actually he encouraged us find answer and suggestion from the community... We've tried to do some research, except for NN, most of the algorithm are about classification. We are doing something similar to a linear regression (Of course, linear regression is a simple one), say, input [x_1=unemployment rate, x_2=avg assessment value, x_3, x_4...] and then try to have a [y_1=homicide #, y_2=robbery #, .. ] as our prediction target. Now we have about 40 features and 3-4 y_i to predict. $\endgroup$ – Kulbear Nov 15 '16 at 11:28

For the project, do you need to explain exactly how the input variables gave you the predictions? If so, trees based methods (R library 'tree', 'rpart') and Logistic Regression would be easy to explain to your stakeholder / lecturer.

If this explanation is not that important, or you could get by just showing the relative predictor importance, and you'd like to focus on accuracy. XGBoost is my default recommendation for multi-class predictions that I use at work on a daily basis. If XGBoost has too many parameters for your liking, you could try randomForest which only has 2 main parameters to tune. Both XGBoost and randomForest have functions for variable importance measures. (R Library XGBoost and randomForest)

| improve this answer | |
  • $\begingroup$ Thanks for your suggestion, but the problem is our final target is predicting a value (actually, a group of values) rather than classify the crime category. Say, by using multi-task linear regression, we can build a model to do so. $\endgroup$ – Kulbear Nov 15 '16 at 4:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.