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

Set kernel of SupportVectorMachine #172

Closed
lars-reimann opened this issue Apr 4, 2023 · 1 comment · Fixed by #350
Closed

Set kernel of SupportVectorMachine #172

lars-reimann opened this issue Apr 4, 2023 · 1 comment · Fixed by #350
Assignees
Labels
enhancement 💡 New feature or request released Included in a release testing 🧪 Additional automated tests

Comments

@lars-reimann
Copy link
Member

lars-reimann commented Apr 4, 2023

Is your feature request related to a problem?

It's not possible to set the kernel of a SupportVectorMachine.

Desired solution

  • Add a new parameter kernel: SupportVectorMachineKernel to the initializer of safeds.ml.classification.SupportVectorMachine and safeds.ml.regression.SupportVectorMachine
  • Pass it along as the kernel of the wrapped scikit-learn model in the fit method

The implementation of SupportVectorMachineKernel should be similar to the ImputerStrategy:

  • SupportVectorMachineKernel should be an abstract base class
  • Kernel should be nested into SupportVectorMachine
  • Subclasses should be nested into Kernel
  • Subclasses should be:
    • Linear
    • Polynomial (with a degree: int parameter)
      • Raise if degree < 1
    • Sigmoid
    • RadialBasisFunction

Also add a getter as described in #260.

Possible alternatives (optional)

No response

Screenshots (optional)

No response

Additional Context (optional)

We need to add the support vector machine first (#154).

@lars-reimann lars-reimann added the enhancement 💡 New feature or request label Apr 4, 2023
@github-project-automation github-project-automation bot moved this to Backlog in Library Apr 4, 2023
@lars-reimann lars-reimann moved this from Backlog to 🧱 Blocked in Library Apr 4, 2023
@lars-reimann lars-reimann moved this from 🧱 Blocked to Backlog in Library Apr 22, 2023
@zzril zzril moved this from Backlog to Todo in Library May 19, 2023
@jxnior01 jxnior01 self-assigned this May 26, 2023
@jxnior01 jxnior01 moved this from Todo to In Progress in Library May 26, 2023
@jxnior01 jxnior01 added the testing 🧪 Additional automated tests label Jun 9, 2023
@robmeth robmeth moved this from In Progress to Ready for Review in Library Jun 9, 2023
jxnior01 added a commit that referenced this issue Jun 10, 2023
Closes #172.

A new parameter kernel: SupportVectorMachineKernel was added to the
initializer of SupportVectorMachine classes of both the classifier and
the regressor alongside getters for the parameters. It was later passed
as the kernel of the wrapped scikit-learn model in the fit method.
The SupportVectorMachineKernel was created as an abstract base class
from which the signatures of the methods in the nested subclasses of
Kernel were the same.
Tests were adjusted to test the functionality of the kernel parameter.
@github-project-automation github-project-automation bot moved this from Ready for Review to ✔️ Done in Library Jun 10, 2023
lars-reimann pushed a commit that referenced this issue Jun 30, 2023
## [0.14.0](v0.13.0...v0.14.0) (2023-06-30)

### Features

* 290 properties for width-height of image ([#359](#359)) ([d9ebdc1](d9ebdc1)), closes [#290](#290)
* Add `find_edges` method to `Image` class ([#383](#383)) ([d14b6ce](d14b6ce)), closes [#288](#288)
* Add `StandardScaler` transformer ([#316](#316)) ([57b0572](57b0572)), closes [#142](#142)
* Add docstrings to the getter methods for hyperparameters in Regression and Classification models ([#371](#371)) ([9073f04](9073f04)), closes [#313](#313)
* Added `Table.group_by` to group a table by a given key ([#343](#343)) ([afb98be](afb98be)), closes [#160](#160)
* Added and improved errors and warnings in the table transformers ([#372](#372)) ([544e307](544e307)), closes [#152](#152)
* added crop() method in image and tests ([#365](#365)) ([eba8163](eba8163))
* added invert_colors method ([#367](#367)) ([1e4d110](1e4d110))
* adjust brightness and contrast of image ([#368](#368)) ([1752feb](1752feb)), closes [#289](#289) [#291](#291)
* blur Image method ([#363](#363)) ([c642176](c642176))
* check that methods of table can handle an empty table ([#314](#314)) ([686c2e7](686c2e7)), closes [#123](#123)
* convert image to grayscale ([#366](#366)) ([1312fe7](1312fe7)), closes [#287](#287)
* enhance `replace_column` to accept a list of new columns ([#312](#312)) ([d50c5b5](d50c5b5)), closes [#301](#301)
* Explicitly throw `UnknownColumnNameError` in `TaggedTable._from_table` ([#334](#334)) ([498999f](498999f)), closes [#333](#333)
* flip images / eq method for image ([#360](#360)) ([54f4ae1](54f4ae1)), closes [#280](#280)
* improve `table.summary`. Catch `ValueError` thrown by `column.stability` ([#390](#390)) ([dbbe0e3](dbbe0e3)), closes [#320](#320)
* improve error handling of `column.stability` when given a column that contains only None ([#388](#388)) ([1da2499](1da2499)), closes [#319](#319)
* Improve Error Handling of classifiers and regressors ([#355](#355)) ([66f5f64](66f5f64)), closes [#153](#153)
* Resize image ([#354](#354)) ([3a971ca](3a971ca)), closes [#283](#283)
* rotate_left and rotate_right added to Image ([#361](#361)) ([c877530](c877530)), closes [#281](#281)
* set kernel of support vector machine ([#350](#350)) ([1326f40](1326f40)), closes [#172](#172)
* sharpen image ([#364](#364)) ([3444700](3444700)), closes [#286](#286)

### Bug Fixes

* Keeping no columns with Table.keep_only_columns results in an empty Table with a row count above 0 ([#386](#386)) ([15dab06](15dab06)), closes [#318](#318)
* remove default value of `positive_class` parameter of classifier metrics ([#382](#382)) ([58fc09e](58fc09e))
* remove default value of `radius` parameter of `blur` ([#378](#378)) ([7f07f29](7f07f29))
@lars-reimann
Copy link
Member Author

🎉 This issue has been resolved in version 0.14.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@lars-reimann lars-reimann added the released Included in a release label Jun 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement 💡 New feature or request released Included in a release testing 🧪 Additional automated tests
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

2 participants