2

There are three encoding options you can utilise for your scenario of sex(gender) One hot Encoding: Here each category is mapped to binary variable containing either 0 or 1.Widely utilized when features are nominal. Dummy Encoding: similar to one hot encoding. While one hot encoding utilises N binary variables for N categories in a variable. Dummy encoding ...


1

If you must select features in this way, the traditional method is to pick the number of top features that you want to obtain, instead of a threshold. Normally this kind of feature selection is done only when there too many features with respect to the number of instances. This is why one tries to guess what would be a reasonable number of features $n$, then ...


1

Yes this is a very good idea, and often done this way when you have a lot of features. PCA is used to have less but useful features and train your model more efficiently (this is dimensionality reduction). Note that PCA is building new features from the ones you pass to it (it is different than feature selection). This will help you train your model faster ...


1

Your main problem (it turns out, thanks for following up in the comments) is that you used the raw coefficients from the logistic regression as a measure of importance, but the scale of the features makes such comparisons invalid. You should either scale the features before training, or process the coefficients after. I find it helpful to emphasize that ...


1

A Chi-squared test makes sense but it's only going to tell you whether the difference in frequency is significant or not, by itself it's not very informative about the scale of the difference between the classes. The simple answer to your question is to calculate the conditional distributions for every word $w$ and class $c$. Using the notation $\#x$ for the ...


1

You are describing different coordinates but suppose for a second that points are represented as cartesian coordinates $(x,y,z)$. A surface consists of infinitely many points which cannot be stored by a computer. One solution to this problem is that we put a grid over the $(x,y)$-plane and store for each point in the grid the height value $z$. Here, is an ...


Only top voted, non community-wiki answers of a minimum length are eligible