# Tag Info

## New answers tagged categorical-data

0

Background I think the general model for both approaches mentioned in the question is a fully generative model: $p(C_1|x) = \frac{p(x|C_1)p(C_1)}{p(x|C_1)p(C_1)+p(x|C_2)p(C_2)}$ This model can be rewritten as: $p(C_1|x) = \frac{1}{1+\frac{p(x|C_2)p(C_2)}{p(x|C_1)p(C_1)}} = \frac{1}{1+exp[-ln\frac{p(x|C_1)p(C_1)}{p(x|C_2)p(C_2)}]} = \sigma(a(x))$, where $a(x)... 0 I had the same problem in one of the datasets I was using, and the answer is focus more on feature transformation. If you simply include all the features of your dataset for encoding, you would probably end up with more no of columns than you rows! I am positive there might be many features in you dataset that can be grouped in one column, some features can ... 0 I spent some time exploring this dataset: There are some findings I want to share it with you: Number of samples is 426880 samples. Number of categories in the cylinder column are: 3,4,5,6,7,8,10,12,others,Blank cell. You could take a look at the cylinder list at the beginning. here There are no 7, 9, and 11 cylinders. Then, 'others' could contain more ... 0 I would suggest in this case 2 steps as part of your data preparation: substitute 'NAN' for 'Others', since both labels are giving you no info and can be considered as unknown values once you have finally 3 labels ('8 c', '6 c','Others'), apply one hot encoding, since you only have 3 possible categories (which prevents your dataset from being too sparse) ... 0 It really depends what your variable refers to, and which kind of model you want to use. A few things you can do : OneHotEncoding : will create binary variables for each possibility for your variable : in your case, it'll create 4 variables '8 c', '6 c','NAN','Others', that take 1 or 0. This way, each possible variable output is now a binary variable, ... 0 Correlation between categorical variables can be calculated with Spearman's rank correlation coefficient. If Spearman's rank correlation is high enough, the variables can be dropped. 0 One of the primary differences between fitting a logistic regression model and proportion for each combination is the difference between fitting a single overall model and many separate individual models. Fitting a logistic regression will create a single model that will attempt to accommodate the outcomes for all combinations. Fitting a separate model for ... 0 Regression is a machine learning technique that learns the weights of features from the data. If$x_1\$ is the most important feature, the model will learn to weight it the most. There is no reason to cluster the data first. Categorical features should be encoded to be numerical. One common encoding choice is one-hot encoding.

Top 50 recent answers are included