(self, data_instances)
return predict_result
Prediction of Poisson
        Parameters
        ----------
        data_instances: Table of Instance, input data

        Returns
        ----------
        Table
            include input data label, predict results
Prediction of Poisson
        Parameters
        ----------
        data_instances: Table of Instance, input data
Prediction of Poisson Parameters ---------- data_instances : Table of Instance input data
def predict(self, data_instances):
        """
        Prediction of Poisson
        Parameters
        ----------
        data_instances: Table of Instance, input data

        Returns
        ----------
        Table
            include input data label, predict results
        """
        LOGGER.info("Start predict ...")

        self._abnormal_detection(data_instances)
        header = data_instances.schema.get("header")
        self.exposure_index = self.get_exposure_index(header, self.exposure_colname)
        exposure_index = self.exposure_index

        # OK
        exposure = data_instances.mapValues(lambda v: HeteroPoissonBase.load_exposure(v, exposure_index))

        data_instances = self.align_data_header(data_instances, self.header)

        pred_guest = self.compute_mu(data_instances, self.model_weights.coef_, self.model_weights.intercept_, exposure)
        pred_host = self.transfer_variable.host_partial_prediction.get(idx=0)

        LOGGER.info("Get prediction from Host")

        pred = pred_guest.join(pred_host, lambda g, h: g * h)
        # predict_result = data_instances.join(pred, lambda d, p: [d.label, p, p, {"label": p}])
        predict_result = self.predict_score_to_output(data_instances=data_instances, predict_score=pred,
                                                      classes=None)
        return predict_result
def predict ( self , data_instances ) : LOGGER . info ( "Start predict ..." ) self . _abnormal_detection ( data_instances ) header = data_instances . schema . get ( "header" ) self . exposure_index = self . get_exposure_index ( header , self . exposure_colname ) exposure_index = self . exposure_index # OK exposure = data_instances . mapValues ( lambda v : HeteroPoissonBase . load_exposure ( v , exposure_index ) ) data_instances = self . align_data_header ( data_instances , self . header ) pred_guest = self . compute_mu ( data_instances , self . model_weights . coef_ , self . model_weights . intercept_ , exposure ) pred_host = self . transfer_variable . host_partial_prediction . get ( idx = 0 ) LOGGER . info ( "Get prediction from Host" ) pred = pred_guest . join ( pred_host , lambda g , h : g * h ) # predict_result = data_instances.join(pred, lambda d, p: [d.label, p, p, {"label": p}]) predict_result = self . predict_score_to_output ( data_instances = data_instances , predict_score = pred , classes = None ) return predict_result