Description Usage Arguments Value Author(s) See Also Examples
Transforms a sample's feature's value into a dataframe, that holds its name, type and value. Currently supports numeric, factor, character and boolean values. Note that factor is internally converted to character.
1 | createFeatureForBayes(name, value, isLabel = FALSE, isDiscrete = FALSE)
|
name |
the name of the feature or variable. |
value |
the value of the feature or variable. |
isLabel |
default FALSE. Indicates whether this feature or variable is the target variable (the label or value to predict). |
isDiscrete |
default FALSE. Used to indicate whether the feature or variable given is discrete. This will also be set to true if the value given is a charater, factor or a logical. |
A data.frame with one row holding all the feature's value's properties.
Sebastian Hönel sebastian.honel@lnu.se
sampleToBayesFeatures
that uses this function
1 2 3 4 | feat <- mmb::createFeatureForBayes(
name = "Petal.Width", value = mean(iris$Petal.Width))
featTarget <- mmb::createFeatureForBayes(
name = "Species", iris[1,]$Species, isLabel = TRUE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.