Description Usage Arguments Value See Also Examples
This is the main function to obtain a final result as predicted values for all methods in this package.
In order to get predicted values, this function is run using an gradDescentRObject
, which is typically generated using gradDescentR.learn
.
1 2 |
object |
an |
newdata |
a data frame or matrix (m \times n) of data for the prediction process, where m is the number of instances and n is the number of input variables. It should be noted that the testing data must be expressed in numbers (numerical data). |
... |
the other parameters (not used) |
The predicted values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 | ##################################
## Predict NewData Using Model Object
## load R Package data
data(gradDescentRData)
## get z-factor data
dataSet <- gradDescentRData$CompressilbilityFactor
## train dataset
modelObject <- gradDescentR.learn(dataSet)
## create new data input
temp <- c(273.1, 353.1, 363.1)
pres <- c(24.675, 24.675, 24.675)
conf <- c(0.8066773, 0.9235751, 0.9325948)
zfac <- data.frame(temp, pres, conf)
## predict
prediction_data <- predict(modelObject, zfac)
##################################
## Predict NewData Using Model Object
## load R Package data
data(gradDescentRData)
## get z-factor data
dataSet <- gradDescentRData$CompressilbilityFactor
## train dataset
modelObject <- gradDescentR.learn(dataSet, featureScaling=TRUE, scalingMethod="VARIANCE",
learningMethod="SARAHPlus", control=list(), seed=NULL)
## create new data input
temp <- c(273.1, 353.1, 363.1)
pres <- c(24.675, 24.675, 24.675)
conf <- c(0.8066773, 0.9235751, 0.9325948)
zfac <- data.frame(temp, pres, conf)
## predict
prediction_data <- predict(modelObject, zfac)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.