Description Usage Arguments See Also Examples
Creates equal width or equal frequency discretized variables from continuous variables.
1 2 3 |
formula |
Formula |
data |
xdf file |
type |
Determines whether the discretization
produces equal |
nBins |
Number of bins |
subscript |
Character vector. Gets appended to column names to indicate the discretized columns. |
sep |
Separator character between column names and
|
integerLabels |
??? |
finalTransform |
??? #' |
Other Data mining functions: rxMoments
;
rxSample2Df
;
rxTreeDiscretize
; rxUnique
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(RevoScaleR)
discTransforms <- rxDiscretize(~ ., data = USArrests, integerLabels = FALSE)
discTransforms2 <- rxDiscretize(~ Assault+UrbanPop+Rape, data = USArrests, subscript = "", sep = "")
newData <- rxDataStep(inData = USArrests,
transforms = discTransforms)
claimsXdf <- file.path(rxGetOption("sampleDataDir"),"claims.xdf")
# Equal Width
discTransforms <- rxDiscretize(~ cost, data = claimsXdf, type = "width", nBins = 1000, subscript = "disc", sep = "_")
x <- rxDataStep(inData = claimsXdf, transforms = discTransforms)
# Equal Freq
discTransforms <- rxDiscretize(~ cost, data = claimsXdf, type = "freq", nBins = 1000, subscript = "disc", sep = "_")
x <- rxDataStep(inData = claimsXdf, transforms = discTransforms)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.