from sklearn.utils.validation import check_X_y, check_array, check_is_fitted
时间: 2023-12-26 11:06:54 浏览: 109
As an AI language model, I do not have access to the specific implementation details of scikit-learn library. However, I can provide a general idea about the functions mentioned here.
1. `check_X_y`: This function validates the input data and target values. It checks if they are in the correct format and shape. If the input data or target values are not in the expected format, an error will be raised.
2. `check_array`: This function validates the input data. It checks if it is in the correct format and shape. If the input data is not in the expected format, an error will be raised.
3. `check_is_fitted`: This function checks whether an estimator has been trained or not. It raises an error if the estimator has not been trained before calling this function.
阅读全文