Example usage for org.apache.commons.math3.analysis.function Log10 value

List of usage examples for org.apache.commons.math3.analysis.function Log10 value

Introduction

In this page you can find the example usage for org.apache.commons.math3.analysis.function Log10 value.

Prototype

public DerivativeStructure value(final DerivativeStructure t) 

Source Link

Usage

From source file:calculators.Calculator.java

/**
 * Calculates the pvalue./*from w  ww .j  a  v  a 2s.  c  o m*/
 *
 * @param control the control group intensities
 * @param target the target group intensities
 * @return
 */
private Double calculatePvalue(final double[] control, final double[] target) {
    TTest t_test = new TTest();
    Log10 logTen = new Log10();
    return -logTen.value(t_test.tTest(target, control));
}

From source file:org.grouplens.samantha.modeler.featurizer.SelfPlusOneRatioExtractor.java

public Map<String, List<Feature>> extract(JsonNode entity, boolean update, IndexSpace indexSpace) {
    Map<String, List<Feature>> feaMap = new HashMap<>();
    if (entity.has(attrName)) {
        SelfPlusOneRatioFunction ratio = new SelfPlusOneRatioFunction();
        List<Feature> feaList = new ArrayList<>();
        double val = entity.get(attrName).asDouble();
        if (!sparse || val != 0.0) {
            if (log) {
                Log10 log10 = new Log10();
                val = log10.value(val + 1.0);
            }//w w  w . j  ava  2s  .c  o m
            FeatureExtractorUtilities.getOrSetIndexSpaceToFeaturize(feaList, update, indexSpace, indexName,
                    attrName, ratio.value(val));
            feaMap.put(feaName, feaList);
        }
    }
    return feaMap;
}