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
Hi! I am new to deepchem and I am trying to build a classification model based on HIV.csv dataset. But during the fitting of the model I got the following error: AttributeError: 'numpy.ndarray' object has no attribute 'atom_features'. The corresponding code is given below:
import deepchem as dc
import pandas as pd
import os
df = pd.read_csv("HIV.csv")
❓ Questions & Help
Hi! I am new to deepchem and I am trying to build a classification model based on HIV.csv dataset. But during the fitting of the model I got the following error: AttributeError: 'numpy.ndarray' object has no attribute 'atom_features'. The corresponding code is given below:
import deepchem as dc
import pandas as pd
import os
df = pd.read_csv("HIV.csv")
smiles = df["smiles"][:100]
labels = df["HIV_active"][:100]
import deepchem as dc
featurizer = dc.feat.CircularFingerprint()
loader = dc.data.InMemoryLoader(tasks=["task1"], featurizer=featurizer)
dataset = loader.create_dataset(zip(smiles, labels), shard_size=2)
len(dataset)
from deepchem.splits.splitters import RandomSplitter
split_dataset = RandomSplitter()
train_data,valid_data,test_data=split_dataset.train_valid_test_split(dataset, frac_train= 0.8, frac_valid= 0.1, frac_test= 0.1, seed=23)
transformer = dc.trans.BalancingTransformer(dataset=dataset)
dataset = transformer.transform(dataset)
model = dc.models.GraphConvModel(n_tasks=1, mode='classification', graph_conv_layers=[128,128], dropout=0.20)
model.fit(train_data, nb_epoch=100)
The text was updated successfully, but these errors were encountered: