scicloj.metamorph.ml.explore

Categories

    Other vars: assocation-plot explore-all pair-plot

    assocation-plot

    (assocation-plot ds & {:keys [width-per-col height-per-col x-tick-angle association-text-font-size label-font-size association-visible? association-text-color gradient], :or {width-per-col 60, height-per-col 60, x-tick-angle 0, association-text-font-size 11, label-font-size 11, association-visible? true, gradient :grDevices/Blue-Red, association-text-color "black"}})

    Create a heatmap of pairwise associations between dataset columns.

    Numeric-numeric pairs use Pearson correlation, textual-textual pairs use Cramer’s V, and numeric-textual pairs use the correlation ratio. The association value is shown in each tile when :association-visible? is true.

    Expects a tech.ml dataset without missing values.

    Options: - :width-per-col — tile width in pixels (default 60). - :height-per-col — tile height in pixels (default 60). - :x-tick-angle — angle for x-axis tick labels (default 0). - :association-text-font-size — value-label font size (default 11). - :label-font-size — axis-label font size (default 11). - :association-visible? — whether to show values in tiles (default true). - :association-text-color — value-label color (default “black”). - :gradient — fill color scale (default :grDevices/Blue-Red).

    Returns a Plotje pose.

    explore-all

    (explore-all data opts)

    Create a faceted overview plot for all columns in a Tablecloth dataset.

    For each non-target column: - Categorical columns (meta :categorical? true) -> percentage bar charts. If :target is provided, bars are grouped/colored by target and percentages are computed per category; otherwise a single-color bar chart with value labels, plus subtitle showing NA count and number of unique values. - Continuous columns -> density plots. If :target is provided, densities are colored by target; otherwise a rug and a vertical rule at the mean are added, plus a subtitle with NA/min/max.

    Options (merged with defaults): - :target keyword or nil (default nil) — column name used for grouping/coloring. - :color string/color when no target is given (default “skyblue”). - :height int canvas height (default 1000). - :width int canvas width (default 800).

    Returns a plotje pose with the individual plots arranged in a 2-column grid.

    pair-plot

    (pair-plot dataset & {:keys [size-per-col], :or {size-per-col 100}})

    Create a pair plot with one panel for each pair of dataset columns.

    Options: - :size-per-col — panel size in pixels, used for both plot width and height (default 100).

    Returns a Plotje pose.