本文整理汇总了C++中Samples::computeR2方法的典型用法代码示例。如果您正苦于以下问题:C++ Samples::computeR2方法的具体用法?C++ Samples::computeR2怎么用?C++ Samples::computeR2使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Samples
的用法示例。
在下文中一共展示了Samples::computeR2方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: exception
//.........这里部分代码省略.........
throw exception("couldn't fit %s @level-%d", *(r.name), level );
}
}
if(true)
{
tao::ld(used,false);
gvars.on(used,"ve");
++level;
std::cerr << "starting level " << level << " with: " << std::endl;
gvars.display(std::cerr,aorg);
if( !ls.fit( sample, F, aorg, aerr, used) )
{
throw exception("couldn't fit %s @level-%d", *(r.name), level );
}
}
if(true)
{
tao::ld(used,false);
gvars.on(used,"p:q");
++level;
std::cerr << "starting level " << level << " with: " << std::endl;
gvars.display(std::cerr,aorg);
if( !ls.fit( sample, F, aorg, aerr, used) )
{
throw exception("couldn't fit %s @level-%d", *(r.name), level );
}
//ls.verbose = false;
}
gvars.display(std::cerr, aorg, aerr, "\t");
std::cerr << "\tR2=" << sample.computeR2() << std::endl;
for(size_t j=1;j<=sample.count();++j)
{
fp("%g %g %gn\n", sample.X[j], -log10(sample.Y[j]), -log10(sample.Yf[j]));
}
fp << '\n';
C.push_back( r.conc );
P.push_back( gvars(aorg, "p" ) );
Q.push_back( gvars(aorg, "q" ) );
pHi.push_back( gvars(aorg, "vi" ) );
pHe.push_back( gvars(aorg, "ve" ) );
T0.push_back( gvars(aorg, "t0" ) );
}
}
}
std::cerr << "Global R2=" << samples.computeR2() << std::endl;
for(size_t i=1;i<=nrec;++i)
{
std::cerr << C[i] << " " << P[i] << " " << Q[i] << " " << pHi[i] << " " << pHe[i] << " " << T0[i] << std::endl;
}
////////////////////////////////////////////////////////////////////////////
//
// Second pass, linked field
//
////////////////////////////////////////////////////////////////////////////
gvars.free();
//__________________________________________________________________________