Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
benjaminrhoyle opened this issue Sep 9, 2024 · 1 comment
Open

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

benjaminrhoyle opened this issue Sep 9, 2024 · 1 comment
Assignees
Labels
question Further information is requested region

Comments

@benjaminrhoyle
Copy link

benjaminrhoyle commented Sep 9, 2024

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.

@jGaboardi jGaboardi added question Further information is requested region labels Sep 9, 2024
@knaaptime
Copy link
Member

knaaptime commented Sep 10, 2024

sorry, it's really hard to diagnose without a peek at your data/weights. Any chance you can provide a reprex?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested region
Projects
None yet
Development

No branches or pull requests

3 participants