示例#1
0
 def test_save_csv_result(self):
     clean_dataset = DummyCleanDataset()
     analysis = ProportionOfChanges(clean_dataset)
     analysis.execute()
     analysis.save_csv_result(CSV_RESULT_PATH)
     self.assertTrue(path.isfile(CSV_RESULT_PATH))
     remove(CSV_RESULT_PATH)
示例#2
0
 def test_clean_dataset(self):
     clean_dataset = DummyCleanDataset()
     expected_result = {
         ATTRIBUTES[0]: 0.0,
         ATTRIBUTES[1]: 0.0,
         ATTRIBUTES[2]: 0.0
     }
     analysis = ProportionOfChanges(clean_dataset)
     analysis.execute()
     self.assertDictEqual(expected_result, analysis.result)
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._sensitivity_measure = DummySensitivity()
     self._usability_cost_measure = DummyUsabilityCostMeasure()
     self._sensitivity_threshold = SENSITIVITY_THRESHOLD
     self._trace_path = TRACE_FILENAME
     self._expected_trace_path = EXPECTED_TRACE_PATH
     self._exploration = ConditionalEntropy(
         self._sensitivity_measure, self._usability_cost_measure,
         self._dataset, self._sensitivity_threshold)
     params.set('Multiprocessing', 'explorations', 'false')
    def setUp(self):
        # If we use the modin engine, we ignore the multiprocessing test as it
        # is incompatible with modin
        if params.get('DataAnalysis', 'engine') == 'modin.pandas':
            self.skipTest()

        self._dataset = DummyCleanDataset()
        self._sensitivity_measure = DummySensitivity()
        self._usability_cost_measure = DummyUsabilityCostMeasure()
        self._sensitivity_threshold = SENSITIVITY_THRESHOLD
        self._trace_path = TRACE_FILENAME
        self._expected_trace_path = EXPECTED_TRACE_PATH
        self._exploration = ConditionalEntropy(
            self._sensitivity_measure, self._usability_cost_measure,
            self._dataset, self._sensitivity_threshold)
        params.set('Multiprocessing', 'explorations', 'true')
示例#5
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._sensitivity_measure = DummySensitivity()
     self._usability_cost_measure = DummyUsabilityCostMeasure()
     self._sensitivity_threshold = SENSITIVITY_THRESHOLD
     self._trace_path = TRACE_FILENAME
     self._expected_trace_path = EXPECTED_TRACE_PATH_SINGLEPATH_PRUNING_ON
     self._explored_paths = 1
     self._pruning = PRUNING_ON
     self._exploration = FPSelect(self._sensitivity_measure,
                                  self._usability_cost_measure,
                                  self._dataset,
                                  self._sensitivity_threshold,
                                  explored_paths=self._explored_paths,
                                  pruning=self._pruning)
     params.set('Multiprocessing', 'explorations', 'false')
示例#6
0
    def setUp(self):
        # If we use the modin engine, we ignore the multiprocessing test as it
        # is incompatible with modin
        if params.get('DataAnalysis', 'engine') == 'modin.pandas':
            self.skipTest()

        self._dataset = DummyCleanDataset()
        self._sensitivity_measure = DummySensitivity()
        self._usability_cost_measure = DummyUsabilityCostMeasure()
        self._sensitivity_threshold = SENSITIVITY_THRESHOLD
        self._trace_path = TRACE_FILENAME
        self._expected_trace_path = EXPECTED_TRACE_PATH_MULTIPATH_PRUNING_OFF
        self._pruning = PRUNING_OFF
        self._explored_paths = MULTI_EXPLR_PATHS
        self._exploration = FPSelect(self._sensitivity_measure,
                                     self._usability_cost_measure,
                                     self._dataset,
                                     self._sensitivity_threshold,
                                     explored_paths=self._explored_paths,
                                     pruning=self._pruning)
        params.set('Multiprocessing', 'explorations', 'true')
示例#7
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._attribute_set = AttributeSet(ATTRIBUTES)
     self._csv_result_path = CSV_RESULT_PATH
示例#8
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._df_one_fp_per_browser = (
         self._dataset.get_df_w_one_fp_per_browser())
     self._attribute_set = AttributeSet(ATTRIBUTES)
示例#9
0
 def test_clean_dataset(self):
     self._dataset = DummyCleanDataset()
     self._check_result()
示例#10
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._attributes_avg_size = {}
示例#11
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._dataframe = self._dataset.dataframe
     self._attributes = AttributeSet(ATTRIBUTES)
 def setUp(self):
     self._attribute_set = AttributeSet(ATTRIBUTES)
     self._dataset = DummyCleanDataset()
示例#13
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._attribute_names = [attribute.name for attribute in ATTRIBUTES]
示例#14
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._attribute_set = AttributeSet(ATTRIBUTES)
     self._candidate_attributes = AttributeSet(ATTRIBUTES)
     self._most_common_fps = 3
示例#15
0
 def setUp(self):
     self._dataset = DummyCleanDataset()
     self._csv_result_path = CSV_RESULT_PATH
     self._analysis = DummyAnalysis(self._dataset)
示例#16
0
 def setUp(self):
     self._dummy_fp_dataset = DummyFingerprintDataset()
     self._empty_dataset = DummyEmptyDataset()
     self._clean_dataset = DummyCleanDataset()