immuneML.IO.ml_method package¶
Submodules¶
immuneML.IO.ml_method.ClusteringExporter module¶
- class immuneML.IO.ml_method.ClusteringExporter.ClusteringExporter[source]¶
Bases:
object- static export(cl_item: ClusteringItem, path: Path) Path[source]¶
Export a clustering item’s components to disk.
- Parameters:
cl_item – The ClusteringItem to export
path – The directory where files will be stored
- Returns:
Path to the export directory
- static export_zip(cl_item: ClusteringItem, path: Path, setting_key: str) Path[source]¶
Export a clustering setting (encoder, dim reduction if any, clustering method) as a zip file.
- Parameters:
cl_item – The ClusteringItem containing the fitted encoder and clustering method
path – The directory where the export will be stored
setting_key – A key identifying this setting (used for naming)
- Returns:
Path to the created zip file
immuneML.IO.ml_method.ClusteringImporter module¶
- class immuneML.IO.ml_method.ClusteringImporter.ClusteringImporter[source]¶
Bases:
objectImport clustering settings and items from exported zip files.
- static import_clustering_item(config_dir: Path) Tuple[ClusteringItem, dict][source]¶
Import a ClusteringItem from an exported directory.
- Parameters:
config_dir – Path to the directory containing the exported clustering files
- Returns:
Tuple of (ClusteringItem, config dict)
immuneML.IO.ml_method.MLExporter module¶
immuneML.IO.ml_method.MLImport module¶
- class immuneML.IO.ml_method.MLImport.MLImport[source]¶
Bases:
object- static import_encoder(config: MLMethodConfiguration, config_dir: Path)[source]¶
- static import_label(config: MLMethodConfiguration) Label[source]¶
- static import_preprocessing_sequence(config: MLMethodConfiguration, config_dir) List[Preprocessor][source]¶
immuneML.IO.ml_method.MLMethodConfiguration module¶
- class immuneML.IO.ml_method.MLMethodConfiguration.MLMethodConfiguration(label_name: str = None, label_values: list = None, label_positive_class: str = None, encoding_name: str = None, encoding_class: str = None, encoding_parameters: dict = None, encoding_file: str = None, preprocessing_sequence_name: str = None, preprocessing_parameters: dict = None, preprocessing_file: str = None, ml_method: str = None, ml_method_name: str = None, train_dataset_id: str = None, train_dataset_name: str = None, software_used: str = None)[source]¶
Bases:
object- encoding_class: str = None¶
- encoding_file: str = None¶
- encoding_name: str = None¶
- encoding_parameters: dict = None¶
- label_name: str = None¶
- label_positive_class: str = None¶
- label_values: list = None¶
- ml_method: str = None¶
- ml_method_name: str = None¶
- preprocessing_file: str = None¶
- preprocessing_parameters: dict = None¶
- preprocessing_sequence_name: str = None¶
- software_used: str = None¶
- train_dataset_id: str = None¶
- train_dataset_name: str = None¶
immuneML.IO.ml_method.UtilIO module¶
- class immuneML.IO.ml_method.UtilIO.UtilIO[source]¶
Bases:
object- static export_comparison_data(comp_data: ComparisonData, path: Path)[source]¶
- static export_pairwise_comparison(pairwise_comparison: PairwiseRepertoireComparison, path: Path) Path[source]¶
- static import_comparison_data(path: Path) ComparisonData[source]¶
- static import_pairwise_comparison(path: Path) PairwiseRepertoireComparison[source]¶