StevenReitsma / kaggle-national-data-science-bowl

National Data Science Bowl competition entry for the Best Whale Wow team of the Radboud University Nijmegen. We ended 68th.
1 stars 0 forks source link

Standard deviation/variance metadata #23

Closed gzuidhof closed 9 years ago

gzuidhof commented 9 years ago

Standard deviation / variance of all images metadata

Online calculation of standard deviation based on Knuth's algorithm found here.

This is written to the metadata as a 1D image and can be retrieved as such:

In [1]: metadata = util.load_metadata()

In [2]: metadata['var_image']
Out[2]: 
array([ 14.39167962,  25.04213182,  47.4523108 , ...,  77.88116251,
        49.88526791,  27.24028381])

In [3]: metadata['std_image']
Out[3]: 
array([ 3.79363673,  5.00421141,  6.88856377, ...,  8.82503045,
        7.06295037,  5.21922253])

Plotting of these images

Added utility functions for plotting the std/var of images.

Plot mean/std of image Plot var of image

Fix lazy preprocessing

Checking whether preprocessing is already done or not didn't check for file existence or empty file. Now it does.