org.encog.ml.ea.score.adjust
Class ComplexityAdjustedScore
- java.lang.Object
-
- org.encog.ml.ea.score.adjust.ComplexityAdjustedScore
-
- All Implemented Interfaces:
- AdjustScore
public class ComplexityAdjustedScore extends java.lang.Object implements AdjustScore
Adjust scores to penalize complexity.
-
-
Constructor Summary
Constructors Constructor and Description ComplexityAdjustedScore()ComplexityAdjustedScore(int theComplexityPenaltyThreshold, int theComplexityPentaltyFullThreshold, double theComplexityPenalty, double theComplexityFullPenalty)Construct a adjustor to penalize complexity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description doublecalculateAdjustment(Genome genome)Calculate the score adjustment.doublegetComplexityFullPenalty()doublegetComplexityPenalty()intgetComplexityPenaltyThreshold()intgetComplexityPentaltyFullThreshold()voidsetComplexityFullPenalty(double complexityFullPenalty)voidsetComplexityPenalty(double complexityPenalty)voidsetComplexityPenaltyThreshold(int complexityPenaltyThreshold)voidsetComplexityPentaltyFullThreshold(int complexityPentaltyFullThreshold)
-
-
-
Constructor Detail
-
ComplexityAdjustedScore
public ComplexityAdjustedScore(int theComplexityPenaltyThreshold, int theComplexityPentaltyFullThreshold, double theComplexityPenalty, double theComplexityFullPenalty)Construct a adjustor to penalize complexity.- Parameters:
theComplexityPenaltyThreshold- The complexity level at which a penalty begins to be applied.theComplexityPentaltyFullThreshold- The complexity level at which a full (100%) penalty is applied.theComplexityPenalty- The starting complexity penalty.theComplexityFullPenalty- The full complexity penalty.
-
ComplexityAdjustedScore
public ComplexityAdjustedScore()
-
-
Method Detail
-
calculateAdjustment
public double calculateAdjustment(Genome genome)
Calculate the score adjustment.- Specified by:
calculateAdjustmentin interfaceAdjustScore- Parameters:
genome- The genome.- Returns:
- The adjusted score.
-
getComplexityPenalty
public double getComplexityPenalty()
- Returns:
- the complexityPenalty
-
setComplexityPenalty
public void setComplexityPenalty(double complexityPenalty)
- Parameters:
complexityPenalty- the complexityPenalty to set
-
getComplexityFullPenalty
public double getComplexityFullPenalty()
- Returns:
- the complexityFullPenalty
-
setComplexityFullPenalty
public void setComplexityFullPenalty(double complexityFullPenalty)
- Parameters:
complexityFullPenalty- the complexityFullPenalty to set
-
getComplexityPenaltyThreshold
public int getComplexityPenaltyThreshold()
- Returns:
- the complexityPenaltyThreshold
-
setComplexityPenaltyThreshold
public void setComplexityPenaltyThreshold(int complexityPenaltyThreshold)
- Parameters:
complexityPenaltyThreshold- the complexityPenaltyThreshold to set
-
getComplexityPentaltyFullThreshold
public int getComplexityPentaltyFullThreshold()
- Returns:
- the complexityPentaltyFullThreshold
-
setComplexityPentaltyFullThreshold
public void setComplexityPentaltyFullThreshold(int complexityPentaltyFullThreshold)
- Parameters:
complexityPentaltyFullThreshold- the complexityPentaltyFullThreshold to set
-
-
DMelt 3.0 © DataMelt by jWork.ORG