Verified Commit 5649224b authored by Cody L Marquart's avatar Cody L Marquart
Browse files

Add small version of code to stat history

parent a373a1bb
......@@ -35,7 +35,7 @@ test <- function(code, kappa_threshold = 0.65, baserate_inflation = 0.2, ...) {
warning("Use kappa_threshold instead of kappaThreshold. kappaThreshold will be deprecated in a future version.")
kappa_threshold <- args$kappaThreshold
}
code.to.use <- code$clone(deep=T);
code.to.use <- code$clone(deep = TRUE);
code.to.use$baserateInflation <- baserate_inflation;
first_v_classifier_test <- NULL
......@@ -72,13 +72,16 @@ test <- function(code, kappa_threshold = 0.65, baserate_inflation = 0.2, ...) {
second_v_classifier <- calc_statistics(to.test)
}
cloned_code <- code.to.use$clone(deep = TRUE)
cloned_code$statistics <- NULL
new_tests <- list(
one_v_classifier = first_v_classifier,
one_v_two = test_result(test_set = first_v_second),
two_v_classifier = test_result(test_set = second_v_classifier)
two_v_classifier = test_result(test_set = second_v_classifier),
classifier = cloned_code
)
code.to.use$setValue("testedTestSet", T)
code.to.use$setValue("testedTestSet", TRUE)
code.to.use$statistics[[length(code.to.use$statistics) + 1]] <- new_tests
code.to.use
}
......
......@@ -13,12 +13,14 @@ resolve <- function(code = NULL, trainingSet = NULL, computerSet = NULL, express
code.to.use = NULL;
if(!is.null(code)) {
code.to.use = code$clone(deep = T);
} else {
}
else {
code.to.use = create.code();
}
if(!is.null(excerpts)) {
code.to.use$excerpts = excerpts;
} else {
}
else {
excerpts = code.to.use$excerpts;
}
if(!is.null(expressions)) {
......@@ -26,7 +28,8 @@ resolve <- function(code = NULL, trainingSet = NULL, computerSet = NULL, express
}
if(!is.null(ignored)) {
code.to.use$ignoredSet = ignored;
} else if(is.null(code.to.use$ignoredSet)) {
}
else if(is.null(code.to.use$ignoredSet)) {
ignored = c();
code.to.use$ignoredSet = ignored;
}
......@@ -156,7 +159,8 @@ resolve <- function(code = NULL, trainingSet = NULL, computerSet = NULL, express
if(!is.null(trainingSet)) {
code.to.use$trainingSet = trainingSet;
} else {
}
else {
if(nrow(code.to.use$testSet) && code.to.use$getValue("testedTestSet") == F) {
justResolve = resolveFirst()
if(justResolve != T) {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment