Skip to content

Commit

Permalink
This should work
Browse files Browse the repository at this point in the history
  • Loading branch information
koenderks committed Oct 10, 2024
1 parent 9b67143 commit 0f7acdd
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 23 deletions.
21 changes: 0 additions & 21 deletions R/auditClassicalModelFairness.R
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,6 @@ auditClassicalModelFairness <- function(jaspResults, dataset, options, ...) {
# Create the procedure paragraph
.jfaFairnessAddProcedure(options, jaspResults, position = 1)

# Read in the data
dataset <- .jfaFairnessReadData(dataset, options)

# Ready for analysis
ready <- (options[["protected"]] != "" && options[["target"]] != "" && options[["predictions"]] != "" && options[["privileged"]] != "" && options[["positive"]] != "")

Expand Down Expand Up @@ -121,24 +118,6 @@ auditClassicalModelFairness <- function(jaspResults, dataset, options, ...) {
return(out)
}

.jfaFairnessReadData <- function(dataset, options) {
if (!is.null(dataset)) {
return(dataset)
} else {
vars <- NULL
if (options[["target"]] != "") {
vars <- c(vars, options[["target"]])
}
if (options[["predictions"]] != "") {
vars <- c(vars, options[["predictions"]])
}
if (options[["protected"]] != "") {
vars <- c(vars, options[["protected"]])
}
return(dataset)
}
}

.jfaFairnessAddProcedure <- function(options, jaspResults, position) {
if (options[["explanatoryText"]] && is.null(jaspResults[["procedureContainer"]])) {
procedureContainer <- createJaspContainer(title = gettext("<u>Procedure</u>"))
Expand Down
4 changes: 2 additions & 2 deletions inst/Description.qml
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,8 @@ Description
// }
// Analysis
// {
// title: qsTr("Fairness Metrics")
// func: "auditClassicalModelFairness"
// title: qsTr("Fairness Metrics")
// func: "auditClassicalModelFairness"
// preloadData: true
// }
}

0 comments on commit 0f7acdd

Please sign in to comment.