With n_samples=0, test_size=0.15 and train_size=None, the resulting train set will be empty. Adjust any of the aforementioned parameters.
时间: 2024-05-23 13:13:28 浏览: 135
This error message is produced when the combination of the `n_samples`, `test_size`, and `train_size` parameters results in an empty training set.
To fix this, you can adjust the `n_samples`, `test_size`, or `train_size` parameters. One option is to increase the value of `n_samples` so that there are more data points to split into the training and testing sets. Alternatively, you can decrease the `test_size` parameter to reserve a smaller proportion of the data for testing. Finally, you can set a specific value for `train_size` instead of leaving it as `None`, which will ensure that a certain proportion of the data is reserved for training.
Keep in mind that the values of these parameters should be chosen based on the size of the dataset and the goals of the machine learning experiment.
阅读全文