qsprpred.benchmarks.settings package

Submodules

qsprpred.benchmarks.settings.benchmark module

class qsprpred.benchmarks.settings.benchmark.BenchmarkSettings(name: str, n_replicas: int, random_seed: int, data_sources: list[qsprpred.data.sources.data_source.DataSource], descriptors: list[list[qsprpred.data.descriptors.sets.DescriptorSet]], target_props: list[list[qsprpred.tasks.TargetProperty]], prep_settings: list[qsprpred.benchmarks.settings.data_prep.DataPrepSettings], models: list[qsprpred.models.model.QSPRModel], assessors: list[qsprpred.models.assessment.methods.ModelAssessor], optimizers: list[qsprpred.models.hyperparam_optimization.HyperparameterOptimization] = ())[source]

Bases: JSONSerializable

Class that determines settings for a benchmarking run.

Variables:
assessors: list[qsprpred.models.assessment.methods.ModelAssessor]
checkConsistency()[source]

Checks if the settings are consistent.

Raises:

AssertionError – If the settings are inconsistent.

data_sources: list[qsprpred.data.sources.data_source.DataSource]
descriptors: list[list[qsprpred.data.descriptors.sets.DescriptorSet]]
classmethod fromFile(filename: str) Any

Initialize a new instance from a JSON file.

Parameters:

filename (str) – path to the JSON file

Returns:

new instance of the class

Return type:

instance (object)

classmethod fromJSON(json: str) Any

Reconstruct object from a JSON string.

Parameters:

json (str) – JSON string of the object

Returns:

reconstructed object

Return type:

obj (object)

models: list[qsprpred.models.model.QSPRModel]
n_replicas: int
name: str
optimizers: list[qsprpred.models.hyperparam_optimization.HyperparameterOptimization] = ()
prep_settings: list[qsprpred.benchmarks.settings.data_prep.DataPrepSettings]
random_seed: int
target_props: list[list[qsprpred.tasks.TargetProperty]]
toFile(filename: str) str

Serialize object to a JSON file. This JSON file should contain all data necessary to reconstruct the object.

Parameters:

filename (str) – filename to save object to

Returns:

absolute path to the saved JSON file of the object

Return type:

filename (str)

toJSON() str
Serialize object to a JSON string. This JSON string should

contain all data necessary to reconstruct the object.

Returns:

JSON string of the object

Return type:

json (str)

qsprpred.benchmarks.settings.data_prep module

class qsprpred.benchmarks.settings.data_prep.DataPrepSettings(data_filters: list | None = (<qsprpred.data.processing.data_filters.RepeatsFilter object>, ), split: ~qsprpred.data.sampling.splits.DataSplit = None, smiles_standardizer: str | ~typing.Callable = 'chembl', feature_filters: list = None, feature_standardizer: ~qsprpred.data.processing.feature_standardizers.SKLearnStandardizer = None, feature_fill_value: float = 0.0, shuffle: bool = True)[source]

Bases: object

Class that determines settings for data preparation. These are arguments passed to QSPRDataset.prepareDataset.

Variables:
  • data_filters (list) – Data filters to use.

  • split (DataSplit) – Data split to use.

  • smiles_standardizer (str or callable) – Standardizer to use for SMILES strings.

  • feature_filters (list) – Feature filters to use.

  • feature_standardizer (SKLearnStandardizer) – Standardizer to use for features.

  • feature_fill_value (float) – Fill value to use for features.

  • shuffle (bool) – Whether to shuffle the data.

data_filters: list | None = (<qsprpred.data.processing.data_filters.RepeatsFilter object>,)
feature_fill_value: float = 0.0
feature_filters: list = None
feature_standardizer: SKLearnStandardizer = None
shuffle: bool = True
smiles_standardizer: str | Callable = 'chembl'
split: DataSplit = None

Module contents