Skip to content

Commit

Permalink
Merge pull request #162 from michbur/master
Browse files Browse the repository at this point in the history
Ready for the cran submission
  • Loading branch information
agosiewska authored Oct 30, 2023
2 parents bb54bed + 7fcfaef commit 1f2fdc1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: auditor
Title: Model Audit - Verification, Validation, and Error Analysis
Version: 1.3.4
Version: 1.3.5
Authors@R: c(
person("Alicja", "Gosiewska", email = "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-6563-5742")),
Expand All @@ -27,7 +27,7 @@ Imports:
gridExtra,
hnp,
scales
RoxygenNote: 7.1.1
RoxygenNote: 7.2.3
Suggests:
jsonlite,
knitr,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# auditor 1.3.5
* removed Unicode characters from plot names (as requested by CRAN)
* fixed two instances of class(x) == "sth" instead of inherits

# auditor 1.3.4 - developer version
* more stable AUC computation #157

Expand Down
2 changes: 1 addition & 1 deletion R/check_residuals.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ check_residuals_autocorrelation <- function(object, method = "pearson") {

#' @title Checks for trend in residuals
#'
#' Calculates loess fit for residuals and then extracts statistics that shows how far is this fit from one without trend
#' @description Calculates loess fit for residuals and then extracts statistics that shows how far is this fit from one without trend
#'
#' @param object An object of class 'explainer' created with function \code{\link[DALEX]{explain}} from the DALEX package.
#' @param B number of samplings
Expand Down
4 changes: 2 additions & 2 deletions R/model_performance.R
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,11 @@ model_performance <- function(object, score = c("mae", "mse", "rec", "rroc"), ne


if (!is.null(new_score)) {
if (class(new_score) == "function") {
if (inherits(new_score, "function")) {
df <- rbind(df, data.frame(score = new_score(object), label = object$label, name = as.character(substitute(new_score)),
stringsAsFactors = TRUE))
}
if (class(new_score) == "list") {
if (inherits(new_score, "list")) {
for (i in names(new_score)) {
df <- rbind(df, data.frame(score = new_score[[i]](object), label = object$label, name = i,
stringsAsFactors = TRUE))
Expand Down
2 changes: 1 addition & 1 deletion R/plotD3_scalelocation.R
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ plotD3_scalelocation <- function(object, ..., variable = NULL, smooth = FALSE,
df <- make_dataframe(object, ..., variable = variable, type = "scal")

chart_title <- "Scale location"
y_title <- "\u221A|Standarized residuals|"
y_title <- "Sqrt|standarized residuals|"

# set value for label of the X axis
if (is.null(variable)) {
Expand Down
2 changes: 1 addition & 1 deletion R/plot_scalelocation.R
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ plot_scalelocation <- function(object, ..., variable = "_y_", smooth = FALSE, pe
p <- p + scale_x_continuous(breaks = 5, labels = "")
}

p <- p + xlab(x_lab) + ylab("\u221A|Standarized residuals|") + ggtitle(chart_title)
p <- p + xlab(x_lab) + ylab("Sqrt|standarized residuals|") + ggtitle(chart_title)

return(p)
}
Expand Down
6 changes: 1 addition & 5 deletions man/check_residuals_trend.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit 1f2fdc1

Please sign in to comment.