-
Notifications
You must be signed in to change notification settings - Fork 132
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
How to output predicted values? #362
Comments
Yes, as you written this code is the way to predict values. Ref QM9 examples. Below is some explanations,
|
Many thanks for your kind reply. Your answer greatly helped me decipher the code. Here's one more related question. I've run
together with the output
So the bottom line is that the model shows underfitting instead of overfitting. It is a surprise for me that after 1000 epochs the model still doesn't fit the training data well. What's going on here? |
I think I found a solution to the puzzle. I modified the line Do you agree that this is the right remedy? |
Thank you for investigating issue, yeah I think so! |
A new problem (bug?) was found regarding the methods "schnet" and "weavenet", which I report now. Since I have understood the correct way to extract prediction values (see my previous reply), next I tested all the methods in this model: nfp, ggnn, schnet, weavenet, rsgcn, relgcn and relgat, which can be specified in the --method option of the code. I trained the model on "dataset_train.csv" for 10 epochs and then tried prediction on "dataset_test.csv" which includes just 10 samples. I expected (of course) that 10 predictions would be returned, but to my surprise, the number of prediction values returned by each method was as given below.
What's happening with schnet and weavenet? They seem to fail on some molecules. At least they seem to "ignore" some molecules. Is this a known bug? I didn't change any hyperparameter of the model, so anyone should be able to reproduce this behavior immediately. (I specified the same method in training and prediction, needless to say.) To gain more understanding, I've also run the code "predict_own_dataset.py" on "dataset_train.csv" which includes 90 samples. Here's the number of prediction values I got by specifying each method:
So, schnet fails on 2 molecules and weavenet fails on 12 molecules. What's causing this strange behavior? |
Preprocessing is depending on network, and some molecular feature extraction fail within rdkit function (some feature cannot be extracted for some feature for some molecule). Especially, SchNet need to calculate 3-D position of atom, and weavenet calculates a lot of molecule feature and it somtimes fail. |
Hi,
I have a question about "chainer-chemistry/examples/own_dataset/". In the example code "predict_own_dataset.py" the outcomes of the prediction are neither displayed nor saved. Instead it only yields simple metrics for evaluation such as MAE. But I'd like to see every single prediction. Then what would be the minimal modification of the code that enables the code to yield all the predicted values?
I looked into the codes for anothe example of qm9 and from there I have just copy-and-pasted the following snippet into "predict_own_dataset.py".
which somehow worked. However I'm not 100% sure if this is the right thing to do. Is this the correct way to extract the predicted values, or is there any other (perhaps more elegant) way?
Thanks in advance.
The text was updated successfully, but these errors were encountered: