descale.tweakedFeature: Restore tweaked instances to the original scale

Description Usage Arguments Value Examples

View source: R/descale.tweakedFeature.R

Description

Restore tweaked instances to the original scale

Usage

1
descale.tweakedFeature(tweaked.X, scaled.X)

Arguments

tweaked.X

an object returned by tweak() to be restored.

scaled.X

a scaled matrixa or a scaled data.frame. Usually train set or test set.

Value

a list of

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
## Not run: 
X <- iris[, 1:(ncol(iris)-1)]
scaled.X <- scale(X)
true.y <- iris[, ncol(iris)]

rf.iris <- randomForest(scaled.X, true.y, ntree=30)
es.rf <- set.eSatisfactory(forest.rf, ntree = 30, epsiron = 0.3, resample = TRUE)
tweaked <- tweak(es.rf, newdata= scaled.X, label.from = "spam", label.to = "nonspam",
                 .dopar = TRUE)
dt <- descale.tweakedFeature(tweaked, scaled.X)

## End(Not run)

katokohaku/featureTweakR documentation built on May 17, 2019, 11:17 p.m.