MCPcopy Create free account
hub / github.com/TheAlgorithms/Rust / least_square_approx

Function least_square_approx

src/math/least_square_approx.rs:12–56  ·  view source on GitHub ↗

Least Square Approximation Function that returns a polynomial which very closely passes through the given points (in 2D) The result is made of coeficients, in descending order (from x^degree to free term) Parameters: points -> coordinates of given points degree -> degree of the polynomial

(
    points: &[(T, U)],
    degree: i32,
)

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers

nothing calls this directly

Calls 4

round_to_decimalsFunction · 0.85
pushMethod · 0.80
iterMethod · 0.45
solveMethod · 0.45

Tested by

no test coverage detected