Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(3)  |  Derive(0)  |  Import(0)

src/a/z/AZOrange-HEAD/tests/source/AZdataUtilitiesTest.py   AZOrange(Download)
    def test_scalizer(self):
        """Test the scalizer """
        scaler = dataUtilities.scalizer(data=self.testData)     # The new scalizer 
        scalerX = dataUtilities.scalizerX(data=self.testData)   # derived from scalizer which mimics the old scalizer version for old models
        scaledData = scaler.scaleAndContinuizeData(self.testData)
        #"===========OLD SCALIZER============="
        #"scaledData using scaleAndContinuizeData"
        multiclassScalerX = dataUtilities.scalizerX(data=self.multiClassData)
        scaledData = multiclassScalerX.scaleAndContinuizeData(self.multiClassData)
        self.assert_(str(scaledData[0]) == str(multiclassScalerX.scaleEx(self.multiClassData[0])) == "[-0.6, 0.2, -0.9, -0.9, '0']")
        self.assertEqual(multiclassScaler.convertClass(scaledData[-1].getclass().value),2.0)
 
        multiclassScalerX = dataUtilities.scalizerX(verbose = 2, scaleClass = True, data=data)
        scaledData = multiclassScalerX.scaleAndContinuizeData(data)
        #"===========OLD SCALIZER============="