Skip to content

random_samples are not uniform #177

@bdpedigo

Description

@bdpedigo

Trying to use the random_sample feature from client.materialize.query_table, but the result is definitely not a uniform random sample:

from caveclient import CAVEclient

client = CAVEclient("minnie65_phase3_v1")

sample_table = client.materialize.query_table(
    "synapse_target_predictions_ssa", random_sample=1000, desired_resolution=[1, 1, 1]
)
sample_table["post_pt_root_id"].value_counts()

gives

post_pt_root_id
864691135349000663    136
864691135404446702    136
864691135748978729    136
864691135992231361    136
864691136100920437    136
864691136390915199    136
864691136619155853    136
Name: count, dtype: int64

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions