Skip to content

Commit f8763ca

Browse files
committed
FindMinimum.OfFunction and Fit.Curve adapt docs #760
1 parent 412d8d2 commit f8763ca

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

src/Numerics/Fit.cs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -364,16 +364,16 @@ public static Tuple<double, double, double> Curve(double[] x, double[] y, Func<d
364364

365365
/// <summary>
366366
/// Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, p3, x),
367-
/// returning its best fitting parameter p0, p1 and p2.
367+
/// returning its best fitting parameter p0, p1, p2 and p3.
368368
/// </summary>
369369
public static Tuple<double, double, double, double> Curve(double[] x, double[] y, Func<double, double, double, double, double, double> f, double initialGuess0, double initialGuess1, double initialGuess2, double initialGuess3, double tolerance = 1e-8, int maxIterations = 1000)
370370
{
371371
return FindMinimum.OfFunction((p0, p1, p2, p3) => Distance.Euclidean(Generate.Map(x, t => f(p0, p1, p2, p3, t)), y), initialGuess0, initialGuess1, initialGuess2, initialGuess3, tolerance, maxIterations);
372372
}
373373

374374
/// <summary>
375-
/// Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, p3, x),
376-
/// returning its best fitting parameter p0, p1 and p2.
375+
/// Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, p3, p4, x),
376+
/// returning its best fitting parameter p0, p1, p2, p3 and p4.
377377
/// </summary>
378378
public static Tuple<double, double, double, double, double> Curve(double[] x, double[] y, Func<double, double, double, double, double, double, double> f, double initialGuess0, double initialGuess1, double initialGuess2, double initialGuess3, double initialGuess4, double tolerance = 1e-8, int maxIterations = 1000)
379379
{
@@ -411,7 +411,7 @@ public static Func<double, double> CurveFunc(double[] x, double[] y, Func<double
411411
}
412412

413413
/// <summary>
414-
/// Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, x),
414+
/// Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, p3, x),
415415
/// returning a function y' for the best fitting curve.
416416
/// </summary>
417417
public static Func<double, double> CurveFunc(double[] x, double[] y, Func<double, double, double, double, double, double> f, double initialGuess0, double initialGuess1, double initialGuess2, double initialGuess3, double tolerance = 1e-8, int maxIterations = 1000)
@@ -421,7 +421,7 @@ public static Func<double, double> CurveFunc(double[] x, double[] y, Func<double
421421
}
422422

423423
/// <summary>
424-
/// Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, x),
424+
/// Non-linear least-squares fitting the points (x,y) to an arbitrary function y : x -> f(p0, p1, p2, p3, p4, x),
425425
/// returning a function y' for the best fitting curve.
426426
/// </summary>
427427
public static Func<double, double> CurveFunc(double[] x, double[] y, Func<double, double, double, double, double, double, double> f, double initialGuess0, double initialGuess1, double initialGuess2, double initialGuess3, double initialGuess4, double tolerance = 1e-8, int maxIterations = 1000)

0 commit comments

Comments
 (0)