Java Code Examples for biz.k11i.xgboost.learner.ObjFunction#useFastMathExp()

The following examples show how to use biz.k11i.xgboost.learner.ObjFunction#useFastMathExp() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: GBPredictorTestBase.java    From xgboost-predictor-java with Apache License 2.0 5 votes vote down vote up
@Theory
public void testPredict(
        TestParameter parameter,
        PredictorConfiguration configuration,
        boolean useJafama) throws IOException {

    ObjFunction.useFastMathExp(useJafama);

    verify(
            parameter.predictionModel(configuration),
            parameter.testData(),
            parameter.expectation(),
            parameter.task);
}
 
Example 2
Source File: XGBoostEvidenceFilter.java    From gatk with BSD 3-Clause "New" or "Revised" License 5 votes vote down vote up
public static Predictor loadPredictor(final String modelFileLocation) {
    ObjFunction.useFastMathExp(USE_FAST_MATH_EXP);
    try(final InputStream inputStream = modelFileLocation == null ?
            resourcePathToInputStream(DEFAULT_PREDICTOR_RESOURCE_PATH) : BucketUtils.openFile(modelFileLocation)) {
        return new Predictor(inputStream);
    } catch(Exception e) {
        throw new GATKException(
                "Unable to load predictor from classifier file "
                        + (modelFileLocation == null ? DEFAULT_PREDICTOR_RESOURCE_PATH : modelFileLocation)
                        + ": " + e.getMessage()
        );
    }
}
 
Example 3
Source File: DartPredictorTest.java    From xgboost-predictor-java with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() {
    ObjFunction.useFastMathExp(false);
}
 
Example 4
Source File: GBLinearPredictorTest.java    From xgboost-predictor-java with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() {
    ObjFunction.useFastMathExp(false);
}
 
Example 5
Source File: GBTreePredictorTest.java    From xgboost-predictor-java with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() {
    ObjFunction.useFastMathExp(false);
}
 
Example 6
Source File: GBPredictorTestBase.java    From xgboost-predictor-java with Apache License 2.0 4 votes vote down vote up
@After
public void tearDown() {
    ObjFunction.useFastMathExp(false);
}