suite2p.classification package

Submodules

suite2p.classification.classifier module

class suite2p.classification.classifier.Classifier(classfile=None, keys=None)[source]

Bases: object

ROI classifier model that uses logistic regression

Parameters
  • classfile (string (optional, default None)) – path to saved classifier

  • keys (list of str (optional, default None)) – keys of ROI stat to use to classify

load(classfile, keys=None)[source]

data loader

saved classifier contains stat with classification labels

Parameters
  • classfile (string) – path to saved classifier

  • keys (list of str (optional, default None)) – keys of ROI stat to use to classify

predict_proba(stat)[source]

apply logistic regression model and predict probabilities

model contains stat with classification labels

Parameters

stat (list of dicts) – needs self.keys keys

run(stat, p_threshold=0.5)[source]

Returns cell classification thresholded with ‘p_threshold’ and its probability.

Return type

ndarray

save(filename)[source]

save classifier to filename

Return type

None

suite2p.classification.classify module

suite2p.classification.classify.classify(stat, classfile, keys=('npix_norm', 'compact', 'skew'))[source]

Returns array of classifier output from classification process.

Module contents