task_molecules = []
for i in range(n_tasks):
task_molecules.append(w[:, i].nonzero()[0])
// Create the model to train.
After Change
task_molecules = []
for i in range(n_tasks):
positives = [j for j in range(n_molecules) if w[j, i] > 0 and y[j, i] == 1]
negatives = [j for j in range(n_molecules) if w[j, i] > 0 and y[j, i] == 0]
task_molecules.append(
np.concatenate(