bayesFeaturesToSample: Transform a collection of Bayesian features back to a sample.

Description Usage Arguments Value Author(s) Examples

View source: R/bayesFeature.R

Description

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

Usage

1
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

1
2
3
4
5
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)

mmb documentation built on Oct. 23, 2020, 5:21 p.m.