Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: return new model when calling fit #91

Merged
merged 6 commits into from
Mar 27, 2023

Conversation

lars-reimann
Copy link
Member

Closes #69.

Summary of Changes

The fit method of classifiers/regressors now returns a new (fitted) classifier regressor. The receiver of the method call is not changed anymore. This is consistent with the methods on the Table class and other data containers. Furthermore, fit is now a pure function, which works better in notebooks and our own execution strategy.

@lars-reimann lars-reimann requested a review from a team as a code owner March 27, 2023 10:15
@lars-reimann lars-reimann linked an issue Mar 27, 2023 that may be closed by this pull request
@lars-reimann
Copy link
Member Author

lars-reimann commented Mar 27, 2023

🦙 MegaLinter status: ✅ SUCCESS

Descriptor Linter Files Fixed Errors Elapsed time
✅ PYTHON black 34 0 0 0.89s
✅ PYTHON flake8 34 0 0.56s
✅ PYTHON isort 34 0 0 0.25s
✅ PYTHON mypy 34 0 1.9s
✅ PYTHON pylint 34 0 2.63s
✅ REPOSITORY git_diff yes no 0.02s

See detailed report in MegaLinter reports
Set VALIDATE_ALL_CODEBASE: true in mega-linter.yml to validate all sources, not only the diff

MegaLinter is graciously provided by OX Security

@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #91 (1ada7ff) into main (5ec6189) will increase coverage by 0.57%.
The diff coverage is 100.00%.

@@            Coverage Diff             @@
##             main      #91      +/-   ##
==========================================
+ Coverage   91.53%   92.11%   +0.57%     
==========================================
  Files          36       36              
  Lines        1134     1230      +96     
==========================================
+ Hits         1038     1133      +95     
- Misses         96       97       +1     
Impacted Files Coverage Δ
src/safeds/ml/_util_sklearn.py 79.31% <100.00%> (-2.18%) ⬇️
src/safeds/ml/classification/_ada_boost.py 100.00% <100.00%> (ø)
src/safeds/ml/classification/_classifier.py 100.00% <100.00%> (ø)
src/safeds/ml/classification/_decision_tree.py 100.00% <100.00%> (ø)
...lassification/_gradient_boosting_classification.py 100.00% <100.00%> (ø)
...c/safeds/ml/classification/_k_nearest_neighbors.py 100.00% <100.00%> (ø)
...c/safeds/ml/classification/_logistic_regression.py 100.00% <100.00%> (ø)
src/safeds/ml/classification/_random_forest.py 100.00% <100.00%> (ø)
src/safeds/ml/regression/_ada_boost.py 100.00% <100.00%> (ø)
src/safeds/ml/regression/_decision_tree.py 100.00% <100.00%> (ø)
... and 8 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@lars-reimann lars-reimann merged commit 165c97c into main Mar 27, 2023
@lars-reimann lars-reimann deleted the 69-return-new-model-when-calling-fit branch March 27, 2023 10:48
lars-reimann pushed a commit that referenced this pull request Mar 27, 2023
## [0.6.0](v0.5.0...v0.6.0) (2023-03-27)

### Features

* allow calling `correlation_heatmap` with non-numerical columns ([#92](#92)) ([b960214](b960214)), closes [#89](#89)
* function to drop columns with non-numerical values from `Table` ([#96](#96)) ([8f14d65](8f14d65)), closes [#13](#13)
* function to drop columns/rows with missing values ([#97](#97)) ([05d771c](05d771c)), closes [#10](#10)
* remove `list_columns_with_XY` methods from `Table` ([#100](#100)) ([a0c56ad](a0c56ad)), closes [#94](#94)
* rename `keep_columns` to `keep_only_columns` ([#99](#99)) ([de42169](de42169))
* rename `remove_outliers` to `drop_rows_with_outliers` ([#95](#95)) ([7bad2e3](7bad2e3)), closes [#93](#93)
* return new model when calling `fit` ([#91](#91)) ([165c97c](165c97c)), closes [#69](#69)

### Bug Fixes

* handling of missing values when dropping rows with outliers ([#101](#101)) ([0a5e853](0a5e853)), closes [#7](#7)
@lars-reimann
Copy link
Member Author

🎉 This PR is included in version 0.6.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Mar 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
released Included in a release
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Return new model when calling fit
1 participant