Compare commits
No commits in common. "2d9840c51ba0ec6c0025e595be591db4067ef614" and "53c490b3b3450c51fa706c8f20b6584b47ae5d27" have entirely different histories.
2d9840c51b
...
53c490b3b3
@ -63,7 +63,6 @@ library
|
||||
, HushGP.GP
|
||||
, HushGP.GP.PushArgs
|
||||
, HushGP.GP.Variation
|
||||
, HushGP.GP.Downsample
|
||||
, HushGP.Problems.IntegerRegression
|
||||
|
||||
|
||||
|
@ -7,8 +7,6 @@ import Data.List (sort, uncons)
|
||||
import HushGP.GP.PushArgs
|
||||
import HushGP.Genome
|
||||
import HushGP.State
|
||||
import HushGP.GP.Variation
|
||||
import HushGP.GP.Downsample
|
||||
|
||||
-- import Debug.Trace (trace, traceStack)
|
||||
|
||||
@ -60,8 +58,7 @@ gpLoop' pushArgs generation evaluations population indexedTrainingData = do
|
||||
print "Incomplete Run, saving the best so far."
|
||||
| otherwise = gpLoop' pushArgs (succ generation)
|
||||
(evaluations + (populationSize pushArgs * length (fst $ trainingData pushArgs)) + (if generation `mod` downsampleParentsGens pushArgs == 0 then length parentReps * (length (fst indexedTrainingData) - length (fst $ trainingData pushArgs)) else 0) + (if bestIndPassesDownsample then length (fst indexedTrainingData) - length (fst $ trainingData pushArgs) else 0))
|
||||
(if elitism pushArgs then bestInd : replicate (populationSize epsilonPushArgs - 1) (newIndividual epsilonPushArgs evaledPop) else replicate (populationSize epsilonPushArgs) (newIndividual epsilonPushArgs evaledPop))
|
||||
(if enableDownsampling pushArgs && ((generation `mod` downsampleParentsGens pushArgs) == 0) then updateCaseDistances repEvaluatedPop indexedTrainingData indexedTrainingData (informedDownsamplingType pushArgs) (solutionErrorThreshold pushArgs / fromIntegral @Int @Double (length $ fst indexedTrainingData)) else indexedTrainingData)
|
||||
(if elitism then bestInd : )
|
||||
nextAction
|
||||
where
|
||||
-- \| This will have downsampling added to it later.
|
||||
|
@ -1,7 +0,0 @@
|
||||
module HushGP.GP.Downsample where
|
||||
|
||||
import HushGP.State
|
||||
import HushGP.Genome
|
||||
|
||||
updateCaseDistances :: [Individual] -> ([[Gene]], [Gene]) -> ([[Gene]], [Gene]) -> String -> Double -> ([[Gene]], [Gene])
|
||||
updateCaseDistances evaledPop downsampleData trainingData informedDownsamplingType solutionThreshold = undefined
|
Loading…
x
Reference in New Issue
Block a user