59a1078f3e4dd6322dbe2a7c1b2ae5e57c42da69,Lib/sandbox/svm/tests/test_classification.py,test_classification,check_c_probability,#test_classification#,84

Before Change


        ModelType = LibSvmCClassificationModel

        labels = [0, 1, 1, 2]
        x = [N.array([0, 0]),
             N.array([0, 1]),
             N.array([1, 0]),
             N.array([1, 1])]
        traindata = LibSvmClassificationDataSet(zip(labels, x))
        cost = 10.0
        weights = [(1, 10.0)]
        testdata = LibSvmTestDataSet(x)

        kernels = [
            LinearKernel(),
            PolynomialKernel(3, traindata.gamma, 0.0),
            RBFKernel(traindata.gamma)
            ]

        for kernel in kernels:
            model = ModelType(kernel, cost, weights, True)
            results = model.fit(traindata)
            results.predict_probability(testdata)

    def check_cross_validate(self):
        labels = ([-1] * 50) + ([1] * 50)
        x = N.random.randn(len(labels), 10)
        traindata = LibSvmClassificationDataSet(zip(labels, x))

After Change


                             modelargs, expected_rhos, expected_ps)

    def check_c_probability(self):
        traindata, testdata = self._make_basic_datasets()
        nu = 0.5
        cost = 10.0
        weights = [(1, 10.0)]
        kernels = self._make_basic_kernels(traindata.gamma)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 15

Instances


Project Name: scipy/scipy
Commit Name: 59a1078f3e4dd6322dbe2a7c1b2ae5e57c42da69
Time: 2006-07-26
Author: fullung@localhost
File Name: Lib/sandbox/svm/tests/test_classification.py
Class Name: test_classification
Method Name: check_c_probability


Project Name: scipy/scipy
Commit Name: 59a1078f3e4dd6322dbe2a7c1b2ae5e57c42da69
Time: 2006-07-26
Author: fullung@localhost
File Name: Lib/sandbox/svm/tests/test_classification.py
Class Name: test_classification
Method Name: check_c_probability


Project Name: scipy/scipy
Commit Name: e52f693ca61767b352596eeb127d8f940d8b8870
Time: 2006-07-27
Author: fullung@localhost
File Name: Lib/sandbox/svm/tests/test_oneclass.py
Class Name: test_oneclass
Method Name: check_more


Project Name: scipy/scipy
Commit Name: e52f693ca61767b352596eeb127d8f940d8b8870
Time: 2006-07-27
Author: fullung@localhost
File Name: Lib/sandbox/svm/tests/test_oneclass.py
Class Name: test_oneclass
Method Name: check_train