predict.gradDescentRObject: The gradDescentR prediction stage

Description Usage Arguments Value See Also Examples

Description

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.

Usage

1
2
## S3 method for class 'gradDescentRObject'
predict(object, newdata, ...)

Arguments

object

an gradDescentRObject.

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)

Value

The predicted values.

See Also

gradDescentR.learn

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
################################## 
## 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)

gradDescentR documentation built on March 9, 2017, 9:02 a.m.