Table of Contents

Struct PolyfitResult

Namespace
NumSharp
Assembly
NumSharp.dll

The polymorphic return of polyfit(NDArray, NDArray, int, double?, bool, NDArray, object). Converts implicitly to the coefficient array (the bare-return case); deconstructs to NumPy's full five-tuple (coeffs, residuals, rank, singular_values, rcond) or the cov two-tuple (coeffs, covariance).

public readonly struct PolyfitResult : INDArrayCarrier
Implements
Inherited Members

Fields

coeffs

Polynomial coefficients, highest power first — (deg+1,) or (deg+1, K).

public readonly NDArray coeffs

Field Value

NDArray

covariance

The covariance matrix — null unless cov was requested.

public readonly NDArray covariance

Field Value

NDArray

rank

Effective rank of the scaled Vandermonde matrix.

public readonly NDArray rank

Field Value

NDArray

rcond

The rcond value used.

public readonly double rcond

Field Value

double

residuals

Sum of squared residuals of the least-squares fit (empty unless full-rank overdetermined).

public readonly NDArray residuals

Field Value

NDArray

singular_values

Singular values of the scaled Vandermonde matrix.

public readonly NDArray singular_values

Field Value

NDArray

Methods

Deconstruct(out NDArray, out NDArray)

NumPy's cov=True return: (coeffs, covariance).

public void Deconstruct(out NDArray coeffs, out NDArray covariance)

Parameters

coeffs NDArray
covariance NDArray

Deconstruct(out NDArray, out NDArray, out NDArray, out NDArray, out double)

NumPy's full=True return: (coeffs, residuals, rank, singular_values, rcond).

public void Deconstruct(out NDArray coeffs, out NDArray residuals, out NDArray rank, out NDArray singularValues, out double rcond)

Parameters

coeffs NDArray
residuals NDArray
rank NDArray
singularValues NDArray
rcond double

Operators

implicit operator NDArray(PolyfitResult)

The bare return: the coefficient array.

public static implicit operator NDArray(PolyfitResult r)

Parameters

r PolyfitResult

Returns

NDArray