I've used k-centroids diagnostics many times in the past and I've never encountered this error. I was using a 2018 version when I got the error, so I said what the heck, I'll try the 2019 version. Same issue.
I'm attaching two snipped images: one of the error I receive; and one of my configuration.
I've also Googled the error, but I can't even find anything about the object in question (std.param2) in the R-related documents.
I'm not doing anything I haven't done before with this tool. I'm completely baffled as to what's the problem. Any ideas about what this error is referring to would be much appreciated. Thanks.
Résolu ! Accéder à la solution.
Hi,
I was able to replicate this on my side. Inspecting the K-Centroids Diagnostic Macro, the following code handles the standardization.
# Handle a requested standardization
if (standardize == "True") {
z.score <- '%Question.z score%'
if (z.score == "True") {
std.type <- "z-score"
std.param1 <- apply(the.matrix, 2, mean)
std.param2 <- apply(the.matrix, 2, sd)
the.matrix <- scale(the.matrix)
matrix.str <- paste("scale(", matrix.str, ")", sep = "")
} else {
std.type <- "Unit interval"
std.param1 <- apply(the.matrix, 2, min)
std.param2 <- apply(the.matrix, 2, max) - std.param2
the.matrix <- unitScale(the.matrix)
matrix.str <- paste("unitScale(", matrix.str, ")", sep = "")
}
}When using unit standardization, the error lies with the following line of code. std.param2 is just being defined, so we cannot subtract by it as it does not exist
std.param2 <- apply(the.matrix, 2, max) - std.param2
This line of code should be as follows. This would calculate the range, which is necessary for unit standardization.
std.param2 <- apply(the.matrix, 2, max) - std.param1
Thanks for bringing this to our attention. I will cascade internally. In the meantime, I would recommend you use the Z Score standardization, as that runs without error.
Thank you for the quick response. I kicked myself when reading it b/c I didn't play with the input parameters... but the reason I didn't do so was b/c (in the k-centroids cluster analysis) the unit interval nearly always yields a lower sum of within cluster distances than the z-score, controlling for algorithm (e.g., k-means) and number of clusters in the solution -- thus I usually just use unit interval.
Thanks again.
Joe
I spoke with our development team, and this issue has been resolved. The fix is currently in QA, and should be included in the next release, 2019.2.
Thanks,
Andrew
| Utilisateur | Comptage |
|---|---|
| 11 | |
| 11 | |
| 4 | |
| 3 | |
| 2 |