The following example generates 100 random logistic distributed values and then uses LogisticFit routine to extract used m and b parameters:
Uses StatRandom, Statistics, MtxExpr; procecure Example; var Data :Vector; m,b: double; begin Data.Size(100); RandomLogistic(3,0.2,Data); LogisticFit(Data,m,b); // m approx 3.0 // b approx 0.2 end;
#include "StatRandom.hpp" #include "MtxExpr.hpp" #include "Statistics.hpp" void __fastcall Example(); { sVector Data; Data.Size(100,false); RandomLogistic(3,0.2,Data); double m, b; LogisticFit(Data,m,b); // m approx 3.0 // b approx 0.2 }
Copyright (c) 1999-2025 by Dew Research. All rights reserved.
|