Class ObjFunction
java.lang.Object
biz.k11i.xgboost.learner.ObjFunction
- All Implemented Interfaces:
Serializable
Objective function implementations.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic ObjFunctionGetsObjFunctionfrom given name.floatpredTransform(float pred) Transforms a prediction value.float[]predTransform(float[] preds) Transforms prediction values.floatprobToMargin(float prob) static voidregister(String name, ObjFunction objFunction) Deprecated.This method will be made private.static voiduseFastMathExp(boolean useJafama) Uses Jafama'sFastMath.exp(double)instead ofMath.exp(double).
-
Constructor Details
-
ObjFunction
public ObjFunction()
-
-
Method Details
-
fromName
GetsObjFunctionfrom given name.- Parameters:
name- name of objective function- Returns:
- objective function
-
register
Deprecated.This method will be made private. Please usePredictorConfiguration.Builder.objFunction(ObjFunction)instead.Register anObjFunctionfor 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-trueif you want to use Jafama'sFastMath.exp(double), orfalseif 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
-
probToMargin
public float probToMargin(float prob)
-