paucablop / chemotools

Integrate your chemometric tools with the scikit-learn API 🧪 🤖
https://paucablop.github.io/chemotools/
MIT License
45 stars 6 forks source link

Substitute check_array by ._validate_data() #57

Closed paucablop closed 10 months ago

paucablop commented 10 months ago

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.