changing fn name acc to convention
This commit is contained in:
@@ -25,7 +25,7 @@ namespace math /** Miscellaneous math routines. */ {
|
||||
*
|
||||
* @param x Input value.
|
||||
*/
|
||||
inline double erfinverse(double x)
|
||||
inline double ErfInverse(double x)
|
||||
{
|
||||
double w, p;
|
||||
|
||||
@@ -112,9 +112,9 @@ inline double erfinverse(double x)
|
||||
* @param mu Mean of the distribution. (Default 0)
|
||||
* @param sigma Standard deviation of the distribution. (Default 1)
|
||||
*/
|
||||
inline double quantile(double p, double mu = 0.0, double sigma = 1.0)
|
||||
inline double Quantile(double p, double mu = 0.0, double sigma = 1.0)
|
||||
{
|
||||
return mu + sigma * std::sqrt(2.0) * erfinverse(2 * p - 1);
|
||||
return mu + sigma * std::sqrt(2.0) * ErfInverse(2 * p - 1);
|
||||
}
|
||||
|
||||
} // namespace math
|
||||
|
||||
@@ -477,7 +477,7 @@ double CosineTree::MonteCarloError(CosineTree* node,
|
||||
|
||||
// Fit a normal distribution using the calculated statistics, and calculate a
|
||||
// lower bound on the magnitudes for the passed 'delta' parameter.
|
||||
double lowerBound = math::quantile(delta, mu, sigma);
|
||||
double lowerBound = math::Quantile(delta, mu, sigma);
|
||||
|
||||
// Upper bound on the subspace reconstruction error.
|
||||
node->L2Error(node->FrobNormSquared() - lowerBound);
|
||||
|
||||
@@ -191,7 +191,7 @@ Score(const size_t queryIndex, TreeType& referenceNode)
|
||||
// Monte Carlo probabilistic estimation.
|
||||
// Calculate z using accumulated alpha if possible.
|
||||
const double alpha = depthAlpha + accumMCAlpha(queryIndex);
|
||||
const double z = std::abs(math::quantile(alpha / 2.0));
|
||||
const double z = std::abs(math::Quantile(alpha / 2.0));
|
||||
|
||||
// Auxiliary variables.
|
||||
arma::vec sample;
|
||||
@@ -398,7 +398,7 @@ Score(TreeType& queryNode, TreeType& referenceNode)
|
||||
// Monte Carlo probabilistic estimation.
|
||||
// Calculate z using accumulated alpha if possible.
|
||||
const double alpha = depthAlpha + queryStat.AccumAlpha();
|
||||
const double z = std::abs(math::quantile(alpha / 2));
|
||||
const double z = std::abs(math::Quantile(alpha / 2));
|
||||
|
||||
// Auxiliary variables.
|
||||
arma::vec sample;
|
||||
|
||||
Reference in New Issue
Block a user