Conversation
Extended Model class to support any sklearn estimator type while maintaining full backward compatibility with existing frozen models. Changes: - Added 'estimator' parameter alongside 'clf' for clearer API - Internal storage remains '_clf' to ensure old pickles load correctly - Implemented automatic type detection (classifier/regressor/transformer) - Added transform() method for transformers - Updated fit(), predict(), predict_proba(), evaluate() with type checking - Modified Data.classes property to handle non-classification cases - Updated mixins with type validation and informative error messages - Added summary() field for estimator type - Comprehensive test coverage for all estimator types - Updated documentation with usage examples Backward compatibility: - Zero migration code needed for existing pickles - Both 'clf' and 'estimator' parameters work - All existing code continues to function unchanged - 61 tests pass with 97% coverage
Added a new section demonstrating how to use sklearn transformers (StandardScaler) with ColdSnap. The example uses the iris dataset from sklearn for easy testing without additional dependencies. Example shows: - Creating a Model with a transformer using the estimator parameter - Fitting and transforming data - Saving and loading fitted transformers - Viewing before/after transformation results
Add comprehensive tests to cover all remaining uncovered code paths: - Data.classes returning None after purge - Model.estimator setter property - Error handling for predict/transform/predict_proba without estimator - Edge case for transform on estimator without transform method - TypeError enforcement for mixin methods on non-classifiers All 68 tests now pass with 100% coverage across all source files.
Version 0.1.0 introduces significant new functionality: - Support for sklearn transformers and regressors - New estimator parameter with backward-compatible clf parameter - 100% test coverage - Enhanced type detection and error handling Add CHANGELOG.md to document all changes between versions.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.