Documentation
¶
Overview ¶
Package stats registers MCP tools that compute aggregates over arrays of numbers. Implementations come from gonum/stat and gonum/floats.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ArrayIn ¶
type ArrayIn struct {
Values []float64 `json:"values" jsonschema:"the data points to aggregate (must be non-empty)"`
}
ArrayIn is the input shape for tools that take a single array of values.
type CorrelationIn ¶
type CorrelationIn struct {
X []float64 `json:"x" jsonschema:"first series; must be non-empty and same length as y"`
Y []float64 `json:"y" jsonschema:"second series; must be non-empty and same length as x"`
}
CorrelationIn is the input for the Pearson correlation tool.
type CorrelationOut ¶
type CorrelationOut struct {
Function string `json:"function"`
N int `json:"n"`
X []float64 `json:"x"`
Y []float64 `json:"y"`
Result float64 `json:"result" jsonschema:"Pearson correlation coefficient in [-1, 1]"`
}
CorrelationOut is the output for the Pearson correlation tool.
type PercentileIn ¶
type PercentileIn struct {
Values []float64 `json:"values" jsonschema:"the data points to aggregate (must be non-empty)"`
Percentile float64 `json:"percentile" jsonschema:"the percentile to compute, in [0, 100]"`
}
PercentileIn is the input for percentile queries.
type Result ¶
type Result struct {
Function string `json:"function" jsonschema:"name of the aggregate that was computed"`
N int `json:"n" jsonschema:"number of input values"`
Inputs []float64 `json:"inputs" jsonschema:"the input array (echoed back)"`
Result float64 `json:"result" jsonschema:"computed aggregate value"`
}
Result is the output shape for stats tools.
Click to show internal directories.
Click to hide internal directories.