Skip to content

Loading Datasets

Matt Johnson edited this page Jun 29, 2025 · 1 revision

Loading Datasets

PySIDT fundamentally takes in Datum objects that combine an RMG Molecule object representation of the structure with the value and other information about the data point. RMG molecule objects can be constructed easily from smiles strings or from RMG adjacency list representations.

In the case of an prediction task on whole molecules construct a Datum object:

smiles = "CC"
Hf298 = 14329.3
weight = 0.4
uncertainty = 5000.0
mol = Molecule().from_smiles(smiles)
datum = Datum(mol,Hf298,weight=weight,uncertainty=uncertainty)

If we are instead predicting a property that is the result of individual labeled substructures of a molecule such as a reaction or a micro pKa we are interested in labeled structures:

adjlist = """
1    C u0 p0 c0 {2,S} {3,S} {4,S} {5,S}
2    H u0 p0 c0 {1,S}
3    H u0 p0 c0 {1,S}
4    H u0 p0 c0 {1,S}
5 *1 O u0 p2 c0 {1,S} {6,S}
6 *2 X u0 p0 c0 {5,S}
7 *3 X u0 p0 c0
"""
kf = 5.6e5
weight = 0.4
uncertainty = 5.0e5
mol = Molecule().from_adjacency_list(adjlist)
datum = Datum(mol,kf,weight=weight,uncertainty=uncertainty)

For the default algorithms the value, weight, and uncertainty in the Datum object must be scalars apart from the classification algorithm where value must be a boolean. However, the Datum object is intended to accommodate any objects for these values so long as users use inheritance to adjust how the particular Datum objects should be processed in select_node or select_nodes, fit_tree and evaluate.

Clone this wiki locally