CategoricalROISubsetState2D

class glue.core.subset.CategoricalROISubsetState2D(categories, att1, att2)[source]

Bases: glue.core.subset.SubsetState

A subset defined as the set of values for two categorical data attributes that fall inside a categorical region of interest (ROI).

Parameters
categoriesdict

A dictionary containing for each label of one categorical component an iterable of labels for the other categorical component (using sets will provide the best performance)

att1ComponentID

The component ID matching the keys of the categories dictionary

att2ComponentID

The component ID matching the values of the categories dictionary

Attributes Summary

att1

The component ID matching the keys of the categories dictionary

att2

The component ID matching the values of the categories dictionary

attributes

The attributes that the subset state depends on.

categories

A dictionary containing for each label of one categorical component an iterable of labels for the other categorical component.

Methods Summary

copy(self)

Return a copy of the subset state.

to_mask(self, data[, view])

Compute the mask for this subset state.

Attributes Documentation

att1

The component ID matching the keys of the categories dictionary

att2

The component ID matching the values of the categories dictionary

attributes

The attributes that the subset state depends on.

categories

A dictionary containing for each label of one categorical component an iterable of labels for the other categorical component.

Methods Documentation

copy(self)[source]

Return a copy of the subset state.

to_mask(self, data, view=None)[source]

Compute the mask for this subset state.

Parameters
dataData

The dataset to compute the mask for.

view

Any object that returns a valid view for a Numpy array.