The 'feature_range' parameter of MinMaxScaler must be an instance of 'tuple'. Got [5, 10] instead.
时间: 2024-04-16 20:28:11 浏览: 274
the-day-of-year.rar_The Year_day
The error message suggests that you passed a list `[5, 10]` instead of a tuple as the `feature_range` parameter to `MinMaxScaler` in scikit-learn.
To resolve this issue, you can modify the `feature_range` parameter to be a tuple instead of a list. Here's an example:
```python
from sklearn.preprocessing import MinMaxScaler
scaler = MinMaxScaler(feature_range=(5, 10))
```
By using `(5, 10)` as a tuple for the `feature_range` parameter, you can set the desired range for scaling your data.
阅读全文