예제 #1
0
파일: test_exact.py 프로젝트: ljwolf/region
def test_geodataframe_multi_attr(method):
    cluster_object = PRegionsExact()
    cluster_object.fit_from_geodataframe(gdf,
                                         double_attr_str,
                                         n_regions=2,
                                         method=method)
    obtained = region_list_from_array(cluster_object.labels_)
    compare_region_lists(obtained, optimal_clustering)
예제 #2
0
파일: test_exact.py 프로젝트: ljwolf/region
def test_geodataframe(method):
    cluster_object = PRegionsExact()
    cluster_object.fit_from_geodataframe(gdf,
                                         attr_str,
                                         n_regions=2,
                                         method=method)
    result = region_list_from_array(cluster_object.labels_)
    compare_region_lists(result, optimal_clustering)
예제 #3
0
def test_geodataframe_multi_attr(method):
    cluster_object = PRegionsExact()
    cluster_object.fit_from_geodataframe(gdf, double_attr_str, n_regions=2,
                                         method=method)
    obtained = region_list_from_array(cluster_object.labels_)
    compare_region_lists(obtained, optimal_clustering)
예제 #4
0
def test_geodataframe(method):
    cluster_object = PRegionsExact()
    cluster_object.fit_from_geodataframe(gdf, attr_str, n_regions=2,
                                         method=method)
    result = region_list_from_array(cluster_object.labels_)
    compare_region_lists(result, optimal_clustering)