bayesFeaturesToSample {mmb}R Documentation

Transform a collection of Bayesian features back to a sample.

Description

Counter operation to @seealso mmb::sampleToBayesFeatures(). Takes a Bayes-feature data.frame and transforms it back to a row.

Usage

bayesFeaturesToSample(dfOrg, features)

Arguments

dfOrg

data.frame containing at least one row of the original format, so that we can rebuild the sample matching exactly the original column names.

features

data.frame of Bayes-features, as for example previously created using mmb::sampleToBayesFeatures().

Value

data.frame the sample as 1-row data.frame.

Author(s)

Sebastian Hönel sebastian.honel@lnu.se

Examples

samp <- mmb::sampleToBayesFeatures(dfRow = iris[15,], targetCol = "Species")

# Convert the sample (as features) back to a sample that can be, e.g.,
# appended to the data again:
row <- mmb::bayesFeaturesToSample(dfOrg = iris, features = samp)

[Package mmb version 0.13.3 Index]