20#ifndef TMVA_TREEINFERENCE_OBJECTIVES
21#define TMVA_TREEINFERENCE_OBJECTIVES
29namespace Experimental {
36 return 1.0 / (1.0 +
std::exp(-1.0 * value));
60 if (
name.compare(
"identity") == 0)
61 return std::function<T(T)>(Identity<T>);
62 else if (
name.compare(
"logistic") == 0)
63 return std::function<T(T)>(Logistic<T>);
64 else if (
name.compare(
"softmax") == 0)
65 return std::function<T(T)>(Exponential<T>);
67 throw std::runtime_error(
"Objective function with name \"" +
name +
"\" is not implemented.");
void function(const Char_t *name_, T fun, const Char_t *docstring=0)
T Identity(T value)
Identity function f(x) = x.
T Exponential(T value)
Natural exponential function f(x) = exp(x)
std::function< T(T)> GetFunction(const std::string &name)
Get function pointer to implementation from name given as string.
T Logistic(T value)
Logistic function f(x) = 1 / (1 + exp(-x))
create variable transformations