Giter Club home page Giter Club logo

hrm's People

Contributors

gsvam avatar lorenzori avatar pasquierjb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

hrm's Issues

ZCA not PCA

ZCA improves performance -- so we should replace PCA transform with ZCA. Problem - this requires using the Y variable as well to do feature selection once we have transformed variables by ZCA.

fyi this is Gaurav showing Jackson how to use Github tho the comment still applies

parallelization overhead too long

test to see if without the within-folder parallelization when downlaoding the images solves the issue of slow performance for images already downloaded.

master_utils depreicated

lets move the methods of download() and score_merge in mater_utils.py as methods of their respecive classes" img_lib and nn_extractor.

Scale, Normalize or Standardize ?

At the moment the features are standardized before the evaluation loops (mean removal and dividing by variance) with the following:
data_features = (data_features - data_features.mean()) / data_features.std() in master.py

And they are also normalized (mean removal and dividing by l2-norm) in each cross-validation fold with the following:
model = Ridge(normalize=True) in modeller.py

This is not optimal because:

  • Normalization cancels out Standardization in the Ridge regression
  • All data transformations should be done independantly in the cross-validation folds
  • Normalization is done for Ridge and not for the other models (this is not necessarly an issue)

Strangely for some configs (2000 for example) removing the normalization in the Ridge Regression impacts a lot the results (R2 from 20% to 0%)!

A possibility to implement more complexed transformations in cross-validation fold is to use the Pipeline class of sklearn. For example to perform scaling (between 0 and 1) and Ridge, we would do:

model = Ridge()
minmax_scaler = MinMaxScaler()
pipeline = make_pipeline(minmax_scaler, model)
scores = cross_val_score(pipeline, X, y)

However, my attempts to combine Normalization and Ridge in a piepline have led to very different results compared to using the normalize=True argument of the Ridge regression...

Fix bad zip file issue with GEE API

File "../Src/img_lib.py", line 183, in download_images
self._save_img(url, self.image_dir, file_name, provider)
File "../Src/img_lib.py", line 238, in _save_img
gee_tif = sentinel_utils.download_and_unzip(buffer, 3, 6, file_path)
File "../Src/sentinel_utils.py", line 88, in download_and_unzip
zip_file = ZipFile(buffer)
File "/home/anaconda3/envs/HRM/lib/python3.5/zipfile.py", line 1026, in init
self._RealGetContents()
File "/home/anaconda3/envs/HRM/lib/python3.5/zipfile.py", line 1093, in _RealGetContents
raise BadZipFile("File is not a zip file")
zipfile.BadZipFile: File is not a zip file

call predict() on batches of images

I think that loading batches of images and call the predict() at every batch should be much faster than calling the predict for every image.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.