if (requireNamespace("DMwR2", quietly = TRUE)) {
data(algae, package ="DMwR2")
clean.algae <- data.frame(algae[complete.cases(algae), ])
myCNN <- CNNClassif(season~., clean.algae,
Cl = c("summer", "spring", "winter"),
dist = "HEOM")
CNN1 <- CNNClassif(season~., clean.algae, Cl = "smaller", dist = "HEOM")
CNN2<- CNNClassif(season~., clean.algae, Cl = "summer",dist = "HVDM")
summary(myCNN[[1]]$season)
summary(CNN1[[1]]$season)
summary(CNN2[[1]]$season)
library(MASS)
data(cats)
CNN.catsF <- CNNClassif(Sex~., cats, Cl = "F")
CNN.cats <- CNNClassif(Sex~., cats, Cl = "smaller")
} else {
library(MASS)
data(cats)
CNN.catsF <- CNNClassif(Sex~., cats, Cl = "F")
CNN.cats <- CNNClassif(Sex~., cats, Cl = "smaller")
}
Run the code above in your browser using DataLab