Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/moses-smt/vowpal_wabbit.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorariel faigon <github.2009@yendor.com>2014-08-24 00:58:02 +0400
committerariel faigon <github.2009@yendor.com>2014-08-24 00:58:02 +0400
commit22bc163c9477d3fe66c15f49692139ab9e028c54 (patch)
treefca3d272fd410b06829d1cb064320afe08e29a60
parent6fbcc37474a3a2bcc5c47701c95c6e8302793139 (diff)
Better name for function (glf1).
-rw-r--r--vowpalwabbit/scorer.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/vowpalwabbit/scorer.cc b/vowpalwabbit/scorer.cc
index ea327895..507c60c1 100644
--- a/vowpalwabbit/scorer.cc
+++ b/vowpalwabbit/scorer.cc
@@ -34,8 +34,9 @@ namespace Scorer {
// http://en.wikipedia.org/wiki/Generalized_logistic_curve
// where the lower & upper asymptotes are -1 & 1 respectively
- // y = f(x) -> [-1, 1]
- float glc1(float in)
+ // 'glf1' stands for 'Generalized Logistic Function with [-1,1] range'
+ // y = f(x) -> [-1, 1]
+ float glf1(float in)
{
return 2.f / (1.f + exp(- in)) - 1.f;
}
@@ -53,7 +54,7 @@ namespace Scorer {
po::options_description link_opts("Link options");
link_opts.add_options()
- ("link", po::value<string>()->default_value("identity"), "Specify the link function: identity, logistic or glc1");
+ ("link", po::value<string>()->default_value("identity"), "Specify the link function: identity, logistic or glf1");
vm = add_options(all, link_opts);
@@ -71,11 +72,11 @@ namespace Scorer {
l->set_learn<scorer, predict_or_learn<true, logistic> >();
l->set_predict<scorer, predict_or_learn<false, logistic> >();
}
- else if (link.compare("glc1") == 0)
+ else if (link.compare("glf1") == 0)
{
- all.file_options.append(" --link=glc1 ");
- l->set_learn<scorer, predict_or_learn<true, glc1> >();
- l->set_predict<scorer, predict_or_learn<false, glc1> >();
+ all.file_options.append(" --link=glf1 ");
+ l->set_learn<scorer, predict_or_learn<true, glf1> >();
+ l->set_predict<scorer, predict_or_learn<false, glf1> >();
}
else
{