kootenpv / whereami

Uses WiFi signals :signal_strength: and machine learning to predict where you are
GNU Affero General Public License v3.0
5.1k stars 247 forks source link

ValueError: n_splits=10 cannot be greater than the number of members in each class. #50

Open dkasak opened 5 years ago

dkasak commented 5 years ago

When running whereami crossval, I get

ValueError: n_splits=10 cannot be greater than the number of members in each class.

I suspect this happens when the total number of samples is >= 10, but one of the locations has < 10 samples. This case should be checked for and handled gracefully the same way as the case when the total number of samples is < 10, i.e. not throw an exception.

Blue-Bird421 commented 11 months ago

I am very new to open source community, but I do wanna try and work on this.

kootenpv commented 11 months ago

@Blue-Bird421 you're very welcome! what do you imagine the solution should be?

Blue-Bird421 commented 11 months ago

@kootenpv I plan on checking if Minimum number of samples from each unique location is greater than n_splits using try and Execute Block in similar manner to when the total number of samples is < 10, i.e. not throw an exception.

Blue-Bird421 commented 11 months ago

@kootenpv should I follow this and start working on the issue?