MMedianRove
Product

Product features · Unscaled median absolute deviation

01

Use median_deviation.py to distinguish a robust unscaled spread estimate from variance or a normal-distribution correction.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Unscaled median absolute deviation

● ● ●MedianRove●
A concrete starting point · Unscaled median absolute deviation ×
import math

def median_deviation(values):
    if type(values) is not list or not 1 <= len(values) <= 4096:
        raise ValueError("mad.input")
    if any(type(x) not in (int, float) or not -10**100 <= x <= 10**100 or not math.isfinite(x) for x in values):
        raise ValueError("mad.value")
    def median(items):
        ordered = sorted(items)
        n = len(ordered)
        return float(ordered[n//2]) if n % 2 else ordered[n//2-1]/2+ordered[n//2]/2
    center = median(values)
    return center, median([abs(x-center) for x in values])
✳Unscaled median absolute deviation
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗