piel.experimental.measurements.experiment#

Functions#

compose_measurement_from_experiment_instance(...)

This function is meant to be run after the measurements have been collected and the data exists within the measurement directories.

compose_measurement_collection_from_experiment(...)

This function takes a defined experiment and returns a measurement collection from them.

load_from_directory(...)

This function is inputted a directory, and the aim is to read the corresponding metadata to extract

load_experiment_collection(...)

This function is provided a directory which contains subdirectories of experiments. It will load all the experiments

Module Contents#

compose_measurement_from_experiment_instance(experiment_instance: piel.types.experimental.ExperimentInstance, instance_directory: piel.types.PathTypes, configuration_measurement_map: dict = configuration_to_measurement_map, measurement_composition_method_mapping: dict = measurement_composition_method_mapping, composition_methods_kwargs: dict = None, **kwargs) piel.types.experimental.MeasurementTypes[source]#

This function is meant to be run after the measurements have been collected and the data exists within the measurement directories. Each experiment instance should correspond to a list of measurement configurations, ie the specific set of measurements

that are required at each directory generated for the measurement instance. Hence, for this function to work properly, it is required to have a mapping between experiment configuration measurement and measurement classes accordingly. The mapping will be between a given MeasurementConfiguration type and a Measurement class which has the references of the data containers accordingly.

compose_measurement_collection_from_experiment(experiment: piel.types.experimental.Experiment, experiment_directory: piel.types.PathTypes = None, **kwargs) piel.types.experimental.MeasurementCollectionTypes[source]#

This function takes a defined experiment and returns a measurement collection from them. Note that the complexity of this is verifying that the experiment is composed of the same type of measurements accordingly. TODO this should be validated in the Experiment composition accordingly.

load_from_directory(parent_directory: piel.types.PathTypes) piel.types.experimental.ExperimentInstance | piel.types.experimental.Experiment[source]#

This function is inputted a directory, and the aim is to read the corresponding metadata to extract the model definition used to re-instantiate the class instance a Python object. This is useful for when we want to load a previously saved experiment instance.

Parameters:

parent_directory (PathTypes) – The directory where the metadata file is located.

Returns:

The corresponding experiment instance or experiment object

Return type:

ExperimentInstance | Experiment

load_experiment_collection() piel.types.experimental.ExperimentCollection[source]#

This function is provided a directory which contains subdirectories of experiments. It will load all the experiments and return an ExperimentCollection object.