immuneML.reports.gen_model_reports package¶
Submodules¶
immuneML.reports.gen_model_reports.GenModelReport module¶
- class immuneML.reports.gen_model_reports.GenModelReport.GenModelReport(dataset: Dataset = None, model: GenerativeModel = None, result_path: Path = None, name: str = None)[source]¶
Bases:
Report,ABCGenerative model reports show some type of features or statistics about a generative model.
- DOCS_TITLE = 'Generative model reports'¶
immuneML.reports.gen_model_reports.PWMSummary module¶
- class immuneML.reports.gen_model_reports.PWMSummary.PWMSummary(dataset: Dataset = None, model: GenerativeModel = None, result_path: Path = None, name: str = None)[source]¶
Bases:
GenModelReportThis report provides the summary of the baseline PWM and shows the following:
probabilities of generated sequences having different lengths
PWMs for each length with positive probability
This report takes no input arguments.
YAML specification:
my_pwm_summary: PWMSummary
- classmethod build_object(**kwargs)[source]¶
Creates the object of the subclass of the Report class from the parameters so that it can be used in the analysis. Depending on the type of the report, the parameters provided here will be provided in parsing time, while the other necessary parameters (e.g., subset of the data from which the report should be created) will be provided at runtime. For more details, see specific direct subclasses of this class, describing different types of reports.
- Parameters:
**kwargs – keyword arguments that will be provided by users in the specification (if immuneML is used as a command line tool) or in the dictionary when calling the method from the code, and which should be used to create the report object
- Returns:
the object of the appropriate report class
- check_prerequisites() bool[source]¶
Checks prerequisites for the generation of the report of specific class (e.g., if the class of the MLMethod instance is the one required by the report, if the data has been encoded to make a report of encoded dataset). In the instructions in immuneML, this function is used to determine whether to call generate_report() in the specific situation. Each report subclass has its own set of prerequisites. If the report cannot be run, the information on this will be logged and the report skipped in the specific situation. No error will be raised. See subclasses of the class
Instructionfor more information on how the reports are executed.- Returns:
boolean value True if the prerequisites are o.k., and False otherwise.
immuneML.reports.gen_model_reports.VAESummary module¶
- class immuneML.reports.gen_model_reports.VAESummary.VAESummary(dim_dist_rows: int, dim_dist_cols: int, dataset: Dataset = None, model: SimpleVAE = None, result_path: Path = None, name: str = None, dim_red_method: DimRedMethod = None)[source]¶
Bases:
GenModelReportThis report provides the summary of the train SimpleVAE and shows the following:
plots of the latent space after applying a dimensionality reduction method to reduce the data to 2 dimensions, highlighted by V and J gene
plots the histogram for each latent dimension
plots loss per epoch
Specification arguments:
dim_dist_cols (int): how many columns to use to plot the histograms of latent dimensions (either this or dim_dist_rows has to be set, or both)
dim_dist_rows (int): how many rows to use to plot the histogram of latent dimensions (either this or dim_dist_cols has to be set, or both)
dim_red_method (dict): which dimensionality reduction method to use along with its parameters; the method has to return 2 dimensions; see Dimensionality reduction methods for available options; default is PCA with 2 components
YAML specification:
definitions: reports: my_vae_summary: VAESummary: dim_dist_cols: 4 dim_dist_rows: None dim_red_method: PCA: n_components: 2
- classmethod build_object(**kwargs)[source]¶
Creates the object of the subclass of the Report class from the parameters so that it can be used in the analysis. Depending on the type of the report, the parameters provided here will be provided in parsing time, while the other necessary parameters (e.g., subset of the data from which the report should be created) will be provided at runtime. For more details, see specific direct subclasses of this class, describing different types of reports.
- Parameters:
**kwargs – keyword arguments that will be provided by users in the specification (if immuneML is used as a command line tool) or in the dictionary when calling the method from the code, and which should be used to create the report object
- Returns:
the object of the appropriate report class
- check_prerequisites() bool[source]¶
Checks prerequisites for the generation of the report of specific class (e.g., if the class of the MLMethod instance is the one required by the report, if the data has been encoded to make a report of encoded dataset). In the instructions in immuneML, this function is used to determine whether to call generate_report() in the specific situation. Each report subclass has its own set of prerequisites. If the report cannot be run, the information on this will be logged and the report skipped in the specific situation. No error will be raised. See subclasses of the class
Instructionfor more information on how the reports are executed.- Returns:
boolean value True if the prerequisites are o.k., and False otherwise.
- property dim_red_method_name: str¶