SmoothMethod
Mojo struct 🡭
SmoothMethod
@memory_only
struct SmoothMethodWhich curve Plot.annotate_smooth() fits (#147).
SmoothMethod.LOESS– locally weighted regression: at each point along x, a polynomial fitted to the nearestspanshare of the data, weighted so the nearest count most. It follows whatever shape the data has, which is what makes it the default trend line for exploring data.SmoothMethod.POLYNOMIAL– one least-squares polynomial of a given degree over all the data: a single formula, for when the shape is known to be, say, quadratic.
Aliases
LOESS = SmoothMethod(Int(0))POLYNOMIAL = SmoothMethod(Int(1))
Implemented traits
AnyType, Copyable, Deinitable, ImplicitlyCopyable, Movable
Methods
__init__
fn def __init__(out self, value: Int)Args:
- value (
Int) - self (
Self)
Returns:
Self
__eq__
fn def __eq__(self, other: Self) -> BoolArgs:
- self (
Self) - other (
Self)
Returns:
Bool