Skip to content

Error: Islands must be larger than the quorum. #461

@benjaminrhoyle

Description

@benjaminrhoyle

I'm trying to use the SKATER model, and continue to run into issues with the ValueError:
Islands must be larger than the quorum. If not, drop the small islands and solve for clusters in the remaining field.

I've been following the examples provided on their website with no success. I'm using spopt 0.6.1.

sf_kwds = dict(
    dissimilarity=skm.manhattan_distances,
    affinity=None,
    reduction=np.sum,
    center=np.mean
)

model = Skater(
    gdf = cluster_zips_scaled, 
    w = weights,
    attrs_name = ['counter'],
    n_clusters = 6, # k_optimal
    floor = 98,
    trace = False,
    islands = "increase",
    spanning_forest_kwds = sf_kwds)
model.solve()

cluster_zips_scaled[f"skater{k_optimal}_label"] = model.labels_

My weights dictionary has no islands, and there are 636 geometries I'm trying to cluster into 6 clusters, and I want at least 98 geometries in each cluster. Given the weights, all geometries border at least one other geometry.

Any help would be appreciated.

Metadata

Metadata

Labels

questionFurther information is requestedregion

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions