nodejs-polars
    Preparing search index...

    Interface Rolling<T>

    A trait for DataFrame and Series that allows for the application of a rolling window.

    interface Rolling<T> {
        rollingMax(
            windowSize: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
        ): T;
        rollingMax(options: RollingOptions): T;
        rollingMean(
            windowSize: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
        ): T;
        rollingMean(options: RollingOptions): T;
        rollingMedian(
            windowSize: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
        ): T;
        rollingMedian(options: RollingOptions): T;
        rollingMin(
            windowSize: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
        ): T;
        rollingMin(options: RollingOptions): T;
        rollingQuantile(
            quantile: number,
            interpolation?: InterpolationMethod,
            windowSize?: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
            by?: string,
            closed?: ClosedWindow,
        ): T;
        rollingQuantile(options: RollingQuantileOptions): T;
        rollingSkew(windowSize: number, bias?: boolean): T;
        rollingSkew(options: RollingSkewOptions): T;
        rollingStd(
            windowSize: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
            ddof?: number,
        ): T;
        rollingStd(options: RollingOptions): T;
        rollingSum(
            windowSize: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
        ): T;
        rollingSum(options: RollingOptions): T;
        rollingVar(
            windowSize: number,
            weights?: number[],
            minPeriods?: number[],
            center?: boolean,
            ddof?: number,
        ): T;
        rollingVar(options: RollingOptions): T;
    }

    Type Parameters

    • T

    Hierarchy (View Summary)

    Index

    Methods - Rolling

    • Apply a rolling max (moving max) over the values in this Series.

      A window of length window_size will traverse the series. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector.

      The resulting parameters' values will be aggregated into their sum.


      Parameters

      • windowSize: number

        The length of the window.

      • Optionalweights: number[]

        An optional slice with the same length as the window that will be multiplied elementwise with the values in the window.

      • OptionalminPeriods: number[]

        The number of values in the window that should be non-null before computing a result. If undefined, it will be set equal to window size.

      • Optionalcenter: boolean

        Set the labels at the center of the window

      Returns T

    • Parameters

      Returns T

    • Apply a rolling mean (moving mean) over the values in this Series.

      A window of length window_size will traverse the series. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector.

      The resulting parameters' values will be aggregated into their sum.


      Parameters

      • windowSize: number

        The length of the window.

      • Optionalweights: number[]

        An optional slice with the same length as the window that will be multiplied elementwise with the values in the window.

      • OptionalminPeriods: number[]

        The number of values in the window that should be non-null before computing a result. If undefined, it will be set equal to window size.

      • Optionalcenter: boolean

        Set the labels at the center of the window

      Returns T

    • Parameters

      Returns T

    • Apply a rolling min (moving min) over the values in this Series.

      A window of length window_size will traverse the series. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector.

      The resulting parameters' values will be aggregated into their sum.


      Parameters

      • windowSize: number

        The length of the window.

      • Optionalweights: number[]

        An optional slice with the same length as the window that will be multiplied elementwise with the values in the window.

      • OptionalminPeriods: number[]

        The number of values in the window that should be non-null before computing a result. If undefined, it will be set equal to window size.

      • Optionalcenter: boolean

        Set the labels at the center of the window

      Returns T

    • Parameters

      Returns T

    • Compute a rolling quantile

      Parameters

      • quantile: number

        quantile to compute

      • Optionalinterpolation: InterpolationMethod

        interpolation type

      • OptionalwindowSize: number

        Size of the rolling window

      • Optionalweights: number[]

        An optional slice with the same length as the window that will be multiplied elementwise with the values in the window.

      • OptionalminPeriods: number[]

        The number of values in the window that should be non-null before computing a result. If undefined, it will be set equal to window size.

      • Optionalcenter: boolean

        Set the labels at the center of the window

      • Optionalby: string
      • Optionalclosed: ClosedWindow

      Returns T

    • Parameters

      Returns T

    • Compute a rolling skew

      Parameters

      • windowSize: number

        Size of the rolling window

      • Optionalbias: boolean

        If false, then the calculations are corrected for statistical bias.

      Returns T

    • Compute a rolling skew

      Parameters

      • options: RollingSkewOptions

        options for rolling mean operations

        • Optionalbias?: boolean
        • windowSize: number

      Returns T

    • Compute a rolling std dev

      A window of length window_size will traverse the array. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector. The resulting values will be aggregated to their sum.


      Parameters

      • windowSize: number

        The length of the window.

      • Optionalweights: number[]

        An optional slice with the same length as the window that will be multiplied elementwise with the values in the window.

      • OptionalminPeriods: number[]

        The number of values in the window that should be non-null before computing a result. If undefined, it will be set equal to window size.

      • Optionalcenter: boolean

        Set the labels at the center of the window

      • Optionalddof: number

        "Delta Degrees of Freedom”: the divisor used in the calculation is N - ddof, where N represents the number of elements. By default ddof is 1.

      Returns T

    • Parameters

      Returns T

    • Apply a rolling sum (moving sum) over the values in this Series.

      A window of length window_size will traverse the series. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector.

      The resulting parameters' values will be aggregated into their sum.


      Parameters

      • windowSize: number

        The length of the window.

      • Optionalweights: number[]

        An optional slice with the same length as the window that will be multiplied elementwise with the values in the window.

      • OptionalminPeriods: number[]

        The number of values in the window that should be non-null before computing a result. If undefined, it will be set equal to window size.

      • Optionalcenter: boolean

        Set the labels at the center of the window

      Returns T

    • Parameters

      Returns T

    • Compute a rolling variance.

      A window of length window_size will traverse the series. The values that fill this window will (optionally) be multiplied with the weights given by the weight vector.

      The resulting parameters' values will be aggregated into their sum.


      Parameters

      • windowSize: number

        The length of the window.

      • Optionalweights: number[]

        An optional slice with the same length as the window that will be multiplied elementwise with the values in the window.

      • OptionalminPeriods: number[]

        The number of values in the window that should be non-null before computing a result. If undefined, it will be set equal to window size.

      • Optionalcenter: boolean

        Set the labels at the center of the window

      • Optionalddof: number

        "Delta Degrees of Freedom”: the divisor used in the calculation is N - ddof, where N represents the number of elements. By default ddof is 1.

      Returns T

    • Parameters

      Returns T