diff --git a/NAMESPACE b/NAMESPACE index e4b7357e9fd777ae13d2604bd507ee3470d158f0..c6290966ecc91f9f1181d29f6db5592ef1bbdd90 100644 --- a/NAMESPACE +++ b/NAMESPACE @@ -7,6 +7,7 @@ S3method(print,SISIRres) S3method(print,ridgeRes) S3method(print,sparseRes) S3method(project,sparseRes) +S3method(quality,SFCB) S3method(summary,SFCB) S3method(summary,SISIRres) S3method(summary,ridgeRes) @@ -14,6 +15,7 @@ S3method(summary,sparseRes) export(SISIR) export(extract_at) export(project) +export(quality) export(ridgeSIR) export(sfcb) export(sparseSIR) @@ -31,6 +33,11 @@ importFrom(RColorBrewer,brewer.pal) importFrom(RSpectra,eigs) importFrom(adjclust,adjClust) importFrom(adjclust,cutree_chac) +importFrom(aricode,AMI) +importFrom(aricode,ARI) +importFrom(aricode,NID) +importFrom(aricode,NMI) +importFrom(aricode,NVI) importFrom(dplyr,arrange) importFrom(dplyr,filter) importFrom(dplyr,inner_join) diff --git a/R/SFCB.R b/R/SFCB.R index 5ff6f2edb48789a45167b8a3bc068ed7c3c5f315..4e8d65312221833957707607c4fd2118b67e2f06 100644 --- a/R/SFCB.R +++ b/R/SFCB.R @@ -333,11 +333,11 @@ extract_at.SFCB <- function(object, at) { out$groups <- out$groups[selected] out$summaries <- out$summaries[selected] out$mse <- out$mse[out$mse$clust %in% at, ] - out$importance <- out$importance[selected] + out$importances <- out$importances[selected] if ("computational.times" %in% names(out)) out$"computational.times" <- NULL if ("selected" %in% names(out)) out$selected <- out$selected[selected] out$call <- extract_call return(out) -} \ No newline at end of file +} diff --git a/man/SFCB.Rd b/man/SFCB.Rd index 0450d5c961cbd3bdebb21ab4dd33a71daca8c286..2ba260e8cb15f7313d9cb19151f35af876a3bd37 100644 --- a/man/SFCB.Rd +++ b/man/SFCB.Rd @@ -1,5 +1,5 @@ % Generated by roxygen2: do not edit by hand -% Please edit documentation in R/SFCB.R +% Please edit documentation in R/SFCB.R, R/sfcb_methods.R \name{SFCB} \alias{SFCB} \alias{summary.SFCB} @@ -8,6 +8,7 @@ \alias{extract.SFCB} \alias{SFCB-class} \alias{extract_at} +\alias{quality} \title{Methods for SFCB object} \usage{ \method{summary}{SFCB}(object, ...) @@ -23,6 +24,22 @@ ) extract_at(object, at) + +\method{summary}{SFCB}(object, ...) + +\method{print}{SFCB}(x, ...) + +\method{plot}{SFCB}( + x, + plot.type = c("dendrogram", "selection", "importance"), + shape.imp = c("boxplot", "histogram"), + sel.type = c("importance", "selection"), + threshold = "none" +) + +extract_at(object, at) + +quality(object, ground_truth, threshold = NULL) } \arguments{ \item{object}{a \code{SFCB} object} @@ -37,6 +54,9 @@ extract_at(object, at) \code{extract_at}} } \description{ +Print or plot a summary of the result of \code{\link{sfcb}} ( +\code{SFCB} object) + Print or plot a summary of the result of \code{\link{sfcb}} ( \code{SFCB} object) } @@ -53,6 +73,24 @@ plot(out1, plot.type = "selection") plot(out1, plot.type = "importance") } +out2 <- sfcb(rainfall, truffles, group.method = "adjclust", + summary.method = "basics", selection.method = "none", + range.at = c(5, 7)) +out3 <- extract_at(out2, at = 6) +summary(out3) + +\code{\link{sfcb}} +data(truffles) +out1 <- sfcb(rainfall, truffles, group.method = "adjclust", + summary.method = "pls", selection.method = "relief") +summary(out1) + +\dontrun{ +plot(out1) +plot(out1, plot.type = "selection") +plot(out1, plot.type = "importance") +} + out2 <- sfcb(rainfall, truffles, group.method = "adjclust", summary.method = "basics", selection.method = "none", range.at = c(5, 7)) @@ -60,6 +98,10 @@ out3 <- extract_at(out2, at = 6) summary(out3) } \author{ +{Victor Picheny, \email{victor.picheny@inrae.fr}\cr +Remi Servien, \email{remi.servien@inrae.fr}\cr +Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr}} + {Victor Picheny, \email{victor.picheny@inrae.fr}\cr Remi Servien, \email{remi.servien@inrae.fr}\cr Nathalie Vialaneix, \email{nathalie.vialaneix@inrae.fr}}