def setUp(self):
        # Instance of BasePredictor
        self.predictor = SVMCRBFMILESPredictor(
            classifier_filename=SVMC_rbf_classifier_filename)
        # Generate some data from dataclass / pydantic for FastAPI
        self._generate_data()
        # Load raw data from file or create raw data
        (self.dfraw_load, self.bag_load,
         self.bag_label_load) = LoadMIL.get_single_mil_bag(pipeline='whole')

        return None
Ejemplo n.º 2
0
    def setUp(self):
        self.predictor = CompNBPredictor(
            classifier_filename=CompNB_classifier_filename,
            pipeline_type='categorical')
        # Generate some data from dataclass / pydantic for FastAPI
        self._generate_data()
        # Load raw data from file or create raw data
        (self.dfraw_load, self.bag_load,
         self.bag_label_load) = LoadMIL.get_single_mil_bag(
             pipeline='categorical')

        return None
Ejemplo n.º 3
0
    def setUp(self):
        # Construct raw data input
        # This is intended to test input gathered from a web form. Not all
        # Attributes that are present in a SQL database are present
        # Generate some data from dataclass / pydantic for FastAPI
        self.input_data, self.input_data_list = generate_input_data()
        self.input_data_pydantic, self.input_data_list_pydantic = generate_input_data_pydantic(
        )
        # Convert raw data to dataframe
        self.dfraw_input = pd.DataFrame(data=[self.input_data.__dict__])
        self.dfraw_input_pydantic = pd.DataFrame(
            data=[self.input_data_pydantic.__dict__])

        # Load raw data from file or create raw data
        (self.dfraw_load, self.bag_load,
         self.bag_label_load) = LoadMIL.get_single_mil_bag(pipeline='whole')

        return None