All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.cmu.tetrad.algcomparison.statistic.ElapsedCpuTime Maven / Gradle / Ivy

There is a newer version: 7.6.4
Show newest version
package edu.cmu.tetrad.algcomparison.statistic;

import edu.cmu.tetrad.data.DataModel;
import edu.cmu.tetrad.graph.Graph;
import org.apache.commons.math3.util.FastMath;

/**
 * Records the elapsed time of the algorithm in seconds. This is a placeholder, really; the elapsed time is calculated
 * by the comparison class and recorded if this statistic is used.
 *
 * @author josephramsey
 */
public class ElapsedCpuTime implements Statistic {
    private static final long serialVersionUID = 23L;

    @Override
    public String getAbbreviation() {
        return "E-CPU";
    }

    @Override
    public String getDescription() {
        return "Elapsed CPU Time in Seconds";
    }

    @Override
    public double getValue(Graph trueGraph, Graph estGraph, DataModel dataModel) {
        return Double.NaN; // This has to be handled separately.
    }

    @Override
    public double getNormValue(double value) {
        return 1 - FastMath.tanh(0.001 * value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy