MC3-Project-1-Test-Cases-spr2016

From Quantitative Analysis Software Courses
Jump to navigation Jump to search

These test cases rely on a set of orders files, provided here: File:Mc3p1 data spr2016.zip

learning_test_cases = [
    LearningTestCase(
        description="Test Case 01",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase01.csv')
        ),
        outputs=dict(
            rmse=6.08094194449e-17,
            corr=1.0
        )
    ),
    LearningTestCase(
        description="Test Case 01 - Noisy, 4 features",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple_noisy.csv'),
            test_file=os.path.join('Data', 'testcase01_noisy.csv')
        ),
        outputs=dict(
            rmse=0.568574577879,
            corr=0.61379073821
        )
    ),
    LearningTestCase(
        description="Test Case 03",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase03.csv')
        ),
        outputs=dict(
            rmse=2.85197162452e-12,
            corr=1.0
        )
    ),
    LearningTestCase(
        description="Test Case 04",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'best4KNN.csv'),
            test_file=os.path.join('Data', 'testcase04.csv')
        ),
        outputs=dict(
            rmse=0.00240027433274,
            corr=0.999999987071
        )
    ),
    LearningTestCase(
        description="Test Case 05",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase05.csv')
        ),
        outputs=dict(
            rmse=0.359438468147,
            corr=0.838279931481
        )
    ),
    LearningTestCase(
        description="Test Case 06",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', '3_groups.csv'),
            test_file=os.path.join('Data', 'testcase06.csv'),
            kwargs={'k': 10}
        ),
        outputs=dict(
            rmse=35.1015004428,
            corr=-0.208568812714
        )
    ),
    LearningTestCase(
        description="Test Case 07",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase07.csv')
        ),
        outputs=dict(
            rmse=0.918312680526,
            corr=-0.119588294412
        )
    ),
    LearningTestCase(
        description="Test Case 08",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase08.csv')
        ),
        outputs=dict(
            rmse=0.0904271221715,
            corr=0.988993695858
        )
    ),
    LearningTestCase(
        description="Test Case 09",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'simple.csv'),
            test_file=os.path.join('Data', 'testcase09.csv'),
            kwargs={'k': 1}
        ),
        outputs=dict(
            rmse=0.0,
            corr=1.0
        )
    ),
    LearningTestCase(
        description="Test Case 10",
        group='KNNLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase10.csv')
        ),
        outputs=dict(
            rmse=1.78531847475,
            corr=-0.789236317359
        )
    ),
    LearningTestCase(
        description="Test Case 01 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase01.csv')
        ),
        outputs=dict(
            rmse=0.102347955217,
            corr=0.991328696155
        )
    ),
    LearningTestCase(
        description="Test Case 02 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'simple.csv'),
            test_file=os.path.join('Data', 'testcase02.csv')
        ),
        outputs=dict(
            rmse=0.0894427191,
            corr=0.99966144456
        )
    ),
    LearningTestCase(
        description="Test Case 03 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase03.csv')
        ),
        outputs=dict(
            rmse=1.78531847475,
            corr=-0.789236317359
        )
    ),
    LearningTestCase(
        description="Test Case 04 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'best4KNN.csv'),
            test_file=os.path.join('Data', 'testcase04.csv')
        ),
        outputs=dict(
            rmse=0.0301204201819,
            corr=0.999997608631
        )
    ),
    LearningTestCase(
        description="Test Case 05 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase05.csv')
        ),
        outputs=dict(
            rmse=0.323579476488,
            corr=0.867361902312
        )
    ),
    LearningTestCase(
        description="Test Case 06 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', '3_groups.csv'),
            test_file=os.path.join('Data', 'testcase06.csv'),
            kwargs={'kwargs': {'k': 1}, 'bags': 20, 'boost': False}
        ),
        outputs=dict(
            rmse=35.1014280336,
            corr=-0.230388246034
        )
    ),
    LearningTestCase(
        description="Test Case 07 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase07.csv'),
            kwargs={'kwargs': {'k': 3}, 'bags': 20, 'boost': False}
        ),
        outputs=dict(
            rmse=0.912956660467,
            corr=-0.112955082143
        )
    ),
    LearningTestCase(
        description="Test Case 08 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase08.csv'),
            kwargs={'kwargs': {'k': 3}, 'bags': 20, 'boost': False}
        ),
        outputs=dict(
            rmse=0.141072888643,
            corr=0.971258408243
        )
    ),
    LearningTestCase(
        description="Test Case 09 - Bagging",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'simple.csv'),
            test_file=os.path.join('Data', 'testcase09.csv'),
            kwargs={'kwargs': {'k': 1}, 'bags': 20, 'boost': False}
        ),
        outputs=dict(
            rmse=0.0235702260396,
            corr=0.999957755088
        )
    ),
    LearningTestCase(
        description="Test Case 10 - Bagging, 5 bags",
        group='BagLearner',
        inputs=dict(
            train_file=os.path.join('Data', 'ripple.csv'),
            test_file=os.path.join('Data', 'testcase10.csv'),
            kwargs={'kwargs': {'k': 3}, 'bags': 5, 'boost': False}
        ),
        outputs=dict(
            rmse=1.79642483731,
            corr=-0.73463819703
        )
    )
]