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

CBPF IA Team models LSTM, Deep Ensemble, Jax/Flax Deep Learning Ensemble and others #25

Open
wants to merge 27 commits into
base: master
Choose a base branch
from

Conversation

cdebom
Copy link

@cdebom cdebom commented Jul 30, 2020

We added two models. One bidirectional LSTM and a conv1D.

@EiffL EiffL added the entry Challenge entry label Jul 30, 2020
@EiffL
Copy link
Member

EiffL commented Jul 30, 2020

@cdebom Fantastic! Thank you for your entry :-D Could you document in this thread some of your metric results if you have them?

@cdebom
Copy link
Author

cdebom commented Aug 5, 2020

Dear @EiffL , sorry for the late answer. We perform a couple of tests and retrieve the SNR_3x2 and FOM_3x2 for these two solutions. Here follows a table for the LSTM, later I will send the conv1D.

image

I updated the previous table since we found some issues in the calculations we had before.

We found, in our tests, SNR_3X2 ~1926 with 10 bins.
@cdebom cdebom changed the title LSTM and conv1D models LSTM, Conv1D, LightGBM models Aug 24, 2020
@cdebom
Copy link
Author

cdebom commented Aug 25, 2020

I just included the LightGBM model. These are the results we got from it:
image

image

Add TCN, AutoML LSTM classifiers,  added a custom data loader in  AutoML conv1d and Bidirectional LSTM.
Added Deep Ensemble model, including resnet, autolsm, fcn.
@cdebom
Copy link
Author

cdebom commented Aug 31, 2020

Here is summary of our models based on tensorflow/keras our team developed and uploaded:

  • Ensemble of Deep models

  • Bidirectional LSTM

  • Auto ML Bidirectional LSTM

  • Conv1D NN

  • AutoML Conv1D NN

  • Light GBM

  • Temporal Conv NN

Here are the contributors of our team: Clecio R. Bom (CBPF), Bernardo Fraga (CBPF), Gabriel Teixeira (CBPF), Eduardo Cypriano (USP) and Elizabeth Gonzalez (IATE-CONICET).

@cdebom cdebom changed the title LSTM, Conv1D, LightGBM models CBPF IA Team models Aug 31, 2020
Here we optimize for SNR score.
@cdebom
Copy link
Author

cdebom commented Aug 31, 2020

Additionally, we also added a solution based in JAX/FLAX. It is a LSTM that optimizes for SNR score. Thus we upload a total of 8 models.

@cdebom cdebom changed the title CBPF IA Team models CBPF IA Team models LSTM, Deep Ensemble, Flax NN an others Sep 1, 2020
@cdebom cdebom changed the title CBPF IA Team models LSTM, Deep Ensemble, Flax NN an others CBPF IA Team models LSTM, Deep Ensemble, Jax/Flax NN an others Sep 1, 2020
@cdebom cdebom changed the title CBPF IA Team models LSTM, Deep Ensemble, Jax/Flax NN an others CBPF IA Team models LSTM, Deep Ensemble, Jax/Flax NN and others Sep 1, 2020
@cdebom
Copy link
Author

cdebom commented Sep 5, 2020

We added JAX/FLAX Deep Ensemble model. For now we have 7 Tensorflow based entries and 2 NN using JAX/FLAX entries.

@cdebom cdebom changed the title CBPF IA Team models LSTM, Deep Ensemble, Jax/Flax NN and others CBPF IA Team models LSTM, Deep Ensemble, Jax/Flax Deep Learning Ensemble and others Sep 5, 2020
@joezuntz
Copy link
Collaborator

Hi @cdebom - thanks for your entries!

I'm currently making sure I can run things properly on my system. There are a couple of imports that I'm now missing

import jax_random as rand
import jax_numpy as jnp

should these be jax.random and jax.numpy?

@joezuntz
Copy link
Collaborator

Also it looks like at least one file may be missing, lightgbm.py

@joezuntz
Copy link
Collaborator

And hopefully finally, there are two different classes called ENSEMBLE - in DEEP_ENESMBLE_main.py and Deep_Ensemble_jax.py. Is one of them the right one to use, or should I just rename one so it doesn't clash?

@cdebom
Copy link
Author

cdebom commented Sep 16, 2020 via email

@joezuntz
Copy link
Collaborator

I just realized lightgbm is an external module. I'll install it. And I'll rename the ENSEMBLEs to ENSEMBLE1 and ENSEMBLE2. The challenge has closed now, so it's too late to modify any scientific things.

@cdebom
Copy link
Author

cdebom commented Sep 17, 2020 via email

@joezuntz
Copy link
Collaborator

joezuntz commented Sep 22, 2020

Hi @cdebom - I'm just putting together the full suite of runs we will do. I don't quite see what your custom loader does differently - is it just removing all the galaxies with inf values for the magnitudes? If so I will modify your entries so they just don't provide an estimate for undetected galaxies (which is what inf means)

@joezuntz
Copy link
Collaborator

And also are you sure you want to do this? In the standard data loader we just set the inf values to 30 instead, so if your problem was with them being inf specifcally that shouldn't be an issue. Possibly we added this feature after you wrote this.

@cdebom
Copy link
Author

cdebom commented Sep 22, 2020

Dear Joe, even setting to 30, we still see some difference in our deep models. For instance, using 10 bins, we found in the tensorflow based Ensemble (resnet, autolstm, fcn) with original loader and jax_metrics: SNR_3x2 : 1920.7 and FOM_3x2 : 10615.2, removing those galaxies in the custom loader we found SNR_3x2 : 1943.4 and FOM_3x2 : 10797.1.

@joezuntz
Copy link
Collaborator

Okay - I will tweak your code to assign those objects to no bin.

@cdebom
Copy link
Author

cdebom commented Sep 23, 2020

OK, thanks. Just to emphasize that this is something we notice in our models if we remove those galaxies both in training phase and testing phase. So this only makes sense if the training sample dataset has also these galaxies removed.

@joezuntz
Copy link
Collaborator

When I run the Flax_LSTM code I get this error:

  File "/home/jzuntz/tomo_challenge/bin/../tomo_challenge/classifiers/lstm_flax.py", line 82, in __init__
    self.n_features = options['n_feats']
KeyError: 'n_feats'

What value should n_feats have in the configuration? Is it just the total number of input columns or is it more complicated than that?

@cdebom
Copy link
Author

cdebom commented Sep 29, 2020 via email

@joezuntz
Copy link
Collaborator

Why is that a configuration input? Why is it not calculated from the data?

@cdebom
Copy link
Author

cdebom commented Oct 14, 2020

Just for the record, here are some of the results we had with 10 bins. Since training using jax was very computer intensive we tested using 10% of the data in a couple random choices of training set. To have a fair comparison with the other methods we also trained with 10%.

image

It is interesting to note that in the couple of runs of jax LSTM (optimized for SNR) there were variations in SNR_3X2 and FOM_3X2. However it seems that there is a trade off between those two, when one gets a bit higher the other gets a bit lower.

This is the binning plot for JAX autolstm run2

image

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

Successfully merging this pull request may close these issues.

3 participants