Right now, the input in each method is checked by a custom function called check_input. This function uses the check_array() function from scikit-learn.utils. However, is a better practice to use the ._validate_data() inherited from the BaseEstimator class. in addition, the ._validate_data() will also set the n_featuresin, so we do not have to do it explicitly, making the code more readable.
Right now, the input in each method is checked by a custom function called check_input. This function uses the check_array() function from scikit-learn.utils. However, is a better practice to use the ._validate_data() inherited from the BaseEstimator class. in addition, the ._validate_data() will also set the n_featuresin, so we do not have to do it explicitly, making the code more readable.