Package 

Class MeanSquaredError

  • All Implemented Interfaces:
    it.unibo.alchemist.loader.export.Extractor

    
    public final class MeanSquaredError<T>
     implements Extractor
                        

    Exports the Mean Squared Error for the concentration of some molecule, given another molecule that carries the correct result. The correct value is extracted from every node, then the provided UnivariateStatistic is applied to get a single, global correct value. Then, the actual value is extracted from every node, its value is compared (subtracted) to the computed correct value, it gets squared, and then logged.

    • Method Summary

      Modifier and Type Method Description
      <T> Array<double> extractData(Environment<T, out Object> environment, Reaction<T> reaction, Time time, long step) Extracts numeric properties from an environment.
      List<String> getNames()
      • Methods inherited from class it.unibo.alchemist.loader.export.Extractor

        extractData
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • MeanSquaredError

        MeanSquaredError(Incarnation<T, out Object> incarnation, String localCorrectValueMolecule, String localCorrectValueProperty, String statistics, String localValueMolecule, String localValueProperty)
        Parameters:
        incarnation - the Incarnation to use
        localCorrectValueMolecule - expected value Molecule
        localCorrectValueProperty - expected value property name
        statistics - the UnivariateStatistic to apply
        localValueMolecule - the target Molecule
        localValueProperty - the target property
    • Method Detail

      • extractData

         <T> Array<double> extractData(Environment<T, out Object> environment, Reaction<T> reaction, Time time, long step)

        Extracts numeric properties from an environment.

        Parameters:
        environment - the Environment
        reaction - the last executed Reaction
        time - the current Time
        step - the simulation step