We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
random_sample
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
The text was updated successfully, but these errors were encountered:
@fcollman suggested merge_reference=False to see if this had to do with joins, that at least did not fix
merge_reference=False
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], merge_reference=False, ).set_index("target_id") full_table = client.materialize.query_table( "synapses_pni_2", filter_in_dict={"id": sample_table.index} ).set_index("id") sample_table = sample_table.join(full_table, rsuffix="_right") sample_table["post_pt_root_id"].value_counts()
post_pt_root_id 864691135335308777 136 864691135355257807 136 864691135404851182 136 864691135463896894 136 864691135539391090 136 Name: count, dtype: int64
Sorry, something went wrong.
No branches or pull requests
Trying to use the random_sample feature from client.materialize.query_table, but the result is definitely not a uniform random sample:
gives
The text was updated successfully, but these errors were encountered: