Package biz.k11i.xgboost.learner
Class ObjFunction
- java.lang.Object
-
- biz.k11i.xgboost.learner.ObjFunction
-
- All Implemented Interfaces:
Serializable
public class ObjFunction extends Object implements Serializable
Objective function implementations.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ObjFunction()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static ObjFunction
fromName(String name)
GetsObjFunction
from given name.float
predTransform(float pred)
Transforms a prediction value.float[]
predTransform(float[] preds)
Transforms prediction values.static void
register(String name, ObjFunction objFunction)
Deprecated.This method will be made private.static void
useFastMathExp(boolean useJafama)
Uses Jafama'sFastMath.exp(double)
instead ofMath.exp(double)
.
-
-
-
Method Detail
-
fromName
public static ObjFunction fromName(String name)
GetsObjFunction
from given name.- Parameters:
name
- name of objective function- Returns:
- objective function
-
register
public static void register(String name, ObjFunction objFunction)
Deprecated.This method will be made private. Please usePredictorConfiguration.Builder.objFunction(ObjFunction)
instead.Register anObjFunction
for a given name.- Parameters:
name
- name of objective functionobjFunction
- objective function
-
useFastMathExp
public static void useFastMathExp(boolean useJafama)
Uses Jafama'sFastMath.exp(double)
instead ofMath.exp(double)
.- Parameters:
useJafama
-true
if you want to use Jafama'sFastMath.exp(double)
, orfalse
if you don't want to use it but JDK'sMath.exp(double)
.
-
predTransform
public float[] predTransform(float[] preds)
Transforms prediction values.- Parameters:
preds
- prediction- Returns:
- transformed values
-
predTransform
public float predTransform(float pred)
Transforms a prediction value.- Parameters:
pred
- prediction- Returns:
- transformed value
-
-