Compare commits
4 Commits
german_7
...
german_cos
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f4df1d4372 | ||
|
|
6f16a01169 | ||
|
|
691c27a8d1 | ||
|
|
942e817522 |
@@ -89,10 +89,10 @@ lE =
|
||||
maxDepth = 5,
|
||||
weights =
|
||||
ExpressionWeights
|
||||
{ lambdaSpucker = 1,
|
||||
lambdaSchlucker = 2,
|
||||
symbol = 30,
|
||||
variable = 10,
|
||||
{ lambdaSpucker = 10,
|
||||
lambdaSchlucker = 1,
|
||||
symbol = 20,
|
||||
variable = 100,
|
||||
constant = 5
|
||||
}
|
||||
}
|
||||
@@ -151,6 +151,7 @@ data LamdaExecutionEnv = LamdaExecutionEnv
|
||||
data FittnesRes = FittnesRes
|
||||
{ total :: R,
|
||||
fitnessTotal :: R,
|
||||
costAccordingToDataset :: N,
|
||||
fitnessGeoMean :: R,
|
||||
fitnessMean :: R,
|
||||
accuracy :: R,
|
||||
@@ -189,8 +190,9 @@ evalResults ex trs = do
|
||||
evalResult :: LamdaExecutionEnv -> TypeRequester -> (AccountStatus -> Int -> CreditHistory -> Purpose -> Int -> Savings -> EmploymentStatus -> Int -> StatusAndSex -> OtherDebtors -> Int -> Property -> Int -> OtherPlans -> Housing -> Int -> Job -> Int -> Bool -> Bool -> GermanClass) -> (TypeRequester, FittnesRes)
|
||||
evalResult ex tr result = ( tr,
|
||||
FittnesRes
|
||||
{ total = score,
|
||||
{ total = (biasSmall - 1) - (fromIntegral costAccordingToDS),
|
||||
fitnessTotal = fitness',
|
||||
costAccordingToDataset = costAccordingToDS,
|
||||
fitnessMean = meanOfAccuricyPerClass resAndTarget,
|
||||
fitnessGeoMean = geomeanOfDistributionAccuracy resAndTarget,
|
||||
accuracy = acc,
|
||||
@@ -201,7 +203,8 @@ evalResult ex tr result = ( tr,
|
||||
where
|
||||
res = map (\(a, b, c, d, e, f, g, h, i, j, k, l, m, n, o, p, q, r, s, t) -> result a b c d e f g h i j k l m n o p q r s t) (fst (dset ex))
|
||||
resAndTarget = (zip (snd (dset ex)) res)
|
||||
acc = (foldr (\ts s -> if ((fst ts) == (snd ts)) then s + 1 else s) 0 resAndTarget) / fromIntegral (length resAndTarget)
|
||||
acc = (foldr (\(actual,predicted) s -> if (actual == predicted) then s + 1 else s) 0 resAndTarget) / fromIntegral (length resAndTarget)
|
||||
costAccordingToDS = (foldr (\(actual,predicted) s -> if ((actual) == (predicted)) then s else (if actual == Deny then s+5 else s+1)) 0 resAndTarget)
|
||||
biasSmall = exp ((-(fromIntegral (countTrsR tr))) / 1000) -- 0 (schlecht) bis 1 (gut)
|
||||
fitness' = meanOfAccuricyPerClass resAndTarget
|
||||
score = fitness' + (biasSmall - 1)
|
||||
|
||||
@@ -56,10 +56,10 @@ lE =
|
||||
maxDepth = 5,
|
||||
weights =
|
||||
ExpressionWeights
|
||||
{ lambdaSpucker = 1,
|
||||
lambdaSchlucker = 2,
|
||||
symbol = 30,
|
||||
variable = 10,
|
||||
{ lambdaSpucker = 10,
|
||||
lambdaSchlucker = 1,
|
||||
symbol = 20,
|
||||
variable = 100,
|
||||
constant = 5
|
||||
}
|
||||
}
|
||||
@@ -68,7 +68,7 @@ lEE :: LamdaExecutionEnv
|
||||
lEE =
|
||||
LamdaExecutionEnv
|
||||
{ -- For now these need to define all available functions and types. Generic functions can be used.
|
||||
imports = ["LambdaDatasets.IrisDataset"],
|
||||
imports = ["LambdaDatasets.IrisDefinition"],
|
||||
training = True,
|
||||
trainingData =
|
||||
( map fst (takeFraktion 0.8 irisTrainingData),
|
||||
@@ -89,7 +89,7 @@ shuffledLEE = do
|
||||
itD <- smpl $ shuffle irisTrainingData
|
||||
return LamdaExecutionEnv
|
||||
{ -- For now these need to define all available functions and types. Generic functions can be used.
|
||||
imports = ["LambdaDatasets.IrisDataset"],
|
||||
imports = ["LambdaDatasets.IrisDefinition"],
|
||||
training = True,
|
||||
trainingData =
|
||||
( map fst (takeFraktion 0.8 itD),
|
||||
@@ -155,7 +155,7 @@ evalResults ex trs = do
|
||||
evalResult :: LamdaExecutionEnv -> TypeRequester -> (Float -> Float -> Float -> Float -> IrisClass) -> (TypeRequester, FittnesRes)
|
||||
evalResult ex tr result = ( tr,
|
||||
FittnesRes
|
||||
{ total = score,
|
||||
{ total = acc * 100 + (biasSmall - 1),
|
||||
fitnessTotal = fitness',
|
||||
fitnessMean = meanOfAccuricyPerClass resAndTarget,
|
||||
fitnessGeoMean = geomeanOfDistributionAccuracy resAndTarget,
|
||||
|
||||
@@ -77,10 +77,10 @@ lE =
|
||||
maxDepth = 5,
|
||||
weights =
|
||||
ExpressionWeights
|
||||
{ lambdaSpucker = 1,
|
||||
lambdaSchlucker = 2,
|
||||
symbol = 30,
|
||||
variable = 10,
|
||||
{ lambdaSpucker = 10,
|
||||
lambdaSchlucker = 1,
|
||||
symbol = 20,
|
||||
variable = 100,
|
||||
constant = 5
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user