epsilon-machine / missingpy

Missing Data Imputation for Python
GNU General Public License v3.0
240 stars 64 forks source link

Importing issue fixed #40

Open Stephen-Kamau opened 7 months ago

Stephen-Kamau commented 7 months ago

Pull Request Summary

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:

  1. Compatibility Updates:

    • Adapted the code to be compatible with the latest versions of scikit-learn and numpy.
  2. Code Refactoring:

    • Recreated the _check_weight method as def _check_weights(weights): to enhance clarity and consistency.
  3. 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.

Related Issues

[Closes #13]