29 double upp[5] = { 10, 10, 10, 10, 1 };
30 double low[5] = { 0, 0, 0, 0, .1 };
31 for (
int i = 0; i < 4; i++)
120 int nc =
fit->GetNCoefficients();
121 int nv =
fit->GetNVariables();
123 const int *
pindex =
fit->GetPowerIndex();
124 if (nc != 21)
return 1;
127 for (
int i=0;i<nc;i++) {
134 for (
int j=0;
j<
nv;
j++) {
141 gROOT->ProcessLine(
".L MDF.C");
143 double refMDF = (doFit) ? 43.95 : 43.98;
148 std::intptr_t
iret =
gROOT->ProcessLine(
" double xvalues[] = {5,5,5,5}; double result=MDF(xvalues); &result;");
159 std::cout <<
"*************************************************" << std::endl;
160 std::cout <<
"* Multidimensional Fit *" << std::endl;
161 std::cout <<
"* *" << std::endl;
162 std::cout <<
"* By Christian Holm <cholm@nbi.dk> 14/10/00 *" << std::endl;
163 std::cout <<
"*************************************************" << std::endl;
164 std::cout << std::endl;
180 int mPowers[] = { 6 , 6, 6, 6 };
182 fit->SetMaxFunctions(1000);
183 fit->SetMaxStudy(1000);
184 fit->SetMaxTerms(30);
185 fit->SetPowerLimit(1);
186 fit->SetMinAngle(10);
187 fit->SetMaxAngle(10);
188 fit->SetMinRelativeError(.01);
197 printf(
"======================================\n");
201 for (i = 0; i < nData ; i++) {
214 fit->MakeHistograms();
217 fit->FindParameterization();
226 for (i = 0; i <
nVars; i++) {
227 xMax[i] = (*
fit->GetMaxVariables())(i);
228 xMin[i] = (*
fit->GetMinVariables())(i);
231 nData =
fit->GetNCoefficients() * 100;
235 for (i = 0; i < nData ; i++) {
270 printf(
"\nmultidimfit .............................................. OK\n");
272 printf(
"\nmultidimfit .............................................. fails case %d\n",compare);
ROOT::Detail::TRangeCast< T, true > TRangeDynCast
TRangeDynCast is an adapter class that allows the typed iteration through a TCollection.
R__EXTERN TRandom * gRandom
A file, usually with extension .root, that stores data and code in the form of serialized objects in ...
Multidimensional Fits in ROOT.
This is the base class for the ROOT Random number generators.
virtual Double_t Gaus(Double_t mean=0, Double_t sigma=1)
Samples a random number from the standard Normal (Gaussian) Distribution with the given mean and sigm...
Double_t Rndm() override
Machine independent random number generator.
fit(model, train_loader, val_loader, num_epochs, batch_size, optimizer, criterion, save_best, scheduler)
Double_t Sqrt(Double_t x)
Returns the square root of x.
Bool_t AreEqualRel(Double_t af, Double_t bf, Double_t relPrec)
Comparing floating points.
Short_t Abs(Short_t d)
Returns the absolute value of parameter Short_t d.