Skip to content

Commit

Permalink
Bug fix: Adjust row_lbl of 2x2 confusion matrix to read "Prediction" …
Browse files Browse the repository at this point in the history
…when using "test" data, but keep default of "Decision" otherwise.
  • Loading branch information
hneth committed Sep 4, 2024
1 parent 7233196 commit 73d4128
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions R/plotFFTrees_function.R
Original file line number Diff line number Diff line change
Expand Up @@ -1640,7 +1640,7 @@ plot.FFTrees <- function(x = NULL,
# print(lloc) # 4debugging


# Classification table: ----
# Classification table: 2x2 matrix / confusion matrix: ----

if (show.confusion) {

Expand Down Expand Up @@ -1695,16 +1695,19 @@ plot.FFTrees <- function(x = NULL,
decision.labels[1], adj = 1
)

# Adjust row category label:
if (data == "test") {
row_lbl <- "Prediction"
} else { # default:
row_lbl <- "Decision"
}

text(
x = final_classtable_x[1] - .065,
y = mean(final_classtable_y), cex = header_cex,
"Decision"
row_lbl
)

# text(x = final_classtable_x[1] - .05,
# y = mean(final_classtable_y), cex = header_cex,
# "Decision", srt = 90, pos = 3)


# Add final frequencies: ----

Expand Down

0 comments on commit 73d4128

Please sign in to comment.