connectome_manipulator.connectome_manipulation.manipulation.syn_subsampling.SynapseSubsampling

Connectome manipulation class for synapse subsampling:

Subsamples synapses, keeping a certain percentage of synapses. The manipulation can be applied through the apply() method. For a more fine-grained control, please use the connectome_manipulator.connectome_manipulation.manipulation.syn_removal.SynapseRemoval() operation.

connectome_manipulator.connectome_manipulation.manipulation.syn_subsampling.SynapseSubsampling.apply(self, split_ids, keep_pct=100.0, **kwargs)

Applies a random subsampling of synapses, keeping a certain percentage of synapses.

Parameters:
  • split_ids (list-like) – List of neuron IDs that are part of the current data split; will be automatically provided by the manipulator framework

  • keep_pct (float) – Percentage of randomly sampled synapses to be kept

  • **kwargs – Additional keyword arguments - Not used

Note

Input/output edges (synapse) tables are accessed through the writer object:

  • Loading input edges: edges_table = self.writer.to_pandas()

  • Writing output edges: self.writer.from_pandas(edges_table_manip)