Dataset histogram

Inspect feature and target distributions in an onboarded dataset.
View as Markdown

The Dataset histogram view describes the distribution of values in a dataset.

Use it to inspect categorical frequencies, numeric bins, target statistics, and masked or infrequent values before training, model review, or explanation work.

When to use

Use caseDescription
Inspect data distributionReview how feature and target values are distributed across the dataset.
Check categorical balanceCompare category frequencies and frequency fractions for categorical fields.
Review numeric binsInspect bin ranges and frequencies for numeric fields.
Investigate target behaviourUse target summary statistics to understand how target values vary across bins or categories.
Focus on selected fieldsUse fields to return histogram data for specific dataset fields.

Generate the view

Generate the Dataset histogram view from a dataset.

The request needs view_type set to HISTOGRAM.

Filter by field

Use fields when you only need histogram rows for specific dataset fields.

This is useful when the dataset has many fields and you only need to inspect a small subset.

Output

The response follows the shared Response structure format.

The Dataset histogram view returns a single dataframe in view_data.

DataframeDescription
view_dataHistogram rows for dataset fields, including bin information, frequency values, target statistics, and field metadata.

Interpret the result

The Dataset histogram view is easiest to read by selecting a field first, then comparing the bins or categories for that field.

Start with the field

Use field to identify the dataset field represented by each row.

Use field_type to distinguish features from targets. Feature rows describe input distributions. Target rows describe target distributions.

Separate categorical and numeric fields

Use is_categorical to understand how to read the row.

For categorical fields, token identifies the category. For numeric fields, bin_index, bin_low, and bin_high describe the numeric bin.

Review frequency

Use frequency to see the number of rows in the category or bin.

Use frequency_fraction to compare categories or bins on a normalized scale. This is usually the easiest way to spot imbalance across a field.

Check infrequent or masked values

Use is_infrequent to identify rare categories.

Use is_masked_token to identify masked tokens. These rows are useful when reviewing whether sensitive, missing, rare, or protected values are being represented as expected.

Inspect target statistics

Use the target_* fields to understand how target values behave within each category or bin.

For example, target_mean can show whether a category or numeric range is associated with higher or lower target values. target_min, target_max, target_sum, target_var, and target_stddev provide additional context.

target_var and target_stddev use population formulas with denominator n (ddof=0). For a category or bin with one non-null target value, both values are 0.

Options

The Dataset histogram view supports one view-specific option.

OptionUse
fieldsRestrict the histogram output to one or more dataset fields.

Fields

Use fields to request histogram rows for specific fields.

If fields is omitted, the view returns histogram rows for the default set of available dataset fields.

Field reference

The Dataset histogram view returns a dataframe, so individual columns are not documented as standalone API schema properties.

view_data

The view_data dataframe contains the histogram output.

FieldDescription
bin_indexIndex of the numeric bin, when the row represents a numeric bin.
bin_lowLower bound of the numeric bin, when available.
bin_highUpper bound of the numeric bin, when available.
tokenCategory token, when the row represents a categorical value.
field_typeType of field represented by the row, such as FEATURE or TARGET.
is_categoricalWhether the field is categorical.
frequencyNumber of dataset rows in the category or bin.
target_minMinimum target value for rows in the category or bin.
target_maxMaximum target value for rows in the category or bin.
target_meanMean target value for rows in the category or bin.
target_sumSum of target values for rows in the category or bin.
target_varPopulation variance of target values for rows in the category or bin, using denominator n.
target_stddevPopulation standard deviation of target values for rows in the category or bin, using denominator n.
frequency_fractionFraction of dataset rows represented by the category or bin.
is_masked_tokenWhether the row represents a masked token.
is_infrequentWhether the row represents an infrequent category or value.
fieldDataset field represented by the row.