Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

var.relations.mfi will fail if create.forest is FALSE #9

Open
floriangaerber opened this issue Jul 28, 2023 · 0 comments
Open

var.relations.mfi will fail if create.forest is FALSE #9

floriangaerber opened this issue Jul 28, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@floriangaerber
Copy link
Contributor

var.relations.mfi() depends on forest_perm, x_perm and allvariables, which will not be set if create.forest = FALSE.

if (all(candidates %in% allvariables)) {
if (all(variables %in% allvariables)) {
# count surrogates
s <- count.surrogates(forest$trees)
rel <- meanAdjAgree(forest$trees,
variables = allvariables, allvariables = allvariables, candidates = allvariables,
t = t, s$s.a, select.var = FALSE, num.threads = num.threads
)
allvariables_perm <- colnames(x_perm)
rel_perm <- meanAdjAgree(forest_perm$trees,
variables = allvariables_perm, allvariables = allvariables_perm, candidates = allvariables_perm,
t = t, s$s.a, select.var = FALSE, num.threads = num.threads
)
} else {
stop("allvariables do not contain the chosen variables")
}
} else {
stop("allvariables do not contain the candidate variables")
}

@floriangaerber floriangaerber added the bug Something isn't working label Jul 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant