(self, data, model=None)
return self.interpret(model, predictions)
Uses a model from the self.models dictionary to make a prediction. Also fits it based on the operator stored in the models dictionary.
        :param data: is the data that you want to predict for using model
        :param model: is the specific model you want to use to predict
        :return: a prediction, most likely an array
Uses a model from the self.models dictionary to make a prediction. Also fits it based on the operator stored in the models dictionary.
        :param data: is the data that you want to predict for using model
        :param model: is the specific model you want to use to predict
        :return: a prediction, most likely an array
Uses a model from the self . models dictionary to make a prediction . Also fits it based on the operator stored in the models dictionary . : param data : is the data that you want to predict for using model : param model : is the specific model you want to use to predict : return : a prediction most likely an array
def predict(self, data, model=None):
        '''
        Uses a model from the self.models dictionary to make a prediction. Also fits it based on the operator stored in the models dictionary.
        :param data: is the data that you want to predict for using model
        :param model: is the specific model you want to use to predict
        :return: a prediction, most likely an array
        '''
        if model is None:
            model = self.latest_model
        if model == 'text_classification':
            map_func = np.vectorize(lambda x: self.classify_text(x))
            predictions = map_func(data)
            return predictions
        else:
            modeldict = self.models[model]

            if modeldict.get('preprocessor'):
                data = modeldict['preprocessor'].transform(data)
            predictions = modeldict['model'].predict(data)
        clearLog()
        return self.interpret(model, predictions)
def predict ( self , data , model = None ) : if model is None : model = self . latest_model if model == 'text_classification' : map_func = np . vectorize ( lambda x : self . classify_text ( x ) ) predictions = map_func ( data ) return predictions else : modeldict = self . models [ model ] if modeldict . get ( 'preprocessor' ) : data = modeldict [ 'preprocessor' ] . transform ( data ) predictions = modeldict [ 'model' ] . predict ( data ) clearLog ( ) return self . interpret ( model , predictions )