robust_stats

Production-oriented robust statistics, streaming analytics, anomaly detection, and risk toolkit for MoonBit.

statistics
robust
math
data-analysis
moon add hxiuzheng/robust_stats@0.2.0
Download zip
Author
Version
0.2.0
License
Apache-2.0
Last updated
5 hours ago
Downloads
2
README

#moon-robust-stats

moon-robust-stats 是纯 MoonBit 实现的鲁棒统计与异常检测工具箱,面向 IoT 监控、工业传感器、量化风控和实验数据分析。它把批量估计、流式聚合、滚动时间序列、稳健回归和可解释诊断放在同一个无外部依赖的库中,重点处理“少量尖峰不应改变整体判断”的生产场景。

English summary: a dependency-free MoonBit toolkit for robust location/scale estimation, outlier detection, rolling signals, streaming aggregation, robust regression, covariance analysis, resampling intervals, and risk diagnostics.

#快速开始

fn init {
let sensor = [1.0, 2.0, 3.0, 4.0, 100.0]
let center = @robust_stats.median(sensor)
let scale = @robust_stats.mad(sensor)
let clean = @robust_stats.hampel_filter(sensor, 3)
let interval = @robust_stats.bootstrap_median_interval(sensor, 200, seed=202608)
println("center=" + center.to_string())
println("scale=" + scale.to_string())
println("clean=" + clean.to_string())
println("CI=[" + interval.lower.to_string() + ", " + interval.upper.to_string() + "]")
}

流式场景:

let detector = @robust_stats.WindowedAnomalyDetector::new(31, threshold=3.5)
for value in readings {
if detector.observe(value) {
println("anomaly")
}
}

#能力范围

  • 核心位置/尺度:median、MAD、分位数、截尾均值、缩尾均值、IQR、加权统计、偏度/峰度。
  • 稳健估计:Huber IRLS、Tukey bisquare、L1、median-of-means、Hodges–Lehmann、Theil–Sen、Qn/IQR 尺度。
  • 异常检测:IQR fences、robust z-score、Hampel、滚动包络、阈值扫描、precision/recall/F1/MCC。
  • 时间序列:滚动均值/中位数/MAD/分位数、稳健 EWMA、去季节性、漂移/变点、稳健预测误差。
  • 相关与模型:Pearson/Spearman/Kendall、协方差/相关矩阵、稳健线性回归、2D Mahalanobis、矩阵基础运算。
  • 流式接口:StreamingMomentsStreamingCovarianceStreamingWindow、确定性 reservoir quantile sketch、在线裁剪状态机。
  • 不确定性与风险:bootstrap/jackknife、确定性重采样、VaR/CVaR、downside deviation、drawdown、稳健风险摘要。
  • 工程化:RobustPipeline 将清洗、滚动评分、告警和基线输出组合为可复用流程。

#运行、测试与基准

项目使用 MoonBit stable 工具链,根模块为 hxiuzheng/robust_stats

moon version --all moon check --deny-warn moon test --deny-warn moon check --target all moon test --target all moon run cmd/benchmark

cmd/benchmark 使用确定性污染数据集输出 100、1,000、5,000 样本的真实统计结果和 checksum。完整测量表、机器环境和解释边界见 benchmarks/README.md

当前仓库包含 55 个 MoonBit 源文件,格式化后总规模超过 8,500 行,其中包含约 7,600 行实现代码和 78 个可执行测试;测试覆盖空输入、单元素、重复值、常数序列、零尺度、极端尖峰、维度不一致、环形窗口、流式合并、重采样可复现性和模型退化路径。

#目录结构

文件/目录作用
mad.mbt, quantile.mbt, dispersion.mbt基础统计与分位数
estimators.mbt, outlier.mbt, optimization.mbt稳健估计与异常点
rolling.mbt, signal.mbt, timeseries.mbt时间序列与信号处理
regression.mbt, correlation.mbt, matrix.mbt模型、相关和矩阵
stream.mbt, streaming_advanced.mbt, window_detector.mbt流式与在线监控
resampling.mbt, risk.mbt, diagnostics.mbt置信区间、风险与诊断
pipeline.mbt面向业务的组合流程
cmd/benchmark可复现 benchmark 入口
*_test.mbt黑盒边界与回归测试

#CI 与发布

GitHub Actions 在 Linux、macOS、Windows 上执行 stable MoonBit 安装、moon update、全目标 check/test、格式化和接口快照检查。手动触发 Publish package workflow 可在预检查通过后运行 moon publish;发布所需的 token 只从 GitHub Actions secret 读取,不写入仓库。

#来源、包标识与许可证

  • 项目:MoonBit 黑客松大赛 2026 年 8 月项目 moon-robust-stats
  • GitHub:hxiuzheng/moon-robust-stats
  • GitLink:huang_XZ/moon-robust-stats
  • Mooncakes 模块:hxiuzheng/robust_stats
  • 本项目为原创 MoonBit 实现,无直接复制第三方源代码;基准数据为仓库内确定性生成数据。
  • 许可证:Apache-2.0,详见 LICENSE

#
AdaptiveClipper

pub struct AdaptiveClipper {
center : Double
scale : Double
alpha : Double
threshold : Double
initialized : Bool
}

#
AdaptiveClipper::is_initialized

fn AdaptiveClipper::is_initialized(self : AdaptiveClipper) -> Bool

#
AdaptiveClipper::location

fn AdaptiveClipper::location(self : AdaptiveClipper) -> Double

#
AdaptiveClipper::new

fn AdaptiveClipper::new(alpha : Double, threshold? : Double) -> AdaptiveClipper

#
AdaptiveClipper::scale

fn AdaptiveClipper::scale(self : AdaptiveClipper) -> Double

#
AdaptiveClipper::transform

fn AdaptiveClipper::transform(self : AdaptiveClipper, data : Array[Double]) -> Array[Double]

#
AdaptiveClipper::update

fn AdaptiveClipper::update(self : AdaptiveClipper, value : Double) -> Double

#
AnomalyDetector

pub struct AnomalyDetector {
center : Double
scale : Double
threshold : Double
fitted : Bool
}

#
AnomalyDetector::fit

fn AnomalyDetector::fit(self : AnomalyDetector, data : Array[Double]) -> Unit

#
AnomalyDetector::flags

fn AnomalyDetector::flags(self : AnomalyDetector, data : Array[Double]) -> Array[Bool]

#
AnomalyDetector::is_anomaly

fn AnomalyDetector::is_anomaly(self : AnomalyDetector, value : Double) -> Bool

#
AnomalyDetector::new

fn AnomalyDetector::new(threshold? : Double) -> AnomalyDetector

#
AnomalyDetector::refit_without_anomalies

fn AnomalyDetector::refit_without_anomalies(self : AnomalyDetector, data : Array[Double]) -> Unit

#
AnomalyDetector::score

fn AnomalyDetector::score(self : AnomalyDetector, value : Double) -> Double

#
AnomalyDetector::score_many

fn AnomalyDetector::score_many(self : AnomalyDetector, data : Array[Double]) -> Array[Double]

#
BenchmarkCase

pub struct BenchmarkCase {
name : String
sample_size : Int
mean : Double
median : Double
mad : Double
trimmed_mean : Double
winsorized_mean : Double
huber_location : Double
outlier_count : Int
covariance : Double
stream_mean : Double
}

#
BootstrapInterval

pub struct BootstrapInterval {
estimate : Double
lower : Double
upper : Double
confidence : Double
replicates : Int
}

#
ConfusionMatrix

pub struct ConfusionMatrix {
true_positive : Int
false_positive : Int
true_negative : Int
false_negative : Int
}

#
DatasetSummary

pub struct DatasetSummary {
count : Int
minimum : Double
maximum : Double
mean : Double
median : Double
q1 : Double
q3 : Double
iqr : Double
mad : Double
standard_deviation : Double
skewness : Double
outlier_count : Int
outlier_fraction : Double
}

#
DeterministicRng

pub struct DeterministicRng {
state : Int
}

#
DeterministicRng::new

fn DeterministicRng::new(seed : Int) -> DeterministicRng

#
DeterministicRng::next_int

fn DeterministicRng::next_int(self : DeterministicRng, upper : Int) -> Int

#
DeterministicRng::next_unit

fn DeterministicRng::next_unit(self : DeterministicRng) -> Double

#
LinearRegressionResult

pub struct LinearRegressionResult {
slope : Double
intercept : Double
scale : Double
r_squared : Double
iterations : Int
converged : Bool
residuals : Array[Double]
}

#
LocationScaleEstimate

pub struct LocationScaleEstimate {
location : Double
scale : Double
iterations : Int
converged : Bool
}

#
OutlierReport

pub struct OutlierReport {
lower_fence : Double
upper_fence : Double
lower_count : Int
upper_count : Int
indices : Array[Int]
scores : Array[Double]
}

#
PipelineResult

pub struct PipelineResult {
cleaned : Array[Double]
scores : Array[Double]
flags : Array[Bool]
baseline : Array[Double]
}

#
RobustPipeline

pub struct RobustPipeline {
window : Int
trim_percent : Double
threshold : Double
detector : AnomalyDetector
fitted : Bool
}

#
RobustPipeline::fit

fn RobustPipeline::fit(self : RobustPipeline, reference : Array[Double]) -> Unit

#
RobustPipeline::fit_transform

fn RobustPipeline::fit_transform(self : RobustPipeline, reference : Array[Double]) -> PipelineResult

#
RobustPipeline::is_fitted

fn RobustPipeline::is_fitted(self : RobustPipeline) -> Bool

#
RobustPipeline::new

fn RobustPipeline::new(window : Int, trim_percent : Double, threshold : Double) -> RobustPipeline

#
RobustPipeline::predict_next

fn RobustPipeline::predict_next(self : RobustPipeline, data : Array[Double]) -> Double

#
RobustPipeline::summary

fn RobustPipeline::summary(self : RobustPipeline, data : Array[Double]) -> DatasetSummary

#
RobustPipeline::threshold

fn RobustPipeline::threshold(self : RobustPipeline) -> Double

#
RobustPipeline::transform

fn RobustPipeline::transform(self : RobustPipeline, data : Array[Double]) -> PipelineResult

#
RobustPipeline::trim_percent

fn RobustPipeline::trim_percent(self : RobustPipeline) -> Double

#
RobustPipeline::window

fn RobustPipeline::window(self : RobustPipeline) -> Int

#
StreamingCovariance

pub struct StreamingCovariance {
count : Int
mean_x : Double
mean_y : Double
co_moment : Double
m2_x : Double
m2_y : Double
}

#
StreamingCovariance::correlation

fn StreamingCovariance::correlation(self : StreamingCovariance) -> Double

#
StreamingCovariance::covariance

fn StreamingCovariance::covariance(self : StreamingCovariance, sample? : Bool) -> Double

#
StreamingCovariance::new

#
StreamingCovariance::push

fn StreamingCovariance::push(self : StreamingCovariance, x : Double, y : Double) -> Unit

#
StreamingMoments

pub struct StreamingMoments {
count : Int
mean : Double
m2 : Double
m3 : Double
m4 : Double
}

#
StreamingMoments::kurtosis

fn StreamingMoments::kurtosis(self : StreamingMoments) -> Double

#
StreamingMoments::merge

fn StreamingMoments::merge(self : StreamingMoments, other : StreamingMoments) -> Unit

#
StreamingMoments::new

#
StreamingMoments::push

fn StreamingMoments::push(self : StreamingMoments, value : Double) -> Unit

#
StreamingMoments::skewness

fn StreamingMoments::skewness(self : StreamingMoments) -> Double

#
StreamingMoments::stddev

fn StreamingMoments::stddev(self : StreamingMoments, sample? : Bool) -> Double

#
StreamingMoments::variance

fn StreamingMoments::variance(self : StreamingMoments, sample? : Bool) -> Double

#
StreamingQuantileSketch

pub struct StreamingQuantileSketch {
capacity : Int
values_buffer : Array[Double]
seen : Int
state : Int
}

#
StreamingQuantileSketch::count

#
StreamingQuantileSketch::mad

#
StreamingQuantileSketch::median

#
StreamingQuantileSketch::new

#
StreamingQuantileSketch::push

fn StreamingQuantileSketch::push(self : StreamingQuantileSketch, value : Double) -> Unit

#
StreamingQuantileSketch::quantile

fn StreamingQuantileSketch::quantile(self : StreamingQuantileSketch, probability : Double) -> Double

#
StreamingQuantileSketch::snapshot

fn StreamingQuantileSketch::snapshot(self : StreamingQuantileSketch) -> Array[Double]

#
StreamingRobustStats

type StreamingRobustStats

#
StreamingRobustStats::count

#
StreamingRobustStats::mean

fn StreamingRobustStats::mean(self : StreamingRobustStats) -> Double

#
StreamingRobustStats::merge

#
StreamingRobustStats::new

fn StreamingRobustStats::new(clip_limit : Double) -> StreamingRobustStats

#
StreamingRobustStats::push

fn StreamingRobustStats::push(self : StreamingRobustStats, value : Double) -> Unit

#
StreamingRobustStats::push_many

fn StreamingRobustStats::push_many(self : StreamingRobustStats, values : Array[Double]) -> Unit

#
StreamingRobustStats::reset

fn StreamingRobustStats::reset(self : StreamingRobustStats) -> Unit

#
StreamingRobustStats::standard_deviation

fn StreamingRobustStats::standard_deviation(self : StreamingRobustStats) -> Double

#
StreamingRobustStats::variance

fn StreamingRobustStats::variance(self : StreamingRobustStats) -> Double

#
StreamingWindow

pub struct StreamingWindow {
capacity : Int
cursor : Int
size : Int
buffer : Array[Double]
}

#
StreamingWindow::clear

fn StreamingWindow::clear(self : StreamingWindow) -> Unit

#
StreamingWindow::is_full

fn StreamingWindow::is_full(self : StreamingWindow) -> Bool

#
StreamingWindow::len

fn StreamingWindow::len(self : StreamingWindow) -> Int

#
StreamingWindow::mad

fn StreamingWindow::mad(self : StreamingWindow) -> Double

#
StreamingWindow::mean

fn StreamingWindow::mean(self : StreamingWindow) -> Double

#
StreamingWindow::median

fn StreamingWindow::median(self : StreamingWindow) -> Double

#
StreamingWindow::new

fn StreamingWindow::new(capacity : Int) -> StreamingWindow

#
StreamingWindow::push

fn StreamingWindow::push(self : StreamingWindow, value : Double) -> Unit

#
StreamingWindow::robust_z

fn StreamingWindow::robust_z(self : StreamingWindow, value : Double) -> Double

#
StreamingWindow::trimmed_mean

fn StreamingWindow::trimmed_mean(self : StreamingWindow, trim_percent : Double) -> Double

#
StreamingWindow::values

fn StreamingWindow::values(self : StreamingWindow) -> Array[Double]

#
WindowedAnomalyDetector

pub struct WindowedAnomalyDetector {
window : StreamingWindow
threshold : Double
total_seen : Int
total_anomalies : Int
}

#
WindowedAnomalyDetector::anomalies

#
WindowedAnomalyDetector::new

fn WindowedAnomalyDetector::new(capacity : Int, threshold? : Double) -> WindowedAnomalyDetector

#
WindowedAnomalyDetector::observe

fn WindowedAnomalyDetector::observe(self : WindowedAnomalyDetector, value : Double) -> Bool

#
WindowedAnomalyDetector::observe_many

fn WindowedAnomalyDetector::observe_many(self : WindowedAnomalyDetector, data : Array[Double]) -> Array[Bool]

#
WindowedAnomalyDetector::rate

#
WindowedAnomalyDetector::reset

#
WindowedAnomalyDetector::seen

#
WindowedAnomalyDetector::window_values

fn WindowedAnomalyDetector::window_values(self : WindowedAnomalyDetector) -> Array[Double]

#
abs_double

fn abs_double(value : Double) -> Double

#
accuracy

fn accuracy(matrix : ConfusionMatrix) -> Double

#
adaptive_huber_tuning

fn adaptive_huber_tuning(data : Array[Double], target_fraction : Double) -> Double

#
adaptive_location_ensemble

fn adaptive_location_ensemble(data : Array[Double]) -> Double

#
add_seasonal_median

fn add_seasonal_median(data : Array[Double], period : Int, seasonal : Array[Double]) -> Array[Double]

#
affine_transform

fn affine_transform(data : Array[Double], offset : Double, factor : Double) -> Array[Double]

#
aggregate_by_quantile

fn aggregate_by_quantile(data : Array[Double], groups : Int) -> Array[Array[Double]]

#
aggregate_error_by_segment

fn aggregate_error_by_segment(actual : Array[Double], predicted : Array[Double], segments : Int) -> Array[Double]

#
agreement_rate

fn agreement_rate(first : Array[Bool], second : Array[Bool]) -> Double

#
anomaly_rate

fn anomaly_rate(flags : Array[Bool]) -> Double

#
auc_from_roc

fn auc_from_roc(points : Array[Array[Double]]) -> Double

#
autocorrelation_series

fn autocorrelation_series(data : Array[Double], max_lag : Int) -> Array[Double]

#
average_precision

fn average_precision(points : Array[Array[Double]]) -> Double

#
balanced_accuracy

fn balanced_accuracy(matrix : ConfusionMatrix) -> Double

#
benchmark_case

fn benchmark_case(name : String, data : Array[Double]) -> BenchmarkCase

#
benchmark_cases

fn benchmark_cases(sizes : Array[Int]) -> Array[BenchmarkCase]

#
benchmark_checksum

fn benchmark_checksum(case : BenchmarkCase) -> Double

#
benchmark_checksums

fn benchmark_checksums(sizes : Array[Int]) -> Array[Double]

#
benchmark_contamination_fraction

fn benchmark_contamination_fraction(data : Array[Double]) -> Double

#
benchmark_data

fn benchmark_data(size : Int) -> Array[Double]

#
benchmark_report

fn benchmark_report(sizes : Array[Int]) -> String

#
benchmark_reproducible

fn benchmark_reproducible(sizes : Array[Int]) -> Bool

#
benchmark_robust_gain

fn benchmark_robust_gain(case : BenchmarkCase) -> Double

#
benchmark_scaling_score

fn benchmark_scaling_score(small : BenchmarkCase, large : BenchmarkCase) -> Double

#
benchmark_summary

fn benchmark_summary(case : BenchmarkCase) -> Array[String]

#
best_f1_threshold

fn best_f1_threshold(scores : Array[Double], actual : Array[Bool], thresholds : Array[Double]) -> Double

#
binary_labels_from_median

fn binary_labels_from_median(values : Array[Double]) -> Array[Bool]

#
binary_labels_from_threshold

fn binary_labels_from_threshold(values : Array[Double], threshold : Double) -> Array[Bool]

#
biweight_midvariance

fn biweight_midvariance(data : Array[Double], tuning? : Double) -> Double

#
bootstrap_difference_interval

fn bootstrap_difference_interval(first : Array[Double], second : Array[Double], replicates : Int, confidence? : Double, seed? : Int) -> BootstrapInterval

#
bootstrap_mad_interval

fn bootstrap_mad_interval(data : Array[Double], replicates : Int, confidence? : Double, seed? : Int) -> BootstrapInterval

#
bootstrap_mean_interval

fn bootstrap_mean_interval(data : Array[Double], replicates : Int, confidence? : Double, seed? : Int) -> BootstrapInterval

#
bootstrap_median_interval

fn bootstrap_median_interval(data : Array[Double], replicates : Int, confidence? : Double, seed? : Int) -> BootstrapInterval

#
bootstrap_replicates

fn bootstrap_replicates(data : Array[Double], replicates : Int, sample_size? : Int, seed? : Int) -> Array[Array[Double]]

#
bootstrap_standard_error

fn bootstrap_standard_error(data : Array[Double], replicates : Int, seed? : Int) -> Double

#
bootstrap_trimmed_mean_interval

fn bootstrap_trimmed_mean_interval(data : Array[Double], trim_percent : Double, replicates : Int, confidence? : Double, seed? : Int) -> BootstrapInterval

#
boundary_distance

fn boundary_distance(data : Array[Double], lower : Double, upper : Double) -> Array[Double]

#
boundary_trimmed_data

fn boundary_trimmed_data(data : Array[Double], lower : Double, upper : Double) -> Array[Double]

#
boundary_violation_count

fn boundary_violation_count(data : Array[Double], lower : Double, upper : Double) -> Int

#
boundary_violation_fraction

fn boundary_violation_fraction(data : Array[Double], lower : Double, upper : Double) -> Double

#
bounded_slope

fn bounded_slope(data : Array[Double], maximum : Double) -> Array[Double]

#
bowley_skewness

fn bowley_skewness(data : Array[Double]) -> Double

#
brier_score

fn brier_score(actual : Array[Bool], probabilities : Array[Double]) -> Double

#
calibration_bins

fn calibration_bins(actual : Array[Bool], probabilities : Array[Double], bins : Int) -> Array[Array[Double]]

#
center_by_mean

fn center_by_mean(data : Array[Double]) -> Array[Double]

#
center_by_median

fn center_by_median(data : Array[Double]) -> Array[Double]

#
centered_difference

fn centered_difference(data : Array[Double]) -> Array[Double]

#
central_fraction

fn central_fraction(data : Array[Double], probability : Double) -> Array[Double]

#
central_interval

fn central_interval(data : Array[Double], coverage : Double) -> Array[Double]

#
central_moment

fn central_moment(data : Array[Double], order : Int) -> Double

#
change_point_indices

fn change_point_indices(data : Array[Double], window : Int, threshold : Double) -> Array[Int]

#
clip_by_quantiles

fn clip_by_quantiles(data : Array[Double], lower_probability : Double, upper_probability : Double) -> Array[Double]

#
clip_range

fn clip_range(data : Array[Double], lower : Double, upper : Double) -> Array[Double]

#
cluster_counts

fn cluster_counts(assignments : Array[Int], cluster_count : Int) -> Array[Int]

#
cluster_medians

fn cluster_medians(data : Array[Double], assignments : Array[Int], cluster_count : Int) -> Array[Double]

#
cluster_members

fn cluster_members(data : Array[Double], assignments : Array[Int], cluster : Int) -> Array[Double]

#
cluster_separation

fn cluster_separation(centers : Array[Double], spreads : Array[Double]) -> Double

#
cluster_spread

fn cluster_spread(data : Array[Double], centers : Array[Double]) -> Array[Double]

#
cluster_stability

fn cluster_stability(data : Array[Double], cluster_count : Int) -> Double

#
coefficient_of_variation

fn coefficient_of_variation(data : Array[Double]) -> Double

#
column

fn column(data : Array[Array[Double]], index : Int) -> Array[Double]

#
compare_input_scores

fn compare_input_scores(first : Array[Double], second : Array[Double]) -> Double

#
compare_location_estimators

fn compare_location_estimators(data : Array[Double]) -> Array[Double]

#
compare_quality

fn compare_quality(first : Array[Double], second : Array[Double]) -> Double

#
conditional_value_at_risk

fn conditional_value_at_risk(data : Array[Double], probability : Double) -> Double

#
confusion_matrix

fn confusion_matrix(actual : Array[Bool], predicted : Array[Bool]) -> ConfusionMatrix

#
consensus_spread

fn consensus_spread(data : Array[Double]) -> Double

#
constrained_location

fn constrained_location(data : Array[Double], lower : Double, upper : Double) -> Double

#
correlation_matrix

fn correlation_matrix(data : Array[Array[Double]]) -> Array[Array[Double]]

#
cosine_similarity

fn cosine_similarity(x : Array[Double], y : Array[Double]) -> Double

#
covariance

fn covariance(x : Array[Double], y : Array[Double], sample? : Bool) -> Double

#
covariance_from_centered

fn covariance_from_centered(centered : Array[Array[Double]]) -> Array[Array[Double]]

#
coverage_of_interval

fn coverage_of_interval(data : Array[Double], interval : Array[Double]) -> Double

#
cumulative_mad

fn cumulative_mad(data : Array[Double]) -> Array[Double]

#
cumulative_mean

fn cumulative_mean(data : Array[Double]) -> Array[Double]

#
cumulative_median

fn cumulative_median(data : Array[Double]) -> Array[Double]

#
cumulative_outlier_rate

fn cumulative_outlier_rate(data : Array[Double], threshold? : Double) -> Array[Double]

#
cumulative_quantile

fn cumulative_quantile(data : Array[Double], probability : Double) -> Array[Double]

#
cumulative_robust_sum

fn cumulative_robust_sum(data : Array[Double], clip : Double) -> Array[Double]

#
cumulative_sum

fn cumulative_sum(data : Array[Double]) -> Array[Double]

#
cumulative_trimmed_mean

fn cumulative_trimmed_mean(data : Array[Double], trim_percent : Double) -> Array[Double]

#
cumulative_weighted_mean

fn cumulative_weighted_mean(data : Array[Double], weights : Array[Double]) -> Array[Double]

#
cumulative_winsorized_mean

fn cumulative_winsorized_mean(data : Array[Double], trim_percent : Double) -> Array[Double]

#
detect_scale_change

fn detect_scale_change(reference : Array[Double], current : Array[Double], threshold : Double) -> Bool

#
detect_shift

fn detect_shift(reference : Array[Double], current : Array[Double], threshold : Double) -> Bool

#
diagnostic_likelihood_negative

fn diagnostic_likelihood_negative(matrix : ConfusionMatrix) -> Double

#
diagnostic_likelihood_positive

fn diagnostic_likelihood_positive(matrix : ConfusionMatrix) -> Double

#
diagonal_matrix

fn diagonal_matrix(values : Array[Double]) -> Array[Array[Double]]

#
difference_from_baseline

fn difference_from_baseline(data : Array[Double], baseline : Double) -> Array[Double]

#
distribution_overlap

fn distribution_overlap(first : Array[Double], second : Array[Double], bins : Int) -> Double

#
downside_deviation

fn downside_deviation(data : Array[Double], target : Double) -> Double

#
drawdown_series

fn drawdown_series(data : Array[Double]) -> Array[Double]

#
drift_indices

fn drift_indices(data : Array[Double], window : Int, threshold : Double) -> Array[Int]

#
duplicate_fraction

fn duplicate_fraction(data : Array[Double]) -> Double

#
duplicate_indices

fn duplicate_indices(data : Array[Double]) -> Array[Int]

#
empirical_cdf

fn empirical_cdf(data : Array[Double], value : Double) -> Double

#
empirical_cdf_grid

fn empirical_cdf_grid(data : Array[Double], grid : Array[Double]) -> Array[Double]

#
empirical_quantile_error

fn empirical_quantile_error(data : Array[Double], value : Double, target : Double) -> Double

#
empirical_survival

fn empirical_survival(data : Array[Double], value : Double) -> Double

#
ensemble_prediction

fn ensemble_prediction(models : Array[LinearRegressionResult], x : Double) -> Double

#
ensemble_residual_scale

fn ensemble_residual_scale(models : Array[LinearRegressionResult]) -> Double

#
envelope_violations

fn envelope_violations(data : Array[Double], window : Int, multiplier? : Double) -> Array[Int]

#
equal_weight_ensemble

fn equal_weight_ensemble(data : Array[Double]) -> Double

#
equal_width_bins

fn equal_width_bins(data : Array[Double], bins : Int) -> Array[Int]

#
estimate_reliability

fn estimate_reliability(data : Array[Double]) -> Array[Double]

#
estimate_trim_by_loss

fn estimate_trim_by_loss(data : Array[Double], candidates : Array[Double]) -> Double

#
estimator_bias_against_clean

fn estimator_bias_against_clean(data : Array[Double], clean_center : Double) -> Array[Double]

#
estimator_ensemble

fn estimator_ensemble(data : Array[Double], weights : Array[Double]) -> Double

#
excess_kurtosis

fn excess_kurtosis(data : Array[Double]) -> Double

#
expected_shortfall

fn expected_shortfall(data : Array[Double], probability : Double) -> Double

#
expected_shortfall_gap

fn expected_shortfall_gap(data : Array[Double], probability : Double) -> Double

#
explained_variance

fn explained_variance(actual : Array[Double], predicted : Array[Double]) -> Double

#
exponentially_weighted_mean

fn exponentially_weighted_mean(data : Array[Double], alpha : Double) -> Array[Double]

#
f1_score

fn f1_score(matrix : ConfusionMatrix) -> Double

#
false_negative_rate

fn false_negative_rate(matrix : ConfusionMatrix) -> Double

#
false_positive_rate

fn false_positive_rate(matrix : ConfusionMatrix) -> Double

#
first_difference

fn first_difference(data : Array[Double]) -> Array[Double]

#
five_number_summary

fn five_number_summary(data : Array[Double]) -> Array[Double]

#
geometric_mean

fn geometric_mean(data : Array[Double]) -> Double

#
gini_mean_difference

fn gini_mean_difference(data : Array[Double]) -> Double

#
golden_section_location

fn golden_section_location(data : Array[Double], lower : Double, upper : Double, iterations : Int) -> Double

#
gradient_descent_location

fn gradient_descent_location(data : Array[Double], initial : Double, learning_rate : Double, iterations : Int, tuning : Double) -> Double

#
grid_search_location

fn grid_search_location(data : Array[Double], lower : Double, upper : Double, steps : Int) -> Double

#
hampel_filter

fn hampel_filter(data : Array[Double], window : Int, threshold? : Double) -> Array[Double]

#
hampel_filter_series

fn hampel_filter_series(data : Array[Double], window : Int, threshold? : Double) -> Array[Double]

#
hampel_scores

fn hampel_scores(data : Array[Double], window : Int) -> Array[Double]

#
harmonic_mean

fn harmonic_mean(data : Array[Double]) -> Double

#
highest_density_approximation

fn highest_density_approximation(data : Array[Double], coverage : Double) -> Array[Double]

#
histogram_counts

fn histogram_counts(data : Array[Double], bins : Int) -> Array[Int]

#
histogram_edges

fn histogram_edges(data : Array[Double], bins : Int) -> Array[Double]

#
hodges_lehmann

fn hodges_lehmann(data : Array[Double]) -> Double

#
huber_location

fn huber_location(data : Array[Double], max_iter? : Int, tol? : Double) -> Double

#
huber_location_estimate

fn huber_location_estimate(data : Array[Double], tuning? : Double, max_iter? : Int, tol? : Double) -> LocationScaleEstimate

#
huber_loss

fn huber_loss(residual : Double, tuning : Double) -> Double

#
huber_objective

fn huber_objective(data : Array[Double], location : Double, tuning : Double) -> Double

#
huber_regression

fn huber_regression(x : Array[Double], y : Array[Double], tuning? : Double, max_iter? : Int, tol? : Double) -> LinearRegressionResult

#
huber_weight

fn huber_weight(residual : Double, tuning : Double) -> Double

#
influence_weight

fn influence_weight(data : Array[Double], value : Double) -> Double

#
initialize_quantile_centers

fn initialize_quantile_centers(data : Array[Double], cluster_count : Int) -> Array[Double]

#
interquartile_range

fn interquartile_range(data : Array[Double]) -> Double

#
inverse_scale_weights

fn inverse_scale_weights(data : Array[Double]) -> Array[Double]

#
iqr_fences

fn iqr_fences(data : Array[Double], multiplier? : Double) -> Array[Double]

#
is_constant

fn is_constant(data : Array[Double], tolerance? : Double) -> Bool

#
is_empty

fn is_empty(data : Array[Double]) -> Bool

#
is_sorted_non_decreasing

fn is_sorted_non_decreasing(data : Array[Double]) -> Bool

#
is_sorted_non_increasing

fn is_sorted_non_increasing(data : Array[Double]) -> Bool

#
jackknife_bias_corrected_mean

fn jackknife_bias_corrected_mean(data : Array[Double]) -> Double

#
jackknife_estimates

fn jackknife_estimates(data : Array[Double]) -> Array[Double]

#
k_medians_1d

fn k_medians_1d(data : Array[Double], cluster_count : Int, max_iter? : Int, tol? : Double) -> Array[Double]

#
k_medians_assign

fn k_medians_assign(data : Array[Double], cluster_count : Int) -> Array[Int]

#
k_medians_loss

fn k_medians_loss(data : Array[Double], centers : Array[Double]) -> Double

#
kendall_tau

fn kendall_tau(x : Array[Double], y : Array[Double]) -> Double

#
l1_location

fn l1_location(data : Array[Double], max_iter? : Int, tol? : Double) -> Double

#
l1_normalize

fn l1_normalize(data : Array[Double]) -> Array[Double]

#
l2_normalize

fn l2_normalize(data : Array[Double]) -> Array[Double]

#
leave_one_out_influence

fn leave_one_out_influence(data : Array[Double]) -> Array[Double]

#
leave_one_out_location_estimates

fn leave_one_out_location_estimates(data : Array[Double]) -> Array[Double]

#
linear_regression

fn linear_regression(x : Array[Double], y : Array[Double]) -> LinearRegressionResult

#
lower_partial_moment

fn lower_partial_moment(data : Array[Double], order : Int, threshold : Double) -> Double

#
lower_quartile

fn lower_quartile(data : Array[Double]) -> Double

#
lower_tail_mean

fn lower_tail_mean(data : Array[Double], probability : Double) -> Double

#
mad

fn mad(data : Array[Double]) -> Double

#
mahalanobis_distance_2d

fn mahalanobis_distance_2d(value : Array[Double], center : Array[Double], covariance_matrix : Array[Array[Double]]) -> Double

#
mahalanobis_distance_diagonal

fn mahalanobis_distance_diagonal(value : Array[Double], center : Array[Double], scale : Array[Double]) -> Double

#
mahalanobis_scores

fn mahalanobis_scores(data : Array[Array[Double]]) -> Array[Double]

#
matrix_add

fn matrix_add(left : Array[Array[Double]], right : Array[Array[Double]]) -> Array[Array[Double]]

#
matrix_center

fn matrix_center(matrix : Array[Array[Double]]) -> Array[Array[Double]]

#
matrix_clip_diagonal

fn matrix_clip_diagonal(matrix : Array[Array[Double]], minimum : Double) -> Array[Array[Double]]

#
matrix_column_means

fn matrix_column_means(matrix : Array[Array[Double]]) -> Array[Double]

#
matrix_column_norms

fn matrix_column_norms(matrix : Array[Array[Double]]) -> Array[Double]

#
matrix_determinant_2x2

fn matrix_determinant_2x2(matrix : Array[Array[Double]]) -> Double

#
matrix_frobenius_norm

fn matrix_frobenius_norm(matrix : Array[Array[Double]]) -> Double

#
matrix_identity

fn matrix_identity(size : Int) -> Array[Array[Double]]

#
matrix_inverse_2x2

fn matrix_inverse_2x2(matrix : Array[Array[Double]]) -> Array[Array[Double]]

#
matrix_is_symmetric

fn matrix_is_symmetric(matrix : Array[Array[Double]], tolerance? : Double) -> Bool

#
matrix_max_abs_difference

fn matrix_max_abs_difference(left : Array[Array[Double]], right : Array[Array[Double]]) -> Double

#
matrix_multiply

fn matrix_multiply(left : Array[Array[Double]], right : Array[Array[Double]]) -> Array[Array[Double]]

#
matrix_row_means

fn matrix_row_means(matrix : Array[Array[Double]]) -> Array[Double]

#
matrix_row_norms

fn matrix_row_norms(matrix : Array[Array[Double]]) -> Array[Double]

#
matrix_scale

fn matrix_scale(matrix : Array[Array[Double]], factor : Double) -> Array[Array[Double]]

#
matrix_to_rows

fn matrix_to_rows(matrix : Array[Array[Double]]) -> Array[Array[Double]]

#
matrix_trace

fn matrix_trace(matrix : Array[Array[Double]]) -> Double

#
matrix_transpose

fn matrix_transpose(matrix : Array[Array[Double]]) -> Array[Array[Double]]

#
matthews_correlation

fn matthews_correlation(matrix : ConfusionMatrix) -> Double

#
max_value

fn max_value(data : Array[Double]) -> Double

#
maximum_drawdown

fn maximum_drawdown(data : Array[Double]) -> Double

#
maximum_influence

fn maximum_influence(data : Array[Double]) -> Double

#
mean

fn mean(data : Array[Double]) -> Double

#
mean_absolute_deviation

fn mean_absolute_deviation(data : Array[Double]) -> Double

#
mean_absolute_error

fn mean_absolute_error(actual : Array[Double], predicted : Array[Double]) -> Double

#
mean_squared_error

fn mean_squared_error(actual : Array[Double], predicted : Array[Double]) -> Double

#
median

fn median(data : Array[Double]) -> Double

#
median_absolute_error

fn median_absolute_error(actual : Array[Double], predicted : Array[Double]) -> Double

#
median_filter

fn median_filter(data : Array[Double], window : Int) -> Array[Double]

#
median_high

fn median_high(data : Array[Double]) -> Double

#
median_low

fn median_low(data : Array[Double]) -> Double

#
median_of_means

fn median_of_means(data : Array[Double], groups : Int) -> Double

#
median_ratio

fn median_ratio(data : Array[Double], baseline : Double) -> Double

#
median_regression_error

fn median_regression_error(model : LinearRegressionResult) -> Double

#
median_squared_deviation

fn median_squared_deviation(data : Array[Double]) -> Double

#
midhinge

fn midhinge(data : Array[Double]) -> Double

#
min_max_scale

fn min_max_scale(data : Array[Double], lower? : Double, upper? : Double) -> Array[Double]

#
min_value

fn min_value(data : Array[Double]) -> Double

#
monotone_scale

fn monotone_scale(data : Array[Double], factor : Double) -> Array[Double]

#
monotonicity_score

fn monotonicity_score(data : Array[Double]) -> Double

#
monte_carlo_mean

fn monte_carlo_mean(data : Array[Double], draws : Int, seed : Int) -> Double

#
moors_kurtosis

fn moors_kurtosis(data : Array[Double]) -> Double

#
multivariate_outlier_indices

fn multivariate_outlier_indices(data : Array[Array[Double]], threshold : Double) -> Array[Int]

#
nearest_center

fn nearest_center(value : Double, centers : Array[Double]) -> Int

#
nearest_rank

fn nearest_rank(data : Array[Double], probability : Double) -> Double

The nearest-rank quantile is useful when a discrete order statistic is required.

#
negative_predictive_value

fn negative_predictive_value(matrix : ConfusionMatrix) -> Double

#
normalize_against_reference

fn normalize_against_reference(data : Array[Double], reference : Array[Double]) -> Array[Double]

#
one_dimensional_cluster_assignments

fn one_dimensional_cluster_assignments(data : Array[Double], centers : Array[Double]) -> Array[Int]

#
online_correlation

fn online_correlation(x : Array[Double], y : Array[Double]) -> Double

#
online_covariance

fn online_covariance(x : Array[Double], y : Array[Double]) -> Double

#
order_statistics

fn order_statistics(data : Array[Double], positions : Array[Int]) -> Array[Double]

#
outlier_fraction

fn outlier_fraction(indices : Array[Int], sample_size : Int) -> Double

#
outlier_indices_iqr

fn outlier_indices_iqr(data : Array[Double], multiplier? : Double) -> Array[Int]

#
outlier_indices_z

fn outlier_indices_z(data : Array[Double], threshold? : Double) -> Array[Int]

#
pairwise_absolute_difference_median

fn pairwise_absolute_difference_median(data : Array[Double]) -> Double

#
pairwise_covariance_matrix

fn pairwise_covariance_matrix(data : Array[Array[Double]]) -> Array[Array[Double]]

#
pairwise_median_difference

fn pairwise_median_difference(data : Array[Double]) -> Double

#
pearson_correlation

fn pearson_correlation(x : Array[Double], y : Array[Double]) -> Double

#
percent_change

fn percent_change(data : Array[Double], baseline : Double) -> Array[Double]

#
percentile

fn percentile(data : Array[Double], percent : Double) -> Double

#
permutation_difference

fn permutation_difference(first : Array[Double], second : Array[Double], replicates : Int, seed? : Int) -> Array[Double]

#
pipeline_alert_count

fn pipeline_alert_count(data : Array[Double], window : Int, threshold : Double) -> Int

#
pipeline_alert_rate

fn pipeline_alert_rate(data : Array[Double], window : Int, threshold : Double) -> Double

#
pipeline_apply_to_segments

fn pipeline_apply_to_segments(data : Array[Double], segments : Int, window : Int, threshold : Double) -> Array[Array[Double]]

#
pipeline_baseline

fn pipeline_baseline(data : Array[Double], window : Int, trim_percent : Double) -> Array[Double]

#
pipeline_change_points

fn pipeline_change_points(data : Array[Double], window : Int, threshold : Double) -> Array[Int]

#
pipeline_clean

fn pipeline_clean(data : Array[Double], window : Int, threshold : Double) -> Array[Double]

#
pipeline_compare

fn pipeline_compare(data : Array[Double], window : Int, trim_percent : Double, threshold : Double) -> Array[Array[Double]]

#
pipeline_flags

fn pipeline_flags(data : Array[Double], window : Int, threshold : Double) -> Array[Bool]

#
pipeline_forecast_error

fn pipeline_forecast_error(data : Array[Double], window : Int) -> Double

#
pipeline_has_alert

fn pipeline_has_alert(data : Array[Double], window : Int, threshold : Double) -> Bool

#
pipeline_quality

fn pipeline_quality(data : Array[Double], window : Int, trim_percent : Double, threshold : Double) -> Array[Double]

#
pipeline_resample

fn pipeline_resample(data : Array[Double], window : Int, threshold : Double, replicates : Int, seed? : Int) -> BootstrapInterval

#
pipeline_residual_report

fn pipeline_residual_report(data : Array[Double], window : Int, threshold : Double) -> Array[Double]

#
pipeline_risk

fn pipeline_risk(data : Array[Double]) -> Array[Double]

#
pipeline_score

fn pipeline_score(data : Array[Double], window : Int) -> Array[Double]

#
pipeline_stability

fn pipeline_stability(data : Array[Double], window : Int, threshold : Double) -> Double

#
population_stddev

fn population_stddev(data : Array[Double]) -> Double

#
population_variance

fn population_variance(data : Array[Double]) -> Double

Population variance. Returns zero for an empty or one-element sample.

#
precision

fn precision(matrix : ConfusionMatrix) -> Double

#
precision_recall_curve

fn precision_recall_curve(scores : Array[Double], actual : Array[Bool], thresholds : Array[Double]) -> Array[Array[Double]]

#
predict_linear

fn predict_linear(x : Array[Double], slope : Double, intercept : Double) -> Array[Double]

#
probability_interval

fn probability_interval(data : Array[Double], center : Double, radius : Double) -> Double

#
probability_plot_intercept

fn probability_plot_intercept(sample : Array[Double], reference : Array[Double]) -> Double

#
probability_plot_slope

fn probability_plot_slope(sample : Array[Double], reference : Array[Double]) -> Double

#
projection_outlier_indices

fn projection_outlier_indices(data : Array[Array[Double]], direction : Array[Double], threshold : Double) -> Array[Int]

#
quadratic_form

fn quadratic_form(value : Array[Double], matrix : Array[Array[Double]]) -> Double

#
quantile

fn quantile(data : Array[Double], probability : Double) -> Double

Return a quantile using linear interpolation between adjacent order statistics. probability is in the closed interval [0, 1].

#
quantile_bins

fn quantile_bins(data : Array[Double], bins : Int) -> Array[Int]

#
quantile_deviation

fn quantile_deviation(data : Array[Double], probability : Double) -> Double

#
quantile_distance

fn quantile_distance(first : Array[Double], second : Array[Double], probabilities : Array[Double]) -> Double

#
quantile_group_mads

fn quantile_group_mads(data : Array[Double], groups : Int) -> Array[Double]

#
quantile_group_means

fn quantile_group_means(data : Array[Double], groups : Int) -> Array[Double]

#
quantile_location

fn quantile_location(data : Array[Double], probability : Double) -> Double

#
quantile_map

fn quantile_map(data : Array[Double], reference : Array[Double]) -> Array[Double]

#
quantile_quantile_points

fn quantile_quantile_points(sample : Array[Double], reference : Array[Double], points : Array[Double]) -> Array[Array[Double]]

#
quantile_range

fn quantile_range(data : Array[Double], lower_probability : Double, upper_probability : Double) -> Double

#
quantile_skewness

fn quantile_skewness(data : Array[Double]) -> Double

#
quantile_transform

fn quantile_transform(data : Array[Double], output_lower? : Double, output_upper? : Double) -> Array[Double]

#
r_squared

fn r_squared(actual : Array[Double], predicted : Array[Double]) -> Double

#
range

fn range(data : Array[Double]) -> Double

#
range_ratio

fn range_ratio(data : Array[Double]) -> Double

#
rank_centered

fn rank_centered(data : Array[Double]) -> Array[Double]

#
rank_distance

fn rank_distance(left : Array[Double], right : Array[Double]) -> Double

#
rank_normalize

fn rank_normalize(data : Array[Double]) -> Array[Double]

#
rank_of

fn rank_of(data : Array[Double], value : Double) -> Double

#
rank_sum

fn rank_sum(data : Array[Double]) -> Double

#
ranks

fn ranks(data : Array[Double]) -> Array[Double]

#
recall

fn recall(matrix : ConfusionMatrix) -> Double

#
recovery_index

fn recovery_index(data : Array[Double]) -> Double

#
regression_leverage

fn regression_leverage(x : Array[Double], x_value : Double) -> Double

#
regression_mae

fn regression_mae(model : LinearRegressionResult) -> Double

#
regression_prediction_interval

fn regression_prediction_interval(model : LinearRegressionResult, x_value : Double, z_value : Double) -> Array[Double]

#
regression_residual_scale

fn regression_residual_scale(model : LinearRegressionResult) -> Double

#
regression_rmse

fn regression_rmse(model : LinearRegressionResult) -> Double

#
relative_iqr

fn relative_iqr(data : Array[Double]) -> Double

#
remove_seasonal_median

fn remove_seasonal_median(data : Array[Double], period : Int) -> Array[Double]

#
resample_with_replacement

fn resample_with_replacement(data : Array[Double], sample_size : Int, seed : Int) -> Array[Double]

#
residual_outlier_indices

fn residual_outlier_indices(model : LinearRegressionResult, threshold? : Double) -> Array[Int]

#
robust_autocorrelation

fn robust_autocorrelation(data : Array[Double], lag : Int) -> Double

#
robust_bootstrap_ensemble

fn robust_bootstrap_ensemble(data : Array[Double], replicates : Int, seed? : Int) -> BootstrapInterval

#
robust_center

fn robust_center(data : Array[Array[Double]]) -> Array[Double]

#
robust_center_scale

fn robust_center_scale(data : Array[Double]) -> Array[Double]

#
robust_change_scores

fn robust_change_scores(data : Array[Double], window : Int) -> Array[Double]

#
robust_classification_report

fn robust_classification_report(scores : Array[Double], actual : Array[Bool], thresholds : Array[Double]) -> Array[Array[Double]]

#
robust_clip_and_center

fn robust_clip_and_center(data : Array[Double], lower_probability : Double, upper_probability : Double) -> Array[Double]

#
robust_cluster_outliers

fn robust_cluster_outliers(data : Array[Double], cluster_count : Int, threshold : Double) -> Array[Int]

#
robust_cluster_summary

fn robust_cluster_summary(data : Array[Double], cluster_count : Int) -> Array[Array[Double]]

#
robust_confidence_width

fn robust_confidence_width(data : Array[Double], confidence? : Double) -> Double

#
robust_consensus

fn robust_consensus(data : Array[Double], tolerance : Double) -> Bool

#
robust_correlation

fn robust_correlation(x : Array[Double], y : Array[Double]) -> Double

#
robust_correlation_matrix

fn robust_correlation_matrix(data : Array[Array[Double]], trim_percent : Double) -> Array[Array[Double]]

#
robust_covariance

fn robust_covariance(x : Array[Double], y : Array[Double], trim_percent : Double) -> Double

#
robust_covariance_from_centered

fn robust_covariance_from_centered(data : Array[Array[Double]]) -> Array[Array[Double]]

#
robust_covariance_matrix

fn robust_covariance_matrix(data : Array[Array[Double]], trim_percent : Double) -> Array[Array[Double]]

#
robust_detrend

fn robust_detrend(data : Array[Double], window : Int) -> Array[Double]

#
robust_drift_score

fn robust_drift_score(data : Array[Double], window : Int) -> Array[Double]

#
robust_envelope

fn robust_envelope(data : Array[Double], window : Int, multiplier? : Double) -> Array[Array[Double]]

#
robust_expected_loss

fn robust_expected_loss(data : Array[Double], target : Double, probability : Double) -> Double

#
robust_exponential_scale

fn robust_exponential_scale(data : Array[Double], alpha : Double) -> Array[Double]

#
robust_exponentially_weighted_mean

fn robust_exponentially_weighted_mean(data : Array[Double], alpha : Double, clip : Double) -> Array[Double]

#
robust_forecast_next

fn robust_forecast_next(data : Array[Double], window : Int) -> Double

#
robust_forecast_outliers

fn robust_forecast_outliers(data : Array[Double], window : Int, threshold? : Double) -> Array[Int]

#
robust_growth_rate

fn robust_growth_rate(data : Array[Double]) -> Array[Double]

#
robust_input_score

fn robust_input_score(data : Array[Double]) -> Double

#
robust_interpolate

fn robust_interpolate(data : Array[Double], window : Int) -> Array[Double]

#
robust_lagged_difference

fn robust_lagged_difference(data : Array[Double], lag : Int) -> Array[Double]

#
robust_location_gradient

fn robust_location_gradient(data : Array[Double], location : Double, tuning : Double) -> Double

#
robust_location_path

fn robust_location_path(data : Array[Double], start : Double, steps : Int, learning_rate : Double, tuning : Double) -> Array[Double]

#
robust_loss

fn robust_loss(data : Array[Double], target : Double) -> Double

#
robust_mahalanobis_2d

fn robust_mahalanobis_2d(data : Array[Array[Double]]) -> Array[Double]

#
robust_min_max_scale

fn robust_min_max_scale(data : Array[Double], lower? : Double, upper? : Double) -> Array[Double]

#
robust_model_agreement

fn robust_model_agreement(models : Array[LinearRegressionResult]) -> Double

#
robust_moving_average

fn robust_moving_average(data : Array[Double], window : Int) -> Array[Double]

#
robust_moving_scale

fn robust_moving_scale(data : Array[Double], window : Int) -> Array[Double]

#
robust_moving_signal_to_noise

fn robust_moving_signal_to_noise(data : Array[Double], window : Int) -> Array[Double]

#
robust_moving_variance

fn robust_moving_variance(data : Array[Double], window : Int) -> Array[Double]

#
robust_online_mean

fn robust_online_mean(data : Array[Double], clip_limit : Double) -> Double

#
robust_online_variance

fn robust_online_variance(data : Array[Double], clip_limit : Double) -> Double

#
robust_partition_by_median

fn robust_partition_by_median(data : Array[Double]) -> Array[Int]

#
robust_percent_change

fn robust_percent_change(data : Array[Double], reference : Array[Double]) -> Array[Double]

#
robust_probability_score

fn robust_probability_score(data : Array[Double], value : Double) -> Double

#
robust_projection

fn robust_projection(data : Array[Array[Double]], direction : Array[Double]) -> Array[Double]

#
robust_range_quality

fn robust_range_quality(data : Array[Double]) -> Double

#
robust_rank_agreement

fn robust_rank_agreement(first : Array[Double], second : Array[Double]) -> Double

#
robust_regression_weights

fn robust_regression_weights(model : LinearRegressionResult, tuning : Double) -> Array[Double]

#
robust_residuals

fn robust_residuals(data : Array[Double], window : Int) -> Array[Double]

#
robust_return_center

fn robust_return_center(data : Array[Double]) -> Double

#
robust_return_scale

fn robust_return_scale(data : Array[Double]) -> Double

#
robust_risk_summary

fn robust_risk_summary(data : Array[Double]) -> Array[Double]

#
robust_scale

fn robust_scale(data : Array[Double]) -> Double

#
robust_scale_from_iqr

fn robust_scale_from_iqr(data : Array[Double]) -> Double

#
robust_scale_from_qn

fn robust_scale_from_qn(data : Array[Double]) -> Double

#
robust_scale_objective

fn robust_scale_objective(data : Array[Double], scale : Double) -> Double

#
robust_scales

fn robust_scales(data : Array[Array[Double]]) -> Array[Double]

#
robust_sharpe_ratio

fn robust_sharpe_ratio(data : Array[Double], risk_free? : Double) -> Double

#
robust_signal_quality

fn robust_signal_quality(data : Array[Double]) -> Double

#
robust_smooth

fn robust_smooth(data : Array[Double], window : Int) -> Array[Double]

#
robust_sortino_ratio

fn robust_sortino_ratio(data : Array[Double], target? : Double) -> Double

#
robust_standardize

fn robust_standardize(data : Array[Double]) -> Array[Double]

#
robust_stress_score

fn robust_stress_score(baseline : Array[Double], stressed : Array[Double]) -> Double

#
robust_summary_score

fn robust_summary_score(data : Array[Double]) -> Double

#
robust_tail_ratio

fn robust_tail_ratio(data : Array[Double], probability : Double) -> Double

#
robust_total_variation

fn robust_total_variation(data : Array[Double]) -> Double

#
robust_z_score

fn robust_z_score(value : Double, center : Double, scale : Double) -> Double

#
robust_z_scores

fn robust_z_scores(data : Array[Double]) -> Array[Double]

#
roc_points

fn roc_points(scores : Array[Double], actual : Array[Bool], thresholds : Array[Double]) -> Array[Array[Double]]

#
rolling_correlation

fn rolling_correlation(x : Array[Double], y : Array[Double], window : Int) -> Array[Double]

#
rolling_covariance

fn rolling_covariance(x : Array[Double], y : Array[Double], window : Int) -> Array[Double]

#
rolling_forecast_errors

fn rolling_forecast_errors(data : Array[Double], window : Int) -> Array[Double]

#
rolling_hampel_scores

fn rolling_hampel_scores(data : Array[Double], window : Int) -> Array[Double]

#
rolling_huber_location

fn rolling_huber_location(data : Array[Double], window : Int) -> Array[Double]

#
rolling_iqr

fn rolling_iqr(data : Array[Double], window : Int) -> Array[Double]

#
rolling_mad

fn rolling_mad(data : Array[Double], window : Int) -> Array[Double]

#
rolling_mad_residuals

fn rolling_mad_residuals(data : Array[Double], window : Int) -> Array[Double]

#
rolling_max

fn rolling_max(data : Array[Double], window : Int) -> Array[Double]

#
rolling_mean

fn rolling_mean(data : Array[Double], window : Int) -> Array[Double]

#
rolling_mean_absolute_error

fn rolling_mean_absolute_error(actual : Array[Double], predicted : Array[Double], window : Int) -> Array[Double]

#
rolling_median

fn rolling_median(data : Array[Double], window : Int) -> Array[Double]

#
rolling_median_residuals

fn rolling_median_residuals(data : Array[Double], window : Int) -> Array[Double]

#
rolling_min

fn rolling_min(data : Array[Double], window : Int) -> Array[Double]

#
rolling_outlier_flags

fn rolling_outlier_flags(data : Array[Double], window : Int, threshold? : Double) -> Array[Bool]

#
rolling_quantile

fn rolling_quantile(data : Array[Double], window : Int, probability : Double) -> Array[Double]

#
rolling_quantile_band

fn rolling_quantile_band(data : Array[Double], window : Int, probability : Double) -> Array[Array[Double]]

#
rolling_quantile_violations

fn rolling_quantile_violations(data : Array[Double], window : Int, probability : Double) -> Array[Int]

#
rolling_range

fn rolling_range(data : Array[Double], window : Int) -> Array[Double]

#
rolling_trimmed_mean

fn rolling_trimmed_mean(data : Array[Double], window : Int, trim_percent : Double) -> Array[Double]

#
rolling_winsorized_mean

fn rolling_winsorized_mean(data : Array[Double], window : Int, trim_percent : Double) -> Array[Double]

#
rolling_z_scores

fn rolling_z_scores(data : Array[Double], window : Int) -> Array[Double]

#
root_mean_square

fn root_mean_square(data : Array[Double]) -> Double

#
root_mean_squared_error

fn root_mean_squared_error(actual : Array[Double], predicted : Array[Double]) -> Double

#
running_maximum

fn running_maximum(data : Array[Double]) -> Array[Double]

#
running_minimum

fn running_minimum(data : Array[Double]) -> Array[Double]

#
running_range

fn running_range(data : Array[Double]) -> Array[Double]

#
sample_stddev

fn sample_stddev(data : Array[Double]) -> Double

#
sample_variance

fn sample_variance(data : Array[Double]) -> Double

#
scale_by_mad

fn scale_by_mad(data : Array[Double]) -> Array[Double]

#
scale_ensemble

fn scale_ensemble(data : Array[Double]) -> Double

fn scale_grid_search(data : Array[Double], lower : Double, upper : Double, steps : Int) -> Double

#
seasonal_medians

fn seasonal_medians(data : Array[Double], period : Int) -> Array[Double]

#
seasonal_outlier_indices

fn seasonal_outlier_indices(data : Array[Double], period : Int, threshold? : Double) -> Array[Int]

#
second_difference

fn second_difference(data : Array[Double]) -> Array[Double]

#
segment_bounds

fn segment_bounds(length : Int, segments : Int) -> Array[Array[Int]]

#
segment_mads

fn segment_mads(data : Array[Double], segments : Int) -> Array[Double]

#
segment_means

fn segment_means(data : Array[Double], segments : Int) -> Array[Double]

#
segment_medians

fn segment_medians(data : Array[Double], segments : Int) -> Array[Double]

#
segment_outlier_counts

fn segment_outlier_counts(data : Array[Double], segments : Int, threshold? : Double) -> Array[Int]

#
segment_quality_scores

fn segment_quality_scores(data : Array[Double], segments : Int) -> Array[Double]

#
segment_trimmed_means

fn segment_trimmed_means(data : Array[Double], segments : Int, trim_percent : Double) -> Array[Double]

#
segment_values

fn segment_values(data : Array[Double], segments : Int) -> Array[Array[Double]]

#
shorth_location

fn shorth_location(data : Array[Double], fraction? : Double) -> Double

#
sign_change_count

fn sign_change_count(data : Array[Double]) -> Int

#
signed_log_scale

fn signed_log_scale(data : Array[Double]) -> Array[Double]

#
skewness

fn skewness(data : Array[Double]) -> Double

#
soft_clip

fn soft_clip(data : Array[Double], center : Double, scale : Double, threshold : Double) -> Array[Double]

#
spearman_correlation

fn spearman_correlation(x : Array[Double], y : Array[Double]) -> Double

#
specificity

fn specificity(matrix : ConfusionMatrix) -> Double

#
split_by_median

fn split_by_median(data : Array[Double]) -> Array[Array[Double]]

#
split_by_threshold

fn split_by_threshold(data : Array[Double], threshold : Double) -> Array[Array[Double]]

#
stable_against_single_outlier

fn stable_against_single_outlier(data : Array[Double], outlier : Double) -> Double

#
standardize

fn standardize(data : Array[Double]) -> Array[Double]

#
standardize_columns

fn standardize_columns(data : Array[Array[Double]]) -> Array[Array[Double]]

#
sum_absolute

fn sum_absolute(data : Array[Double]) -> Double

#
sum_squared

fn sum_squared(data : Array[Double]) -> Double

#
summarize

fn summarize(data : Array[Double], outlier_threshold? : Double) -> DatasetSummary

#
summarize_outliers

fn summarize_outliers(data : Array[Double], threshold? : Double) -> OutlierReport

#
summary_json_fields

fn summary_json_fields(summary : DatasetSummary) -> Array[String]

#
summary_to_json

fn summary_to_json(summary : DatasetSummary) -> String

#
summary_to_lines

fn summary_to_lines(summary : DatasetSummary) -> Array[String]

#
summary_to_string

fn summary_to_string(summary : DatasetSummary) -> String

#
tail_count

fn tail_count(data : Array[Double], threshold : Double, upper? : Bool) -> Int

#
tail_event_indices

fn tail_event_indices(data : Array[Double], probability : Double, lower? : Bool) -> Array[Int]

#
tail_fraction

fn tail_fraction(data : Array[Double], threshold : Double, upper? : Bool) -> Double

#
tail_probability_score

fn tail_probability_score(data : Array[Double], value : Double) -> Double

#
theil_sen_regression

fn theil_sen_regression(x : Array[Double], y : Array[Double]) -> LinearRegressionResult

#
theil_sen_slope

fn theil_sen_slope(x : Array[Double], y : Array[Double]) -> Double

#
threshold_metrics

fn threshold_metrics(scores : Array[Double], actual : Array[Bool], threshold : Double) -> Array[Double]

#
threshold_sweep

fn threshold_sweep(scores : Array[Double], actual : Array[Bool], thresholds : Array[Double]) -> Array[Array[Double]]

#
top_anomaly_indices

fn top_anomaly_indices(scores : Array[Double], count : Int) -> Array[Int]

#
total_variation

fn total_variation(data : Array[Double]) -> Double

#
trimean

fn trimean(data : Array[Double]) -> Double

#
trimmed_ensemble

fn trimmed_ensemble(data : Array[Double], trim_percent : Double) -> Double

#
trimmed_location_scale

fn trimmed_location_scale(data : Array[Double], trim_percent : Double) -> LocationScaleEstimate

#
trimmed_mean

fn trimmed_mean(data : Array[Double], trim_percent : Double) -> Double

#
trimmed_sum

fn trimmed_sum(data : Array[Double], trim_percent : Double) -> Double

#
tukey_bisquare_location

fn tukey_bisquare_location(data : Array[Double], tuning? : Double, max_iter? : Int, tol? : Double) -> LocationScaleEstimate

#
tukey_bisquare_weight

fn tukey_bisquare_weight(residual : Double, tuning : Double) -> Double

#
tukey_objective

fn tukey_objective(data : Array[Double], location : Double, tuning : Double) -> Double

#
unique_value_count

fn unique_value_count(data : Array[Double]) -> Int

#
upper_conditional_value_at_risk

fn upper_conditional_value_at_risk(data : Array[Double], probability : Double) -> Double

#
upper_partial_moment

fn upper_partial_moment(data : Array[Double], order : Int, threshold : Double) -> Double

#
upper_quartile

fn upper_quartile(data : Array[Double]) -> Double

#
upper_tail_mean

fn upper_tail_mean(data : Array[Double], probability : Double) -> Double

#
upside_deviation

fn upside_deviation(data : Array[Double], target : Double) -> Double

#
validate_bootstrap_configuration

fn validate_bootstrap_configuration(data : Array[Double], replicates : Int, sample_size : Int) -> Bool

#
validate_cluster_configuration

fn validate_cluster_configuration(cluster_count : Int, max_iter : Int, tol : Double) -> Bool

#
validate_confidence_value

fn validate_confidence_value(confidence : Double) -> Bool

#
validate_count

fn validate_count(value : Int) -> Bool

#
validate_detector_configuration

fn validate_detector_configuration(window : Int, threshold : Double) -> Bool

#
validate_finite_range

fn validate_finite_range(data : Array[Double], lower : Double, upper : Double) -> Bool

#
validate_matrix

fn validate_matrix(matrix : Array[Array[Double]]) -> Bool

#
validate_monotone_grid

fn validate_monotone_grid(values : Array[Double]) -> Bool

#
validate_no_empty_rows

fn validate_no_empty_rows(matrix : Array[Array[Double]]) -> Bool

#
validate_non_empty

fn validate_non_empty(data : Array[Double]) -> Bool

#
validate_non_negative

fn validate_non_negative(value : Double) -> Bool

#
validate_positive

fn validate_positive(value : Double) -> Bool

#
validate_probability_grid

fn validate_probability_grid(probabilities : Array[Double]) -> Bool

#
validate_probability_value

fn validate_probability_value(probability : Double) -> Bool

#
validate_regression_inputs

fn validate_regression_inputs(x : Array[Double], y : Array[Double]) -> Bool

#
validate_same_length

fn validate_same_length(first : Array[Double], second : Array[Double]) -> Bool

#
validate_sorted

fn validate_sorted(data : Array[Double]) -> Bool

#
validate_square_matrix

fn validate_square_matrix(matrix : Array[Array[Double]]) -> Bool

#
validate_stream_configuration

fn validate_stream_configuration(capacity : Int, clip : Double) -> Bool

#
validate_trim_percent_value

fn validate_trim_percent_value(trim_percent : Double) -> Bool

#
validate_weights

fn validate_weights(weights : Array[Double]) -> Bool

#
validate_window

fn validate_window(window : Int, data_length : Int) -> Bool

#
validation_report

fn validation_report(data : Array[Double]) -> Array[Double]

#
validation_score

fn validation_score(data : Array[Double]) -> Double

#
value_at_risk

fn value_at_risk(data : Array[Double], probability : Double) -> Double

#
value_frequency

fn value_frequency(data : Array[Double], value : Double) -> Int

#
value_frequency_fraction

fn value_frequency_fraction(data : Array[Double], value : Double) -> Double

#
weighted_iqr

fn weighted_iqr(data : Array[Double], weights : Array[Double]) -> Double

#
weighted_linear_regression

fn weighted_linear_regression(x : Array[Double], y : Array[Double], weights : Array[Double]) -> LinearRegressionResult

#
weighted_lower_quartile

fn weighted_lower_quartile(data : Array[Double], weights : Array[Double]) -> Double

#
weighted_mean

fn weighted_mean(data : Array[Double], weights : Array[Double]) -> Double

#
weighted_median

fn weighted_median(data : Array[Double], weights : Array[Double]) -> Double

#
weighted_quantile

fn weighted_quantile(data : Array[Double], weights : Array[Double], probability : Double) -> Double

#
weighted_upper_quartile

fn weighted_upper_quartile(data : Array[Double], weights : Array[Double]) -> Double

#
weighted_variance

fn weighted_variance(data : Array[Double], weights : Array[Double], sample? : Bool) -> Double

#
winsorize

fn winsorize(data : Array[Double], trim_percent : Double) -> Array[Double]

#
winsorize_by_z

fn winsorize_by_z(data : Array[Double], threshold : Double) -> Array[Double]

#
winsorized_filter

fn winsorized_filter(data : Array[Double], window : Int, trim_percent : Double) -> Array[Double]

#
winsorized_location_scale

fn winsorized_location_scale(data : Array[Double], trim_percent : Double) -> LocationScaleEstimate

#
winsorized_mean

fn winsorized_mean(data : Array[Double], trim_percent : Double) -> Double

#
winsorized_residuals

fn winsorized_residuals(data : Array[Double], trim_percent : Double) -> Array[Double]

#
winsorized_standardize

fn winsorized_standardize(data : Array[Double], trim_percent : Double) -> Array[Double]

#
winsorized_sum

fn winsorized_sum(data : Array[Double], trim_percent : Double) -> Double

#
winsorized_summary

fn winsorized_summary(data : Array[Double], trim_percent : Double) -> DatasetSummary

#
z_scores

fn z_scores(data : Array[Double]) -> Array[Double]

#
zero_fraction

fn zero_fraction(data : Array[Double]) -> Double