This pull request updates the missingpy repository to be compatible with the current versions of scikit-learn and numpy. The following changes have been made:
Compatibility Updates:
Adapted the code to be compatible with the latest versions of scikit-learn and numpy.
Code Refactoring:
Recreated the _check_weight method as def _check_weights(weights): to enhance clarity and consistency.
Model Hyperparameters Update:
Updated the model hyperparameters to align with the current version of RandomForest.
Details
_check_weights Refactoring:
The _check_weight method has been refactored to def _check_weights(weights): for improved readability and maintainability. It is no longer present.The function now validates weights to ensure they are either 'uniform', 'distance', or a callable function. This modification enhances the robustness of the code and provides a clear interface for handling different weight options.
Model Hyperparameters Update:
The model hyperparameters have been adjusted to fit the requirements of the current version of RandomForest. This ensures that the imputation process aligns seamlessly with the latest changes in the scikit-learn library.
Testing
All existing tests have been updated and reruned to validate that the updated code functions correctly with the latest dependencies.
Pull Request Summary
This pull request updates the
missingpy
repository to be compatible with the current versions ofscikit-learn
andnumpy
. The following changes have been made:Compatibility Updates:
scikit-learn
andnumpy
.Code Refactoring:
_check_weight
method asdef _check_weights(weights):
to enhance clarity and consistency.Model Hyperparameters Update:
RandomForest
.Details
_check_weights
Refactoring:The
_check_weight
method has been refactored todef _check_weights(weights):
for improved readability and maintainability. It is no longer present.The function now validates weights to ensure they are either 'uniform', 'distance', or a callable function. This modification enhances the robustness of the code and provides a clear interface for handling different weight options.Model Hyperparameters Update:
The model hyperparameters have been adjusted to fit the requirements of the current version of
RandomForest
. This ensures that the imputation process aligns seamlessly with the latest changes in thescikit-learn
library.Testing
All existing tests have been updated and reruned to validate that the updated code functions correctly with the latest dependencies.
Related Issues
[Closes #13]