Use data you can inspect

Twelve additional operations bring the composable analysis registry to 85. Inputs are bounded data. These tools do not execute code or fetch external prices.

Csv parse

tool: csv_parse {"text": "name,score\nAda,10\nBob,20"}
{
  "rows": [
    [
      "name",
      "score"
    ],
    [
      "Ada",
      "10"
    ],
    [
      "Bob",
      "20"
    ]
  ],
  "columns": 2,
  "ragged": false,
  "method": "Strict quoted-field parser; all fields remain strings, never evaluated."
}

Csv format

tool: csv_format {"rows": [["name", "note"], ["Ada", "hello, world"]]}
{
  "text": "name,note\r\nAda,\"hello, world\"",
  "method": "Comma-separated quoted text. Formula-like fields are preserved; do not open untrusted formulas in spreadsheet software."
}

Weighted quantile

tool: weighted_quantile {"values": [10, 20, 30], "weights": [1, 3, 1], "probability": 0.5}
{
  "value": 20,
  "method": "Inverse empirical weighted CDF; zero-weight observations excluded."
}

Exponential smoothing

tool: exponential_smoothing {"values": [10, 20, 15], "alpha": 0.5}
{
  "values": [
    10,
    15,
    15
  ],
  "alpha": 0.5,
  "method": "First observation initializes the level; no fitted trend or seasonality."
}

Autocorrelation

tool: autocorrelation {"values": [1, 2, 3, 4], "lag": 1}
{
  "value": 0.25,
  "lag": 1,
  "method": "Centered lagged sum divided by full centered sum of squares; no n/(n-lag) adjustment."
}

Confusion matrix

tool: confusion_matrix {"actual": [1, 1, 0, 0], "predicted": [1, 0, 1, 0]}
{
  "tp": 1,
  "tn": 1,
  "fp": 1,
  "fn": 1,
  "accuracy": 0.5,
  "precision": 0.5,
  "recall": 0.5,
  "f1": 0.5
}

Brier score

tool: brier_score {"actual": [1, 0], "probabilities": [0.8, 0.2]}
{
  "score": 0.039999999999999994,
  "method": "Binary mean squared probability error; lower is better, range [0,1]."
}

Histogram

tool: histogram {"values": [0, 1, 2, 3, 4], "edges": [0, 2, 4]}
{
  "edges": [
    0,
    2,
    4
  ],
  "counts": [
    2,
    3
  ],
  "outside": 0,
  "method": "Left-closed, right-open bins except the final bin includes its right edge."
}

Normalize weights

tool: normalize_weights {"weights": [2, 3, 5]}
{
  "weights": [
    0.2,
    0.3,
    0.5
  ],
  "total": 10
}

Pareto front

tool: pareto_front {"points": [[1, 3], [2, 4], [3, 2]], "directions": ["min", "min"]}
{
  "indices": [
    0,
    2
  ],
  "dominatedIndices": [
    1
  ],
  "method": "Exact dominance on supplied objectives; duplicate points remain nondominated."
}

Cashflow npv

tool: cashflow_npv {"cashflows": [-100, 60, 60], "rate": 0.1}
{
  "value": 4.132231404958667,
  "discounted": [
    -100,
    54.54545454545454,
    49.58677685950413
  ],
  "method": "First cash flow occurs at time zero. Rate and spacing must use the same period; supplied assumptions only."
}

Break even

tool: break_even {"fixed": 1000, "price": 30, "variable": 10}
{
  "possible": true,
  "contribution": 20,
  "units": 50,
  "wholeUnits": 50,
  "method": "Linear single-product model; excludes demand limits and taxes."
}