Exemplo n.º 1
0
def test_cross_val_tse_anomaly_detection():
    df, column_names, target_name, reg, _ = generate_regression_data_and_models(
    )
    test_suite = regression_tests.RegressionTests(reg, df, target_name,
                                                  column_names)
    try:
        tse_tolerance = 10000
        test_suite.cross_val_tse_anomaly_detection(tse_tolerance)
        assert True
    except:
        assert False
Exemplo n.º 2
0
def test_cross_val_tae_avg():
    df, column_names, target_name, reg, _ = generate_regression_data_and_models(
    )
    test_suite = regression_tests.RegressionTests(reg, df, target_name,
                                                  column_names)
    try:
        tae_avg = 100
        test_suite.cross_val_tae_avg(tae_avg)
        assert True
    except:
        assert False
Exemplo n.º 3
0
def test_regression_basic():
    df, column_names, target_name, reg, _ = generate_regression_data_and_models(
    )
    test_suite = regression_tests.RegressionTests(reg, df, target_name,
                                                  column_names)
    try:
        mse_upper_boundary = 10000
        mae_upper_boundary = 10000
        test_suite.regression_testing(mse_upper_boundary, mae_upper_boundary)
        assert True
    except:
        assert False
Exemplo n.º 4
0
def test_run_time_stress_test():
    df, column_names, target_name, reg, _ = generate_regression_data_and_models(
    )
    test_suite = regression_tests.RegressionTests(reg, df, target_name,
                                                  column_names)

    sample_sizes = [i for i in range(100, 1000, 100)]
    max_run_times = [100 for _ in range(len(sample_sizes))]
    try:
        test_suite.run_time_stress_test(sample_sizes, max_run_times)
        assert True
    except:
        assert False
Exemplo n.º 5
0
def test_run_time_stress_test():
    df, column_names, target_name, reg, _ = generate_regression_data_and_models(
    )
    test_suite = regression_tests.RegressionTests(reg, df, target_name,
                                                  column_names)
    performance_boundary = []
    for i in range(100, 1000, 100):
        performance_boundary.append({"sample_size": i, "max_run_time": 100})
    try:
        test_suite.run_time_stress_test(performance_boundary)
        assert True
    except:
        assert False