Description Usage Arguments Value Author(s) Examples
Helper function that takes one sample (e.g., a row of a dataframe
with validation data) and transforms it into a data.frame where
each row corresponds to one feature (and its value) of the sample.
This is done using @seealso createFeatureForBayes
. This
operation can be thought of transposing a matrix.
1 | sampleToBayesFeatures(dfRow, targetCol)
|
dfRow |
a row of a data.frame with a value for each feature. |
targetCol |
the name of the feature (column in the data.frame) that is the target variable for classification or regression. |
a data.frame where the first row is the feature that represents the label.
Sebastian Hönel sebastian.honel@lnu.se
1 2 3 4 | # Converts all features of iris; the result is a data.frame of length
# equal to the amount of features in iris (5). The first feature is
# targetCol (has isLabel=TRUE).
samp <- mmb::sampleToBayesFeatures(dfRow = iris[15,], targetCol = "Species")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.