The goal of GRNNs is to build a GRNN model using different functions. This GRNNs package uses various distance functions including: “euclidean”, “minkowski”, “manhattan”, “maximum”, “canberra”, “angular”, “correlation”, “absolute_correlation”, “hamming”, “jaccard”,“bray”, “kulczynski”, “gower”, “altGower”, “morisita”, “horn”, “mountford”, “raup”, “binomial”, “chao”, “cao”,“mahalanobis”.
You can install the released version of GRNNs from github with:
library(devtools)
install_github("Shufeng-Li/GRNNs")
This is a basic example which shows you how to use GRNNs:
library(GRNNs)
data("met")
data("physg")
<-physg[1,]
predict<-physg[-1,]
physg.train<-met[-1,]
met.train<-findSpread(physg.train,met.train,10,"euclidean",scale=TRUE)
best.spread<-grnn(predict,physg.train,met.train,fun="euclidean",best.spread,scale=TRUE) prediction