예제 #1
0
        def f():
            s1 = regressionTreeBase.SampleSummary()
            s2 = regressionTreeBase.SampleSummary(1.0)
            s3 = regressionTreeBase.SampleSummary(2.0, 2.0, 2.0)

            s = (s3 + s2) - s1

            return (s.mean, s.stdev, s.variance, s.impurity())
예제 #2
0
        def f():
            hist = regressionTreeBase.SampleSummaryHistogram(
                0.0, 1.0, 5.0, False)

            s = regressionTreeBase.SampleSummary(3)
            hist.observe(0.1, s)
            hist.observe(1.2, regressionTreeBase.SampleSummary(2))
            hist.observe(2.8, regressionTreeBase.SampleSummary(1))
            hist.observe(3.9, regressionTreeBase.SampleSummary(2))
            hist.observe(4.4, regressionTreeBase.SampleSummary(3))

            return hist.bestSplitPointAndImpurityImprovement()
예제 #3
0
 def f():
     m = regressionTreeBase._MutableVector(sz, 0)
     for ix in xrange(sz):
         m.augmentItem(ix, sz + ix)
     return [m[ix] for ix in range(len(m))]
예제 #4
0
 def f():
     m = regressionTreeBase._MutableVector(sz, 0)
     for ix in xrange(sz):
         m.setitem(ix, ix)
     return [val for val in m]
예제 #5
0
 def f():
     m = regressionTreeBase._MutableVector(sz, 0)
     for ix in xrange(sz):
         m.augmentItem(ix, sz + ix)
     return [m[ix] for ix in range(len(m))]
예제 #6
0
 def f():
     m = regressionTreeBase._MutableVector(sz, 0)
     for ix in xrange(sz):
         m.setitem(ix, ix)
     return [val for val in m]
예제 #7
0
 def f():
     s = regressionTreeBase.SampleSummary()
     return regressionTreeBase.SampleSummary.impurityImprovement(s, s)