예제 #1
0
def test_reg_supervised_similar_clustering():
    new_data, historical_data, column_names, target_name = generate_classification_data_and_models(
    )
    test_suite = structural_tests.StructuralData(new_data, historical_data,
                                                 column_names, target_name)
    try:
        absolute_distance = 2
        test_suite.cls_supervised_similar_clustering(absolute_distance)
        assert True
    except:
        assert False
예제 #2
0
def test_mutual_info_kmeans_scorer():
    new_data, historical_data = generate_unsupervised_data()
    columns = [
        "similar_normal", "different_normal", "similar_gamma",
        "different_gamma"
    ]
    target = ''
    test_suite = structural_tests.StructuralData(new_data, historical_data,
                                                 columns, target)
    try:
        min_similarity = 0.5
        test_suite.mutual_info_kmeans_scorer(min_similarity)
        assert True
    except:
        assert False