nimare.studyset.LabelBlock

class LabelBlock(values: object, labels: ndarray, rows: ndarray, _col_of: dict = <factory>)[source]

Bases: object

The annotation matrix, column-major.

Decoders address it by label, so it is stored CSC: one column is a contiguous slice. Stored CSR, getcol is O(total nonzeros) and the per-feature cost collapses as the label count grows.

Methods

above(label, threshold)

Boolean mask: this label at or above threshold.

col(label)

Return the column index of label.

column(label)

One label's values as a dense float array over the view's analyses.

dense([labels])

Build a dense matrix for the requested labels.

Properties

values

labels

rows

above(label, threshold)[source]

Boolean mask: this label at or above threshold.

col(label)[source]

Return the column index of label.

column(label)[source]

One label’s values as a dense float array over the view’s analyses.

dense(labels=None)[source]

Build a dense matrix for the requested labels.