I wrote the test according to an approach I found. When looking in Stack Overflow I saw another approach (can be seen here) which was a little more complicated, and made me wonder if I chose the right one. I’m looking for ways to check if my calculation is correct. Here is the relevant code: Any suggestions will be welcomed.
Tag: chi-squared
How SelectKBest (chi2) calculates score?
I am trying to find the most valuable features by applying feature selection methods to my dataset. Im using the SelectKBest function for now. I can generate the score values and sort them as I want, but I don’t understand exactly how this score value is calculated. I know that theoretically high score is more valuable, but I need a