Exemple #1
0
    def __init__(self, scoring_key, model_config, loss_type):
        self.scoring_key = scoring_key
        self.model_config = model_config
        self.loss_type = loss_type

        self.architecture_op = architecture_factory.get_architecture(
            model_config=model_config)
Exemple #2
0
    def architecture_op(self, train_features, metadata_features):
        """
        Define and apply the architecture of the model to produce scores from
        transformed features produced by the InteractionModel

        Parameters
        ----------
        train_features : Tensor object
            Dense feature tensor object that is used to compute the model score
        metadata_features : dict of tensor objects
            Dictionary of tensor objects that are not used for training,
            but can be used for computing loss and metrics

        Returns
        -------
        scores : Tensor object
            Tensor object of the score computed by the model
        """
        return architecture_factory.get_architecture(
            model_config=self.model_config,
            feature_config=self.feature_config,
            file_io=self.file_io,
        )(train_features, metadata_features)
Exemple #3
0
 def architecture_op(self, train_features, metadata_features):
     return architecture_factory.get_architecture(
         model_config=self.model_config,
         feature_config=self.feature_config,
         file_io=self.file_io,
     )(train_features)