DeepMol icon indicating copy to clipboard operation
DeepMol copied to clipboard

Dataset `to_csv` method fails for non tabular data.

Open jcorreia11 opened this issue 2 years ago • 0 comments

When computing non-tabular features, like one-hot-encoding, the to_csv method in the Dataset class fails. I think this is the correct behavior as pandas can only save tabular data to CSV files.

However, I think we should support saving/loading other types of data. In the case of one-hot-encodings a simple save/load with numpy should do the trick:

np.save('path...', dataset.X)

...

dataset.X = np.load('path...')

For other types of data other alternatives should be explored and implemented.

jcorreia11 avatar Jul 12 '23 16:07 jcorreia11