Liking cljdoc? Tell your friends :D

criterium.viewer.common-charts.regression

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.
raw docstring

log-log-chart-specclj

(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
sourceraw docstring

log-log-error-layerclj

(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.
sourceraw docstring

log-log-line-layerclj

(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.
sourceraw docstring

log-log-residual-layerclj

(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.
sourceraw docstring

log-log-residual-specclj

(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
sourceraw docstring

log-log-scatter-layerclj

(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')
sourceraw docstring

regression-chart-specclj

(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
sourceraw docstring

regression-error-layerclj

(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.
sourceraw docstring

regression-line-layerclj

(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
sourceraw docstring

regression-loess-layerclj

(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.
sourceraw docstring

regression-residual-layerclj

(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
sourceraw docstring

regression-residual-specclj

(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
sourceraw docstring

regression-scatter-layerclj

(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).
sourceraw docstring

regression-zero-line-layerclj

(regression-zero-line-layer)

Build zero reference line layer for residual plot.

Build zero reference line layer for residual plot.
sourceraw docstring

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close