Skip to content
This repository has been archived by the owner on Feb 22, 2020. It is now read-only.

Classification model pipeline #298

Merged
merged 4 commits into from
Jan 26, 2018

Conversation

vessemer
Copy link
Contributor

Pipeline to train and predict by the model was provided along with an interface for classification_model.

Reference to official issue

#131

Metrics:

Model' CPM score was described in PR #292:

CPM over 10-Fold cross validation:

0.125 0.25 0.5 1 2 4 8 Score (CPM)
0.595 0.670 0.731 0.793 0.835 0.868 0.887 0.76

froc_3dlrcnn

Item Config
GPU NVIDIA TITAN X
GPU memory usage 12GiB for batch size 32

CLA

  • I have signed the CLA; if other committers are in the commit history, they have signed the CLA as well

@vessemer
Copy link
Contributor Author

Currently, I'm working on the training part adjustment of grt123 algorithm.

@vessemer vessemer force-pushed the 131_additional_model branch from 30dc1a5 to d7a95e9 Compare January 24, 2018 23:50
@reubano
Copy link
Contributor

reubano commented Jan 25, 2018

Restarted the travis build since the error occurred before even reaching the tests.

pull_size (int): maximum amount of batches allowed to be stored in RAM.
"""

@abc.abstractmethod
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what does abstractmethod do in this case? Python docs say,

Using this decorator requires that the class’s metaclass is ABCMeta or is derived from it.

Also, why not use a new style class, i.e., class ClassificationModel(object):

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, thanks :)

@vessemer vessemer force-pushed the 131_additional_model branch from d7a95e9 to 73226c2 Compare January 26, 2018 02:15
@vessemer vessemer force-pushed the 131_additional_model branch from a7bd393 to dbf800e Compare January 26, 2018 02:36
@vessemer
Copy link
Contributor Author

Okh, this line along with removal this one makes me suffer for a while and force to code and tests updates. Unfortunately, at the moment of PR #272 I did not have the opportunity to provide a review, now to be clear:
First: ndarray coordinates of the real world point should be computed in this way: (point - origin) / spacingand not (point - origin) * spacing, where spacing is the shape of one voxel in real-world units.
Second: meta.spacing stores information of aforementioned voxel's shape, and if we apply affine transformation such as zoom, then meta.spacing should changes too, which is not the previous behaviour. The way that preprocess_ct.PreprocessCT handle spacing parameter is to zoom an ndarray exactly to this new spacing by setting zoom_fctr to be old_spacing / new_spacing this means that we need no more to store the old_spacing in meta and at the same time it's enough to store only current spacing for real-world - ndarray coordinates translations. That's why this line is important.
This mistakes were propagated to the tests in a way of coordinates picking.

Quick check:
tmp

@vessemer vessemer force-pushed the 131_additional_model branch from dbf800e to a4f5846 Compare January 26, 2018 03:07
@lamby
Copy link
Contributor

lamby commented Jan 26, 2018

@vessemer Can you rework your previous comment into the code itself? Remarks here are really really useful (!) but it won't be clear to anyone following the codebase later, you see...

@vessemer
Copy link
Contributor Author

@lamby, good point, done :)

@vessemer vessemer force-pushed the 131_additional_model branch from d921425 to f5e1619 Compare January 26, 2018 04:05
@vessemer vessemer force-pushed the 131_additional_model branch from f5e1619 to ab71933 Compare January 26, 2018 09:35
@lamby lamby merged commit 9087540 into drivendataorg:master Jan 26, 2018
@lamby
Copy link
Contributor

lamby commented Jan 26, 2018

Thanks!

@vessemer vessemer deleted the 131_additional_model branch January 26, 2018 22:11
@vessemer vessemer restored the 131_additional_model branch January 26, 2018 22:11
# predicted = trained_model.predict(dicom_paths[0], nodule_locations, model_path)
# assert predicted
# assert 0 <= predicted[0]['p_concerning'] <= 1
#

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why comment out these tests? Anything else needed to keep them passing?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not at all, just forget to uncomment them, done here

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

Successfully merging this pull request may close these issues.

3 participants