dssg / dssg/police-eis

Categorical features

Open
#82 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
56
Forks
19
PR merge metrics
No merged PRs in 30d

Description

Categorical features can't be used by sklearn models without some kind of transformation. Because there are a number of different methods for ([reference](https://en.wikipedia.org/wiki/Categorical_variable#Categorical_variables_and_regression) and [an explanation using patsy](http://statsmodels.sourceforge.net/devel/contrasts.html))

We should encode categorical features at model time, for example using scikit learn's [OneHotEncoder](http://scikit-learn.org/stable/modules/generated/sklearn.preprocessing.OneHotEncoder.html).

Even if no other codings are used other than onehot, implementing categorical features in this way we are not reimplementing what already exists in sklearn/patsy by hand.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.