ValueError: Unknown label type: 'continuous'
时间: 2023-09-17 16:10:45 浏览: 59
This error occurs when trying to use a classification algorithm on a continuous target variable. Classification algorithms are used for predicting categorical or discrete values, whereas continuous variables have a range of numerical values.
To fix this error, you can either convert the target variable to a categorical variable or use a regression algorithm instead of a classification algorithm. If you choose to convert the target variable to a categorical variable, you can use binning or grouping to divide the continuous variable into discrete categories. Alternatively, if you choose to use a regression algorithm, you need to modify your code to use a regression algorithm instead of a classification algorithm.
阅读全文