CategoricalComponent¶
-
class
glue.core.component.
CategoricalComponent
(categorical_data, categories=None, jitter=None, units=None)[source]¶ Bases:
glue.core.component.Component
Container for categorical data.
- Parameters
categorical_data – The underlying
numpy.ndarray
categories – List of unique values in the data
- Jitter
Strategy for jittering the data
Attributes Summary
Whether or not the datatype is categorical
The categories.
The index of the category for each value in the array.
The underlying
numpy.ndarray
The original categorical data.
Whether or not the datatype is numeric
Methods Summary
jitter
(self[, method])Jitter the codes so the density of points can be easily seen in a scatter plot for example.
to_series
(self, \*\*kwargs)Convert into a pandas.Series object.
Attributes Documentation
-
data
[source]¶ The underlying
numpy.ndarray
Methods Documentation
-
jitter
(self, method=None)[source]¶ Jitter the codes so the density of points can be easily seen in a scatter plot for example.
- Parameters
- method{None, ‘uniform’}
If None, not jittering is done (or any jittering is undone). If
'uniform'
, the codes are randomized by a uniformly distributed random variable.