(1) HEATMAPS:
Code for heatmap and charts given in program "hmap.R".
To view images/charts or run the code online use the Kaggle platform link below:
https://www.kaggle.com/anu2analytics/sf-crime/heatmap-for-crime-categories-and-area
One heatmap image added to this folder as heatmap_SFO.png
(2) CHI-SQ TEST & CORRELATION VISUALIZATION:
program "relations.R" performs the following tasks:
- (a) chi-sq test to check if relationship exists between crimecategory (categorical variable)
and other factors like district, x/y coordinaates, month, year, etc.
- (b) corrgram function to visualize correlation matrix and dependencies.
Multinomial regression.
Formula: Category ~ DayOfWeek PdDistrict
Score: 2.65
Output file: multinom.zip
Formula: multinom(Category ~ DayOfWeek + year + mth + PdDistrict, data = mytrain, maxit = 500)
Score: 2.60
Output file: multinom_dates.zip