Regression chart functions for Vega-Lite visualizations.
Provides scatter plots with fit lines, residual plots, and log-log regression charts for complexity analysis. Supports both single-implementation and multi-implementation comparison modes.
Regression chart functions for Vega-Lite visualizations. Provides scatter plots with fit lines, residual plots, and log-log regression charts for complexity analysis. Supports both single-implementation and multi-implementation comparison modes.
(log-log-chart-spec points
line-pts
{:keys [width height color-field color-value legend-options
has-error-bounds? slope r-squared]
:or {width 600 height 400 color-value "steelblue"}
:as opts})Build complete log-log scatter plot with fit line. Options: :width - chart width :height - chart height :axis-name - name of the axis variable (e.g., 'n') :metric-name - name of the metric being plotted (e.g., 'elapsed-time') :color-field - field for color encoding ('impl' or nil) :color-value - static color when color-field is nil :legend-options - legend config map :has-error-bounds? - whether to include error bars :slope - slope value to show in title :r-squared - R² value to show in title
Build complete log-log scatter plot with fit line.
Options:
:width - chart width
:height - chart height
:axis-name - name of the axis variable (e.g., 'n')
:metric-name - name of the metric being plotted (e.g., 'elapsed-time')
:color-field - field for color encoding ('impl' or nil)
:color-value - static color when color-field is nil
:legend-options - legend config map
:has-error-bounds? - whether to include error bars
:slope - slope value to show in title
:r-squared - R² value to show in title(log-log-error-layer points {:keys [color-field color-value]})Build error bar layer for log-log plot. Shows confidence bounds in log space.
Build error bar layer for log-log plot. Shows confidence bounds in log space.
(log-log-line-layer line-pts {:keys [color-field _legend-options]})Build fit line layer for log-log plot. Line represents: y = slope * x + intercept in log space.
Build fit line layer for log-log plot. Line represents: y = slope * x + intercept in log space.
(log-log-residual-layer residual-pts
{:keys [axis-name residual-title color-field
legend-options]})Build scatter layer for log-log residual plot.
Build scatter layer for log-log residual plot.
(log-log-residual-spec residual-pts
{:keys [width height color-field axis-name]
:or {width 600 height 200}
:as opts})Build complete log-log residual plot spec. Options: :width - chart width :height - chart height (typically half of main chart) :axis-name - name of the axis variable (e.g., 'n') :residual-title - y-axis title :color-field - field for color encoding :legend-options - legend config map
Build complete log-log residual plot spec. Options: :width - chart width :height - chart height (typically half of main chart) :axis-name - name of the axis variable (e.g., 'n') :residual-title - y-axis title :color-field - field for color encoding :legend-options - legend config map
(log-log-scatter-layer points
{:keys [axis-name metric-name color-field color-value
legend-options]})Build scatter layer for log-log plot. Points are in log space: x = log(n), y = log(metric). Options: :axis-name - name of the x-axis variable (e.g., 'n') :metric-name - name of the metric being plotted (e.g., 'elapsed-time')
Build scatter layer for log-log plot. Points are in log space: x = log(n), y = log(metric). Options: :axis-name - name of the x-axis variable (e.g., 'n') :metric-name - name of the metric being plotted (e.g., 'elapsed-time')
(regression-chart-spec points
line-pts
{:keys [width height color-field color-value
legend-options has-error-bounds?]
:or {width 600 height 400 color-value "steelblue"}
:as opts})Build complete regression scatter plot with fit lines. Options: :width - chart width :height - chart height :axis-name - x-axis title :y-title - y-axis title :color-field - field for color encoding ("impl" or "model" or nil) :color-value - static color when color-field is nil :legend-options - legend config map :has-error-bounds? - whether to include error bars
Build complete regression scatter plot with fit lines.
Options:
:width - chart width
:height - chart height
:axis-name - x-axis title
:y-title - y-axis title
:color-field - field for color encoding ("impl" or "model" or nil)
:color-value - static color when color-field is nil
:legend-options - legend config map
:has-error-bounds? - whether to include error bars(regression-error-layer points
{:keys [color-field color-value]
:or {color-value "steelblue"}})Build error bar layer for regression points with error bounds. When color-field is "model", adds a "series" field with value "data" to match the scatter layer behavior.
Build error bar layer for regression points with error bounds. When color-field is "model", adds a "series" field with value "data" to match the scatter layer behavior.
(regression-line-layer line-pts {:keys [color-field legend-options]})Build fit line layer for regression models. Options: :color-field - field name for color encoding ("impl" or "model") :legend-options - legend config map or nil for default
Build fit line layer for regression models.
Options:
:color-field - field name for color encoding ("impl" or "model")
:legend-options - legend config map or nil for default(regression-loess-layer residual-pts {:keys [color-field]})Build loess smoothing layer for residual plot. When color-field is nil, LOESS is applied to all data points as one series.
Build loess smoothing layer for residual plot. When color-field is nil, LOESS is applied to all data points as one series.
(regression-residual-layer residual-pts
{:keys [axis-name residual-title color-field
legend-options]})Build scatter layer for residual plot. Options: :color-field - field name for color encoding :legend-options - legend config map or nil for default
Build scatter layer for residual plot. Options: :color-field - field name for color encoding :legend-options - legend config map or nil for default
(regression-residual-spec
residual-pts
{:keys [width height color-field] :or {width 600 height 200} :as opts})Build complete residual plot spec. Options: :width - chart width :height - chart height (typically half of main chart) :axis-name - x-axis title :residual-title - y-axis title :color-field - field for color encoding :legend-options - legend config map
Build complete residual plot spec. Options: :width - chart width :height - chart height (typically half of main chart) :axis-name - x-axis title :residual-title - y-axis title :color-field - field for color encoding :legend-options - legend config map
(regression-scatter-layer points
{:keys [axis-name y-title color-field color-value
legend-options]
:or {color-value "steelblue"}})Build scatter plot layer for regression points. Options: :color-field - field name for color encoding (e.g., "impl" or nil for static color) :color-value - static color when color-field is nil (default "steelblue") :legend-options - legend config map or nil for default
When color-field is "model", adds a "series" field with value "data" to each point since data points don't have model labels (only fit lines do).
Build scatter plot layer for regression points.
Options:
:color-field - field name for color encoding
(e.g., "impl" or nil for static color)
:color-value - static color when color-field is nil (default "steelblue")
:legend-options - legend config map or nil for default
When color-field is "model", adds a "series" field with value "data" to
each point since data points don't have model labels (only fit lines do).(regression-zero-line-layer)Build zero reference line layer for residual plot.
Build zero reference line layer for residual 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 |