With n_samples=0, test_size=0.2 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.
时间: 2024-05-29 17:16:02 浏览: 394
PPCHAL_0_7_7.zip_PPCHAL_0_7_7.zip_Ppc_gapi
The error message indicates that the combination of parameters you have specified will result in an empty training set.
When you set `train_size=None`, the training set will be automatically set to the complement of the test set, which is calculated as `1 - test_size`.
If you set `n_samples=0`, this means that there are no samples available to create a training set.
To fix this error, you can adjust the values of `n_samples`, `test_size`, and `train_size` until you have a valid combination. For example, you can set a non-zero value for `n_samples`, or adjust the values of `test_size` and `train_size` to ensure that there are enough samples for both sets.
阅读全文