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

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

src/a/z/AZOrange-HEAD/doc/openExampleScripts/getAccParamOpt.py   AZOrange(Download)
 
    # Calculate a results object
    result = evaluator.getAcc()
 
    # Print the accuracy

src/a/z/AZOrange-HEAD/tests/source/AZorngGetAccWOptParam.py   AZOrange(Download)
        paramList = ["nActVars"]
        evaluator = getUnbiasedAccuracy.UnbiasedAccuracyGetter(data = self.irisData, learner = learner, paramList = paramList, nExtFolds = 3, nInnerFolds = 3)
        res = evaluator.getAcc()
        self.assert_(abs(res["CA"]-0.96666666666666667) < 0.01)
        expected =  [[50.0, 0.0, 0.0], [0.0, 48.0, 2.0], [0.0, 3.0, 47.0]]
        paramList = ["nActVars"]
        evaluator = getUnbiasedAccuracy.UnbiasedAccuracyGetter(data = self.iris2Data, learner = learner, paramList = paramList, nExtFolds = 3, nInnerFolds = 3)
        res = evaluator.getAcc()
        self.assertEqual(round(res["CA"],5),round(0.96666666666666667,5))
        self.assertEqual(res["CM"],  [[98.0, 2.0], [3.0, 47.0]])
        paramList = ["nActVars"]
        evaluator = getUnbiasedAccuracy.UnbiasedAccuracyGetter(data = self.irisContData, learner = learner, paramList = paramList ,nExtFolds = 3, nInnerFolds = 3)
        res = evaluator.getAcc()
        expectedRes = [0.27741430697239661, 0.27945999999999999, 0.276116805384, 0.277488734272, 0.276164200118,0.276028683916]  # [InHouse, Ubuntu, Ubuntu 64 bits]
        self.log.info("")
        paramList = ["nActVars"]
        evaluator = getUnbiasedAccuracy.UnbiasedAccuracyGetter(data = self.irisContData, learner = learner, paramList = paramList ,nExtFolds = 3, nInnerFolds = 3)
        res = evaluator.getAcc()
        expectedRes = [
                       0.97464488216654444, 0.97420405774, 0.974887867109, 0.97510044677,        # [InHouse, Ubuntu, Ubuntu 64 bits]

src/a/z/AZOrange-HEAD/orange/OrangeWidgets/Evaluate/OWAZTestOptLearners.py   AZOrange(Download)
            #    print x
            l.evaluator = getUnbiasedAccuracy.UnbiasedAccuracyGetter(data = self.data, learner = l.learner, paramList = paramList, nExtFolds = self.nOuterFolds, nInnerFolds = self.nInnerFolds)
            l.results = l.evaluator.getAcc()
            pb.advance()