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

Missing link between model and test data (if you don't store the predictions) #591

Closed
nanounanue opened this issue Feb 5, 2019 · 3 comments
Assignees

Comments

@nanounanue
Copy link
Contributor

Running triage without storing the predictions (in CLI: --no-save-predictions flag) apparently "breaks" the connection between model and test matrix.

What do I mean by "breaks" is that (again, apparently) there is no way to see, in the DB in which matrix the model was tested.

Originally, one possible query to do that was:

select distinct
    model_id,
    model_group_id, train_end_time,
    model_hash,
    pr.matrix_uuid as test_matrix_uuid,
    ma.num_observations as observations,
    ma.lookback_duration as feature_lookback_duration,  ma.feature_start_time
from
    model_metadata.models as mo
    join
    test_results.predictions as pr using (model_id)
    join
    model_metadata.matrices as ma on pr.matrix_uuid = ma.matrix_uuid
order by
    model_group_id, train_end_time asc;

Any ideas?

@thcrock
Copy link
Contributor

thcrock commented Feb 5, 2019

This brings up a good point. I think that the evaluation tables should have the matrix uuid just like the predictions table has.

As far as how to achieve this now, I think you could do a JSON join from specific fields in the matrix_metadata column in the matrices table and columns from the evaluation table.

@nanounanue
Copy link
Contributor Author

I totally agree with you, Should I rename the issue?

@thcrock
Copy link
Contributor

thcrock commented Feb 5, 2019

Sure, and add it to the project in the "let's do" column.

@thcrock thcrock self-assigned this Feb 5, 2019
thcrock added a commit that referenced this issue Feb 5, 2019
- Add matrix uuid column to both train and test evaluations table
schemas,
updating the factory as well and adding migration to create it
- commit session in test util MockMatrixStore so the matrix actually
shows up in the database
- In ModelEvaluator, include matrix_uuid in evaluation data sent to
database
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants