Tail analysis visualization functions for Vega-Lite charts.
Provides chart generation for extreme value analysis including:
Tail analysis visualization functions for Vega-Lite charts. Provides chart generation for extreme value analysis including: - Tail ratios table showing percentile ratios - Hill plot showing tail index estimates across k values - Mean residual life plot for threshold selection - Zipf plot (complementary CDF on log-log scale) - Q-Q plots comparing exceedances to exponential and GPD distributions
(exponential-qq-plot samples threshold transforms)Build a Vega-Lite spec for exponential Q-Q plot.
Compares the tail exceedances (values above threshold) to an exponential distribution. If the tail is exponential (GPD with ξ=0), points lie on the y=x diagonal.
Takes samples (typed array), threshold, and transforms. Returns a Vega-Lite layered spec with Q-Q scatter and reference line.
Build a Vega-Lite spec for exponential Q-Q plot. Compares the tail exceedances (values above threshold) to an exponential distribution. If the tail is exponential (GPD with ξ=0), points lie on the y=x diagonal. Takes samples (typed array), threshold, and transforms. Returns a Vega-Lite layered spec with Q-Q scatter and reference line.
(gpd-qq-plot samples threshold gpd-fit transforms)Build a Vega-Lite spec for GPD Q-Q plot.
Compares the tail exceedances to the fitted Generalized Pareto Distribution. If the GPD fit is good, points lie on the y=x diagonal.
Takes samples (typed array), threshold, gpd-fit map {:xi :sigma}, and transforms. Returns a Vega-Lite layered spec with Q-Q scatter and reference line.
Build a Vega-Lite spec for GPD Q-Q plot.
Compares the tail exceedances to the fitted Generalized Pareto Distribution.
If the GPD fit is good, points lie on the y=x diagonal.
Takes samples (typed array), threshold, gpd-fit map {:xi :sigma}, and
transforms. Returns a Vega-Lite layered spec with Q-Q scatter and
reference line.(hill-plot tail-data)Build a Vega-Lite spec for the Hill plot.
The Hill plot shows the Hill estimator H_k vs k (number of order statistics used). A stable region where estimates don't vary much with k indicates a reliable tail index estimate. The stable estimate is shown as a horizontal reference line.
Takes tail-analysis data for a single metric. Returns a Vega-Lite layered spec with the Hill curve and stable estimate line.
Build a Vega-Lite spec for the Hill plot. The Hill plot shows the Hill estimator H_k vs k (number of order statistics used). A stable region where estimates don't vary much with k indicates a reliable tail index estimate. The stable estimate is shown as a horizontal reference line. Takes tail-analysis data for a single metric. Returns a Vega-Lite layered spec with the Hill curve and stable estimate line.
(mrl-plot tail-data transforms)Build a Vega-Lite spec for the mean residual life plot.
The MRL plot shows e(u) = E[X - u | X > u] vs threshold u. For GPD-distributed data, MRL is linear in u. A threshold where MRL becomes approximately linear suggests a good POT threshold.
Takes tail-analysis data for a single metric. Returns a Vega-Lite spec with the MRL curve and the selected threshold.
Build a Vega-Lite spec for the mean residual life plot. The MRL plot shows e(u) = E[X - u | X > u] vs threshold u. For GPD-distributed data, MRL is linear in u. A threshold where MRL becomes approximately linear suggests a good POT threshold. Takes tail-analysis data for a single metric. Returns a Vega-Lite spec with the MRL curve and the selected threshold.
(tail-analysis-vega-spec data-map view chart-options)Build a complete Vega-Lite spec for tail analysis visualization.
Takes data-map, view options, and chart-options map containing :width and/or :height for chart dimensions.
View options: :tail-analysis-id - Key for tail analysis data (default: :tail-analysis) :samples-id - Key for source samples (default: :samples)
Returns the Vega-Lite spec with vertically concatenated tail analysis charts.
Build a complete Vega-Lite spec for tail analysis visualization. Takes data-map, view options, and chart-options map containing :width and/or :height for chart dimensions. View options: :tail-analysis-id - Key for tail analysis data (default: :tail-analysis) :samples-id - Key for source samples (default: :samples) Returns the Vega-Lite spec with vertically concatenated tail analysis charts.
(tail-ratios-table tail-data)Build a Vega-Lite table spec showing tail ratios.
Tail ratios indicate how heavy the distribution tail is. Higher ratios suggest heavier tails.
Takes tail-analysis data for a single metric. Returns a Vega-Lite spec for a horizontal bar chart styled as a table.
Build a Vega-Lite table spec showing tail ratios. Tail ratios indicate how heavy the distribution tail is. Higher ratios suggest heavier tails. Takes tail-analysis data for a single metric. Returns a Vega-Lite spec for a horizontal bar chart styled as a table.
(zipf-plot samples transforms)Build a Vega-Lite spec for the Zipf plot.
The Zipf plot shows the complementary CDF (1 - F(x)) on a log-log scale. For Pareto-like tails, this appears as a straight line with slope -α where α is the tail index.
Takes samples (typed array) and transforms. Returns a Vega-Lite spec with log-log scatter plot.
Build a Vega-Lite spec for the Zipf plot. The Zipf plot shows the complementary CDF (1 - F(x)) on a log-log scale. For Pareto-like tails, this appears as a straight line with slope -α where α is the tail index. Takes samples (typed array) and transforms. Returns a Vega-Lite spec with log-log scatter plot.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |