def set_dynamic_attributes()

in orbit/template/lgt.py [0:0]


    def set_dynamic_attributes(self, df, training_meta):
        """Set required input based on input DataFrame, rather than at object instantiation.  It also set
        additional required attributes for LGT"""
        super().set_dynamic_attributes(df, training_meta)
        # scalar value is suggested by the author of Rlgt
        self.cauchy_sd = max(training_meta[TrainingMetaKeys.RESPONSE.value]) / 30.0
        if any(
            training_meta[TrainingMetaKeys.RESPONSE.value][self.is_valid_response] < 0
        ):
            raise DataInputException(
                "LGT model does not allow negative response values.."
            )

        # extra validation and settings for regression
        self._validate_training_df_with_regression(df)
        # depends on num_of_observations
        self._set_regressor_matrix(df, training_meta[TrainingMetaKeys.NUM_OF_OBS.value])