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

edu.cmu.tetrad.algcomparison.statistic.NumberOfEdgesTrue 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;

/**
 * Prints the number of edges in the true graph.
 *
 * @author josephramsey
 */
public class NumberOfEdgesTrue implements Statistic {
    private static final long serialVersionUID = 23L;

    @Override
    public String getAbbreviation() {
        return "EdgesT";
    }

    @Override
    public String getDescription() {
        return "Number of Edges in the True Graph";
    }

    @Override
    public double getValue(Graph trueGraph, Graph estGraph, DataModel dataModel) {
        return trueGraph.getNumEdges();
    }

    @Override
    public double getNormValue(double value) {
        return FastMath.tanh(value);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy