示例#1
0
 def set_default_params(self,
                        accuracy=None, time_tolerance=None, interpretability=None,
                        **kwargs):
     # First call the parent set_default_params
     LightGBMModel.set_default_params(
         self,
         accuracy=accuracy,
         time_tolerance=time_tolerance,
         interpretability=interpretability,
         **kwargs
     )
     # Then modify the parameters
     self.params["grow_policy"] = "lossguide"
     self.params["max_leaves"] = 8192
     self.params["max_depth"] = -1
示例#2
0
 def set_default_params(self,
                        accuracy=None,
                        time_tolerance=None,
                        interpretability=None,
                        **kwargs):
     # First call the LightGBM set_default_params
     # This will input all model parameters just like DAI would do.
     LightGBMModel.set_default_params(self,
                                      accuracy=accuracy,
                                      time_tolerance=time_tolerance,
                                      interpretability=interpretability,
                                      **kwargs)
     # Now we just need to tell LightGBM to do quantile regression
     self.params["objective"] = "quantile"
     self.params["alpha"] = QuantileRegressionLightGBMModel._quantile
 def set_default_params(self,
                        accuracy=None, time_tolerance=None, interpretability=None,
                        **kwargs):
     # First call the LightGBM set_default_params
     # This will input all model parameters just like DAI would do.
     LightGBMModel.set_default_params(
         self,
         accuracy=accuracy,
         time_tolerance=time_tolerance,
         interpretability=interpretability,
         **kwargs
     )
     # Now we just need to tell LightGBM to use tweedie distribution
     self.params["objective"] = "tweedie"
     self.params["tweedie_variance_power"] = TweedieLightGBMModel._tweedie_variance_power
    def set_default_params(self,
                           accuracy=None,
                           time_tolerance=None,
                           interpretability=None,
                           **kwargs):
        # Define the global loss
        # global custom_asymmetric_objective

        # First call the LightGBM set_default_params
        # This will input all model parameters just like DAI would do.
        LightGBMModel.set_default_params(self,
                                         accuracy=accuracy,
                                         time_tolerance=time_tolerance,
                                         interpretability=interpretability,
                                         **kwargs)
        # Now we just need to tell LightGBM that it has to optimize for our custom objective
        # And we are done
        self.params["objective"] = custom_asymmetric_objective