Class SymbolicRegressionUtils
java.lang.Object
net.bmahe.genetics4j.samples.symbolicregression.SymbolicRegressionUtils
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Program
buildProgram
(Random random) static EvolutionListener
<FitnessVector<Double>> csvLogger
(String filename, Function<EvolutionStep<FitnessVector<Double>, List<Set<Integer>>>, Double> computeScore, Function<EvolutionStep<FitnessVector<Double>, List<Set<Integer>>>, Double> computeComplexity) Sepcialization for FitnessVectorstatic <T extends Comparable<T>>
EvolutionListener<T> csvLogger
(String filename, Function<EvolutionStep<T, List<Set<Integer>>>, Double> computeScore, Function<EvolutionStep<T, List<Set<Integer>>>, Double> computeComplexity, BiFunction<List<Genotype>, List<T>, List<FitnessVector<Double>>> convert2FitnessVector) static EvolutionListener
<Double> csvLoggerDouble
(String filename, Function<EvolutionStep<Double, List<Set<Integer>>>, Double> computeScore, Function<EvolutionStep<Double, List<Set<Integer>>>, Double> computeComplexity) Sepcialization for Doublestatic double
evaluate
(double x)
-
Constructor Details
-
SymbolicRegressionUtils
private SymbolicRegressionUtils()
-
-
Method Details
-
buildProgram
-
evaluate
public static double evaluate(double x) -
csvLogger
public static <T extends Comparable<T>> EvolutionListener<T> csvLogger(String filename, Function<EvolutionStep<T, List<Set<Integer>>>, Double> computeScore, Function<EvolutionStep<T, List<Set<Integer>>>, Double> computeComplexity, BiFunction<List<Genotype>, List<T>, List<FitnessVector<Double>>> convert2FitnessVector) -
csvLogger
public static EvolutionListener<FitnessVector<Double>> csvLogger(String filename, Function<EvolutionStep<FitnessVector<Double>, List<Set<Integer>>>, Double> computeScore, Function<EvolutionStep<FitnessVector<Double>, List<Set<Integer>>>, Double> computeComplexity) Sepcialization for FitnessVector- Parameters:
filename
-computeScore
-computeComplexity
-- Returns:
-
csvLoggerDouble
public static EvolutionListener<Double> csvLoggerDouble(String filename, Function<EvolutionStep<Double, List<Set<Integer>>>, Double> computeScore, Function<EvolutionStep<Double, List<Set<Integer>>>, Double> computeComplexity) Sepcialization for DoubleWe can't have the same method name as type erasure wouldn't allow it :(
- Parameters:
filename
-computeScore
-computeComplexity
-- Returns:
-