-
Notifications
You must be signed in to change notification settings - Fork 157
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
Evaluate against multiple measures #104
Conversation
A note: |
@ablaom Sure, it'd be easier to just change the constructor for |
Yes, the Resample constructor should have resampler = Resampler(model=clone,
resampling=tuned_model.resampling,
measure=measure,
operation=tuned_model.operation) I think all that is necessary to fix this is to change the third line to |
Got it. Will push the changes. |
@ablaom Please review. |
Great, thanks for that.
"measures=$_measures \n"*
x1 = ones(10)
x2 = ones(10)
X = DataFrame(x1=x1, x2=x2)
y = [1.0, 1.0, 2.0, 2.0, 1.0, 1.0, 2.0, 2.0, 1.0, 1.0]
cv=CV(nfolds=5)
model = ConstantRegressor()
mach = machine(model, X, y)
evaluate!(mach, resampling=cv, measures=[rms, rmslp1]) we get (MLJ.rms = 0.5, MLJ.rmslp1 = 0.22314355131420982)
(MLJ.rms = 0.75, MLJ.rmslp1 = 0.287682072451781)
(MLJ.rms = 0.5, MLJ.rmslp1 = 0.22314355131420982)
(MLJ.rms = 0.75, MLJ.rmslp1 = 0.287682072451781)
(MLJ.rms = 0.5, MLJ.rmslp1 = 0.22314355131420982) But we want (MLJ.rms=[0.5, 0.75, 0.5, 0.75, 0.5], MLJ.rmslp1=[0.223, 0.287, ...., ])
result = evaluate!(mach, resampling=holdout, measures=[rms, rmslp1])
@test result isa NamedTuple And, after the current line 37, add result = evaluate!(mach, resampling=cv, measures=[rms, rmslp1])
@test result isa NamedTuple |
Ah, my mistake. My new test mucks up the consequent test. How about you just comment out the new test lines and I will fix this later? |
Looks like your error this time. You have an array where a number is expected. Let me know if you want me to have a look at it. |
Ah, my bad. I forgot to test cases when single measure is used. Fixed it this time. |
Thanks! |
Initial fix for : #98