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

range(SVC, :gamma, ...) returns NominalRange instead of NumericRange #170

Closed
oleskiewicz opened this issue Jun 20, 2019 · 3 comments
Closed

Comments

@oleskiewicz
Copy link
Contributor

Describe the bug

using MLJ
@load SVC
svc = SVC()
gamma_range = range(svc, :gamma, lower=0.5, upper=1.5, scale=:linear)

Expected behavior
A NumericRange should be returned.

Additional context

using MLJ
@load SVC
svc = SVC()
gamma_range = range(svc, :gamma, values=[0.5, 1.0, 1.5])

This works, because Base.range in src/parameters.jl implementation returns NominalRange.

Versions

Juliav1.1, MLJ.jl#master (5a18eee)
@oleskiewicz oleskiewicz changed the title range(SVC, :gamma, ...) requires NominalRange instead of NumericRange range(SVC, :gamma, ...) returns NominalRange instead of NumericRange Jun 20, 2019
@oleskiewicz
Copy link
Contributor Author

Fixed by #171, with a caveat that svc needs to be initialised with a numerical, not automatic :gamma:

using MLJ; @load SVC;
svc = SVC(gamma=0.5)
gamma_range = range(svc, :gamma, lower=0.5, upper=1.5, scale=:linear)

@ablaom
Copy link
Member

ablaom commented Jun 24, 2019

I have stopped the offending mutation of model structs in the fit methods of LIBSVM, which should resolve this issue.

@oleskiewicz Would you be so kind as to check this is fixed in your notebook and close this issue if all okay?

@ablaom
Copy link
Member

ablaom commented Jun 25, 2019

oops, I see I need to merge your PR first. looking at that now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants