CategoricalMultiRangeSubsetState

class glue.core.subset.CategoricalMultiRangeSubsetState(ranges, cat_att, num_att)[source]

Bases: glue.core.subset.SubsetState

A subset state defined by two attributes where one attribute is categorical and the other is numerical, and where for each category, there are multiple possible subset ranges.

Parameters
rangesdict

A dictionary containing for each category (key), a list of tuples giving the ranges of values for the numerical attribute.

cat_attComponentID

The component ID for the categorical attribute.

num_attComponentID

The component ID for the numerical attribute.

Attributes Summary

attributes

The attributes that the subset state depends on.

cat_att

The component ID for the categorical attribute.

num_att

The component ID for the numerical attribute.

ranges

A dictionary containing for each category (key), a list of tuples giving the ranges of values for the numerical attribute.

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

attributes

The attributes that the subset state depends on.

cat_att

The component ID for the categorical attribute.

num_att

The component ID for the numerical attribute.

ranges

A dictionary containing for each category (key), a list of tuples giving the ranges of values for the numerical attribute.

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.