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

Correct manual entries regarding use of models with compound conditions. #340

Closed
ablaom opened this issue Nov 17, 2019 · 1 comment
Closed
Labels

Comments

@ablaom
Copy link
Member

ablaom commented Nov 17, 2019

Otherwise expressions like models(matching(X, y)) do m m.prediction_type == :deterministic end error because unsupervised models do not have prediction_type as a trait (despite the fact that matching(X, y) rules out unsupervised models).

@ablaom ablaom added the easy label Nov 17, 2019
ablaom added a commit that referenced this issue Nov 19, 2019
@ablaom
Copy link
Member Author

ablaom commented Nov 19, 2019

Okay, the use of all already makes this short-circuiting. I was forgetting that models(c1) do m c2(m) end is equivalent to models(c2, c1) and not models(c1, c2). So instead of trying to be clever (and failing) I should have simply performed

models() do m
    matching(m, X, y)  &&
    m.prediction_type == :deterministic
end

which works.

However, my entries in the manual and cheatsheet are flawed and need to be corrected

@ablaom ablaom changed the title Make evaluation of conditions in models(conditions...) and `measures(conditions...) short-circuit conjunctions Correct manual entries regarding use of models with compound conditions. Nov 19, 2019
ablaom added a commit that referenced this issue Nov 19, 2019
@ablaom ablaom closed this as completed Nov 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant