Пример #1
0
 def run_extra_tree(self):
     self.log.info(
         "Running prediction for patient {} using algorithm '{}'".format(
             self.patientId, 'Extremely Random Forest Regression'))
     if not self.batch:
         results = CLFManager.factory(self.patientId, model="et").predict()
         return results
     else:
         clf = CLFManager.factory(self.patientId, model="et")
         return clf.batch_predict(), clf._allFeatureDesp
Пример #2
0
 def run_incremental_random_forest(self):
     self.log.info(
         "Running prediction for patient {} using algorithm '{}'".format(
             self.patientId, 'Random Forest Regression'))
     results = CLFManager.factory(self.patientId,
                                  model="incremental").predict()
     return results
Пример #3
0
 def run_global(self):
     '''
     Run global model
     :return:
     '''
     self.log.info(
         "Running global classification using algorithm '{}'".format(
             self.patientId, 'Naive Bayes'))
     return CLFManager.factory(model="global").predict()
Пример #4
0
 def run_nb(self):
     '''
     Run Naive Bayes
     :return:
     '''
     self.log.info(
         "Running classification for patient {} using algorithm '{}'".
         format(self.patientId, 'Naive Bayes'))
     return CLFManager.factory(self.patientId, model="nb").predict()
Пример #5
0
 def run_svm(self):
     '''
     Run SVM
     :return:
     '''
     self.log.info(
         "Running classification for patient {} using algorithm '{}'".
         format(self.patientId, 'SVM'))
     return CLFManager.factory(self.patientId, model="svm").predict()
Пример #6
0
 def run_dummy(self):
     '''
     Run Dummy classifier
     :return:
     '''
     self.log.info(
         "Running classification for patient {} using algorithm '{}'".
         format(self.patientId, 'Dummy'))
     return CLFManager.factory(self.patientId, model="dummy").predict()
Пример #7
0
 def run_extra_tree_classifier(self):
     '''
     Run Extr TRee Classifier
     :return:
     '''
     self.log.info(
         "Running classification for patient {} using algorithm '{}'".
         format(self.patientId, 'Extremely Random Forest'))
     return CLFManager.factory(self.patientId, model="etc").predict()
Пример #8
0
 def run_random_forest_classifier(self):
     '''
     Run Random Forest Classifier
     :return:
     '''
     self.log.info(
         "Running classification for patient {} using algorithm '{}'".
         format(self.patientId, 'Random Forest'))
     return CLFManager.factory(self.patientId, model="rfc").predict()
Пример #9
0
    def run_fixed_model(self):
        """
        Runs RNN prediction.
        :return:
        """
        self.log.info(
            "Running prediction for patient {} using algorithm '{}'".format(
                self.patientId, 'FixedModel'))
        fixed_model = CLFManager.factory(self.patientId, model="fm")

        return fixed_model.predict()
Пример #10
0
    def run_rnn(self):
        """
        Runs RNN prediction.
        :return:
        """
        self.log.info(
            "Running prediction for patient {} using algorithm '{}'".format(
                self.patientId, 'Recurrent Neural Networks'))
        rnn = CLFManager.factory(self.patientId, model="rnn")

        return rnn.predict()
Пример #11
0
    def run_lstm(self):
        """
        Runs LSTM prediction.
        :return:
        """
        self.log.info(
            "Running prediction for patient {} using algorithm '{}'".format(
                self.patientId, 'LSTM-Recurrent Neural Networks'))
        lstm = CLFManager.factory(self.patientId, model="lstm")

        return lstm.predict()
Пример #12
0
    def run_arima(self):
        """
        Runs ARIMA prediction.
        :return:
        """
        self.log.info(
            "Running prediction for patient {} using algorithm '{}'".format(
                self.patientId, 'ARIMA'))
        arima = CLFManager.factory(self.patientId, model="arima")

        return arima.predict()
Пример #13
0
 def run_avg(self):
     self.log.info(
         "Running prediction for patient {} using algorithm '{}'".format(
             self.patientId, 'Avg training value'))
     return CLFManager.factory(self.patientId, model="avg").predict()
Пример #14
0
 def run_linear_regression(self):
     self.log.info(
         "Running prediction for patient {} using algorithm '{}'".format(
             self.patientId, 'Linear Regression'))
     return CLFManager.factory(self.patientId, model="lr").predict()
Пример #15
0
 def run_context_avg(self):
     self.log.info(
         "Running prediction for patient {} using algorithm '{}'".format(
             self.patientId, 'Weigted AVG in similar context'))
     return CLFManager.factory(self.patientId, model="contextavg").predict()
Пример #16
0
 def run_last_value(self):
     self.log.info(
         "Running prediction for patient {} using algorithm '{}'".format(
             self.patientId, 'Last value'))
     return CLFManager.factory(self.patientId, model="last").predict()