You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is just a reference for me in the future and also for people who encounter the same problem as I did.
It seems like the codes won't work with Tanimoto kernel. It was caused by the list type nature of input data. Adding a conditional statement to convert inputs from list to ndarray for both the training and testing should work:
For training:
if kwargs['kernel'] not in ['tanimoto']:
model.fit([x[0] for x in data[0]['mols']], data[0]['y'])
else:
train_x = np.array([x[0] for x in data[0]['mols']])
train_y = np.array(data[0]['y'])
For testing:
if kwargs['kernel'] not in ['tanimoto']:
predicted_y = model.predict(test_x)
else:
test_x = np.array(test_x)
predicted_y = model.predict(test_x)
The text was updated successfully, but these errors were encountered:
Dear professor,
This is just a reference for me in the future and also for people who encounter the same problem as I did.
It seems like the codes won't work with Tanimoto kernel. It was caused by the list type nature of input data. Adding a conditional statement to convert inputs from list to ndarray for both the training and testing should work:
For training:
For testing:
The text was updated successfully, but these errors were encountered: