glambard / smiles-x Goto Github PK
View Code? Open in Web Editor NEWAutonomous characterization of molecular compounds from small datasets without descriptors
License: MIT License
Autonomous characterization of molecular compounds from small datasets without descriptors
License: MIT License
Dear Guillaume,
Thank you very much for sharing this. I try to run the notebook and I have some issues with the size of the problem. It is much bigger than yours and I use the same parameters. do you have an idea of what happened ?
My executed notebook
https://github.com/pnavaro/SMILES-X/blob/master/SMILESX_Prediction_github.ipynb
***Bayesian Optimization of the SMILESX's architecture.***
Random initialization:
Model: [[512. 512. 32. 128. 3.9]]
Best regards
Pierre
I tried using SMILES-X with a recent environment, and the example notebook is failing with the following error:
---------------------------------------------------------------------------
ImportError Traceback (most recent call last)
<ipython-input-4-84592a845c88> in <module>
1 import pandas as pd
2
----> 3 from SMILESX import main, inference
4 get_ipython().run_line_magic('matplotlib', 'inline')
~/git/SMILES-X/SMILESX/main.py in <module>
24 from sklearn.metrics import r2_score
25
---> 26 from SMILESX import utils, token, augm, model
27
28 np.set_printoptions(precision=3)
~/git/SMILES-X/SMILESX/model.py in <module>
4 from keras.layers import Embedding
5 from keras.layers.wrappers import Bidirectional
----> 6 from keras.layers import CuDNNLSTM, TimeDistributed
7
8 from keras.engine.topology import Layer
ImportError: cannot import name 'CuDNNLSTM' from 'keras.layers' (/home/elkhatim/miniconda3/envs/py38/lib/python3.8/site-packages/keras/layers/__init__.py)
This is due to the latest version of Keras deprecating CuDNNLSTM
. As I am under a conda environment with Python3.8, I tried installing the version 2.3.0
of Keras but not possible:
conda install -c conda-forge keras==2.3
UnsatisfiableError: The following specifications were found
to be incompatible with the existing python installation in your environment:
Specifications:
- keras==2.3.0 -> python[version='>=2.7,<2.8.0a0|>=3.6,<3.7.0a0|>=3.7,<3.8.0a0']
Your python: python=3.8
It seems the only way to use SMILES-X would be to install an environment with Python3.6 and use the Keras version posted above, which becomes very inconvenient on my setup to access my jupyterlab instance.
Validation metrics look much better while training. From the SMILESX_Prediction_github.ipynb
notebook:
273/273 [==============================] - 2s 8ms/step - loss: 0.0013 - mean_absolute_error: 0.0277 - mean_squared_error: 0.0013 - val_loss: 0.0101 - val_mean_absolute_error: 0.0625 - val_mean_squared_error: 0.0101
Best val_loss @ Epoch #37
***Predictions from the best model.***
For the training set:
MAE: 0.4164 RMSE: 0.5672 R^2: 0.9799
For the validation set:
MAE: 0.5921 RMSE: 0.8804 R^2: 0.9324
For the test set:
MAE: 0.4668 RMSE: 0.7007 R^2: 0.9350
Final predictions gives MAE: 0.5921
whereas the prediction during training gives val_mean_absolute_error: 0.0625
. I would put more trust in the "Predictions from the best model" because its averaging the result of augmented smiles. Is this the correct interpretation?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.