keras-molecules icon indicating copy to clipboard operation
keras-molecules copied to clipboard

Encoding representations

Open hkmztrk opened this issue 7 years ago • 5 comments

Hello,

I'm pretty new to autoencoders and I know we can use utilize them for unsupervised learning. Is it possible to use this model to create representations (with encoding) for a set of SMILES?

If so, I guess first I had to preprocess my data set, then use sample.py ?

Thanks!

hkmztrk avatar May 17 '17 10:05 hkmztrk

That's exactly right. Have you taken a look at the Gomez-Bombarelli paper linked in the README?

On Wed, May 17, 2017 at 6:54 AM, hkmztrk [email protected] wrote:

Hello,

I'm pretty new to autoencoders and I know we can use utilize them for unsupervised learning. Is it possible to use this model to create representations (with encoding) for a set of SMILES?

If so, I guess first I had to preprocess my data set, then usesample.py ?

Thanks!

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/maxhodak/keras-molecules/issues/64, or mute the thread https://github.com/notifications/unsubscribe-auth/AFGDhslq3v_TLfGwwvU9PtNIjZdSQbkZks5r6tHTgaJpZM4NdshN .

pechersky avatar May 17 '17 12:05 pechersky

Yes, it was that paper led me to here. Thanks!

hkmztrk avatar May 17 '17 14:05 hkmztrk

Last time I checked the VAE encodings were pretty substantial in size, so if you're trying to learn from a large set of SMILES it might be more feasible to generate them on the fly.

liamnaka avatar May 25 '17 00:05 liamnaka

Hello, thanks for your suggestion. Sorry for my asking but, how do we generate them on the fly? Aren't we supposed to learn the model first? How do we do that?

hkmztrk avatar May 25 '17 07:05 hkmztrk

Those reasons are why we developed sample_gen.py and train_gen.py, which generate the one-hot representations on the fly and can train the model using the fit_generator functionality of Keras.

To train the model in such a way, run python train_gen.py structures.h5 model.h5, where structures.h5 is an h5 file containing structures under the 'structure' key. Check out the source for train_gen.py for more details.

On Thu, May 25, 2017 at 3:01 AM, hkmztrk [email protected] wrote:

Hello, thanks for your suggestion. Sorry for my asking but, how do we generate them on the fly? Aren't we supposed to learn the model first? How do we do that?

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/maxhodak/keras-molecules/issues/64#issuecomment-303939205, or mute the thread https://github.com/notifications/unsubscribe-auth/AFGDhp7WKoES35uWL3zu54DUfSzIf7Upks5r9SdagaJpZM4NdshN .

pechersky avatar May 25 '17 14:05 pechersky