| Title: | General Regression Neural Networks Package |
| Version: | 0.1.0 |
| Description: | This General Regression Neural Networks Package uses various distance functions. It was motivated by Specht (1991, ISBN:1045-9227), and updated from previous published paper Li et al. (2016) <doi:10.1016/j.palaeo.2015.11.005>. This package includes various functions, although "euclidean" distance is used traditionally. |
| License: | GPL (≥ 3) |
| Encoding: | UTF-8 |
| LazyData: | true |
| RoxygenNote: | 7.1.1 |
| Imports: | cvTools, rdist, scales, stats, vegan |
| Depends: | R (≥ 3.5.0) |
| Suggests: | rmarkdown, knitr, testthat (≥ 3.0.0) |
| Config/testthat/edition: | 3 |
| VignetteBuilder: | knitr |
| NeedsCompilation: | no |
| Packaged: | 2021-09-06 09:43:08 UTC; paleowind |
| Author: | Shufeng LI |
| Maintainer: | Shufeng LI <lisf@xtbg.org.cn> |
| Repository: | CRAN |
| Date/Publication: | 2021-09-08 09:30:04 UTC |
Find best spread
Description
Find best spread
Usage
findSpread(p_train, v_train, k, fun, scale = TRUE)
Arguments
p_train |
The dataframe of training predictor dataset |
v_train |
The dataframe of training response variables |
k |
The numeric number of k folds |
fun |
The distance function |
scale |
The logic statements (TRUE/FALSE) |
Value
Best spread
Examples
data("met")
data("physg")
## Not run: best.spread<-findSpread(physg,met,10,"bray",scale=TRUE)
find best spreads using Rdist
Description
find best spreads using Rdist
Usage
findSpreadRdist(x, y, k, fun, scale = TRUE)
Arguments
x |
The dataframe of training predictor dataset |
y |
The dataframe of training response variables |
k |
The numeric number of k folds |
fun |
The distance function |
scale |
The logic statements (TRUE/FALSE) |
Value
The vector of best spreads
Find best spread using vegan function
Description
Find best spread using vegan function
Usage
findSpreadVegan(x, y, k, fun, scale = TRUE)
Arguments
x |
The dataframe of training predictor dataset |
y |
The dataframe of training response variables |
k |
The numeric number of k folds |
fun |
The distance function |
scale |
The logic statements (TRUE/FALSE) |
Value
The vector of best spreads
General Regression Neural Networks (GRNNs)
Description
This GRNNs 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".
Usage
grnn(p_input, p_train, v_train, fun = "euclidean", best.spread, scale = TRUE)
Arguments
p_input |
The dataframe of input predictors |
p_train |
The dataframe of training predictor dataset |
v_train |
The dataframe of training response variables |
fun |
The distance function |
best.spread |
The vector of best spreads |
scale |
The logic statements (TRUE/FALSE) |
Value
The predictions
Examples
data("met")
data("physg")
best.spread<-c(0.33,0.33,0.31,0.34,0.35,0.35,0.32,0.31,0.29,0.35,0.35)
predict<-physg[1,]
physg.train<-physg[-1,]
met.train<-met[-1,]
prediction<-grnn(predict,physg.train,met.train,fun="euclidean",best.spread,scale=TRUE)
grnn distance
Description
grnn distance
Usage
grnn.distance(x, y, fun)
Arguments
x |
The dataframe of training predictor dataset |
y |
The dataframe of training response variables |
fun |
The distance function |
Value
The matrix of distance between a and b
Examples
data("physg")
physg.train<-physg[1:10,]
physg.test<-physg[11:30,]
distance<-grnn.distance(physg.test,physg.train,"bray")
General Regression Neural Networks (GRNNs)
Description
General Regression Neural Networks (GRNNs)
Usage
grnn.kfold(x, y, k, fun, scale = TRUE)
Arguments
x |
The dataframe of training predictor dataset |
y |
The dataframe of training response variables |
k |
The numeric number of k folds |
fun |
The distance function |
scale |
The logic statements (TRUE/FALSE) |
Value
rmse,stdae,stdev,mae,r,pvalue,best spread
Examples
data("met")
data("physg")
results_kfold<-grnn.kfold(physg,met,10,"euclidean",scale=TRUE)
meteorological dataset
Description
Data from a global collection by Robert A. Spicer. It include 11 climate variables from 378 sites.
Usage
met
Format
A data frame with 378 rows and 11 variables:
MATdouble COLUMN_DESCRIPTION
WMMTdouble COLUMN_DESCRIPTION
CMMTdouble COLUMN_DESCRIPTION
GROWSEASdouble COLUMN_DESCRIPTION
GSPdouble COLUMN_DESCRIPTION
MMGSPdouble COLUMN_DESCRIPTION
Three_WETdouble COLUMN_DESCRIPTION
Three_DRYdouble COLUMN_DESCRIPTION
RHdouble COLUMN_DESCRIPTION
SHdouble COLUMN_DESCRIPTION
ENTHALdouble COLUMN_DESCRIPTION
Details
DETAILS
physiognomy dataset
Description
Data from a global collection by Robert A. Spicer. It include 31 leaf physiognomies variables from 378 sites.
Usage
physg
Format
A data frame with 378 rows and 31 variables:
Lobeddouble COLUMN_DESCRIPTION
No.Teethdouble COLUMN_DESCRIPTION
Regular.teethdouble COLUMN_DESCRIPTION
Close.teethdouble COLUMN_DESCRIPTION
Round.teethdouble COLUMN_DESCRIPTION
Acute.teethdouble COLUMN_DESCRIPTION
Compound.teethdouble COLUMN_DESCRIPTION
Nanophylldouble COLUMN_DESCRIPTION
Leptophyll.1double COLUMN_DESCRIPTION
Leptophyll.2double COLUMN_DESCRIPTION
Microphyll.1double COLUMN_DESCRIPTION
Microphyll.2double COLUMN_DESCRIPTION
Microphyll.3double COLUMN_DESCRIPTION
Mesophyll.1double COLUMN_DESCRIPTION
Mesophyll.2double COLUMN_DESCRIPTION
Mesophyll.3double COLUMN_DESCRIPTION
Emarginate.apexdouble COLUMN_DESCRIPTION
Round.apexdouble COLUMN_DESCRIPTION
Acute.apexdouble COLUMN_DESCRIPTION
Attenuate.apexdouble COLUMN_DESCRIPTION
Cordate.basedouble COLUMN_DESCRIPTION
Round.basedouble COLUMN_DESCRIPTION
Acute.basedouble COLUMN_DESCRIPTION
L.W..1.1double COLUMN_DESCRIPTION
L.W.1.2.1double COLUMN_DESCRIPTION
L.W.2.3.1double COLUMN_DESCRIPTION
L.W.3.4.1double COLUMN_DESCRIPTION
L.W..4.1double COLUMN_DESCRIPTION
Obovatedouble COLUMN_DESCRIPTION
Ellipticdouble COLUMN_DESCRIPTION
Ovatedouble COLUMN_DESCRIPTION
Details
DETAILS
distance using vegdist
Description
distance using vegdist
Usage
veg.distance(a, b, fun = "bray")
Arguments
a |
The dataframe of training predictor dataset |
b |
The dataframe of validation predictor dataset |
fun |
The distance function |
Value
The matrix of distance between a and b
Examples
data("physg")
physg.train<-physg[1:10,]
physg.test<-physg[11:30,]
distance<-veg.distance(physg.test,physg.train,"bray")