leaspy.datasets.loader.Loader
- class Loader
Bases:
objectContains static methods to load synthetic longitudinal dataset, calibrated
Leaspyinstances &IndividualParameters.Notes
A Leaspy instance named
<name>have been calibrated on the dataset<name>.An IndividualParameters name
<name>have been computed by personalizing the Leaspy instance named<name>on the dataset<name>.
See the documentation of each method to get their respective available names.
- Attributes:
- data_pathsdict [str, str]
Contains the datasets’ names and their respective path within
leaspy.datasetssubpackage.- model_pathsdict [str, str]
Contains the Leaspy instances’ names and their respective path within
leaspy.datasetssubpackage.- ip_pathsdict [str, str]
Contains the individual parameters’ names and their respective path within
leaspy.datasetssubpackage.
Methods
load_dataset(dataset_name)Load synthetic longitudinal observations mimicking cohort of subjects with neurodegenerative disorders.
load_individual_parameters(ip_name)Load a Leaspy instance with a model already calibrated on the synthetic dataset corresponding to the name of the instance.
load_leaspy_instance(instance_name)Load a Leaspy instance with a model already calibrated on the synthetic dataset corresponding to the name of the instance.
- static load_dataset(dataset_name)
Load synthetic longitudinal observations mimicking cohort of subjects with neurodegenerative disorders.
- Parameters:
- dataset_name{‘parkinson-multivariate’, ‘alzheimer-multivariate’, ‘parkinson-putamen’, ‘parkinson-putamen-train_and_test’}
Name of the dataset.
- Returns:
pandas.DataFrameDataFrame containing the IDs, timepoints and observations.
Notes
All DataFrames have the same structures.
Index: a
pandas.MultiIndex-['ID', 'TIME']which contain IDs and timepoints. The DataFrame is sorted by index. So, one line corresponds to one visit for one subject. The DataFrame having ‘train_and_test’ in their name also have'SPLIT'as the third index level. It differentiate train and test data.Columns: One column correspond to one feature (or score).
- static load_individual_parameters(ip_name)
Load a Leaspy instance with a model already calibrated on the synthetic dataset corresponding to the name of the instance.
- Parameters:
- ip_name{‘alzheimer-multivariate’, ‘parkinson-multivariate’, ‘parkinson-putamen-train’}
Name of the individual parameters.
- Returns:
IndividualParametersLeaspy instance with a model already calibrated.
- static load_leaspy_instance(instance_name)
Load a Leaspy instance with a model already calibrated on the synthetic dataset corresponding to the name of the instance.
- Parameters:
- instance_name{‘alzheimer-multivariate’, ‘parkinson-multivariate’, ‘parkinson-putamen-train’}
Name of the instance.
- Returns:
LeaspyLeaspy instance with a model already calibrated.