xpdeep_model
Define the xpdeep explainable model.
Classes:
| Name | Description | 
|---|---|
XpdeepModel | 
            
               Xpdeep Model class.  | 
          
            XpdeepModel
#
    Xpdeep Model class.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
                               | 
            
                  TorchModel
             | 
            
               The feature extraction model, responsible to extract the most important and coherent features prior to the task you want to achieve.  | 
            required | 
                               | 
            
                  TorchModel
             | 
            
               The task learner model is responsible to achieve your task (classification etc.), given a set of meaningful extracted features.  | 
            required | 
                               | 
            
                  TorchModel | None
             | 
            
               The backbone model, having the same role as a traditional backbone model on a neural network. default None.  | 
            
                  None
             | 
          
                               | 
            
               Internal parameters and architecture of the Xpdeep explainable model.  | 
            required | |
                               | 
            
                  int
             | 
            
               Seed for reproducibility.  | 
            
                  0
             | 
          
Methods:
| Name | Description | 
|---|---|
from_torch | 
              
                 Build a xpdeep model from torch modules.  | 
            
get_output_size | 
              
                 Infer the model output size without batch size as it is required to serialize a loss function.  | 
            
__repr__ | 
              
                 Represent the model.  | 
            
Attributes:
| Name | Type | Description | 
|---|---|---|
feature_extraction | 
            
                  TorchModel
             | 
            
               | 
          
task_learner | 
            
                  TorchModel
             | 
            
               | 
          
decision_graph_parameters | 
            
                  ModelDecisionGraphParameters
             | 
            
               | 
          
backbone | 
            
                  TorchModel | None
             | 
            
               | 
          
seed | 
            
                  int
             | 
            
               | 
          
            feature_extraction: TorchModel
#
    
            task_learner: TorchModel
#
    
            decision_graph_parameters: ModelDecisionGraphParameters
#
    
            backbone: TorchModel | None = None
#
    
            seed: int = 0
#
    
            from_torch(fitted_schema: FittedSchema, feature_extraction: torch.nn.Module, task_learner: torch.nn.Module, decision_graph_parameters: ModelDecisionGraphParameters, backbone: torch.nn.Module | None = None) -> XpdeepModel
#
    Build a xpdeep model from torch modules.
Source code in src/xpdeep/model/xpdeep_model.py
              
            get_output_size(schema: FittedSchema) -> tuple[int, ...]
#
    Infer the model output size without batch size as it is required to serialize a loss function.
Source code in src/xpdeep/model/xpdeep_model.py
              
            __repr__() -> str
#
    Represent the model.