MultivariableDistribution: Simulate a data set with multiple features

Description Details Public fields Methods

Description

Simulate a data set with multiple features

Simulate a data set with multiple features

Details

simulating a dataset with more than one feature requires some logic sampling

Public fields

features

the feature names

classes

the class names

weights

the relative weights of each distribution

dists

the distribution as Distribution objects

Methods

Public methods


Method withConditionalDistribution()

adds in a ConditionalDistribution with a class name

Usage
MultivariableDistribution$withConditionalDistribution(
  distribution,
  featureName
)
Arguments
distribution

the pdf as an R6 ConditionalDistribution object (ConditionalDistribution$new(fn, fnParams...))

featureName

the class name


Method withClassWeights()

sets the relative weights of the different outcome classes in the simulation

Usage
MultivariableDistribution$withClassWeights(listWeights)
Arguments
listWeights

the weights as a named list e.g. list(feature1 = 0.1, ...)


Method sample()

produce a set of samples conforming to these distributions

Usage
MultivariableDistribution$sample(n = 1000)
Arguments
n

the number of samples

Returns

a data frame of samples (labelled x) associated with classes (labelled "class")


Method plot()

plot this distributions as pdf and cdf

Usage
MultivariableDistribution$plot()
Arguments
xmin

- the minimum of the support

xmax

- the maximum of the support

Returns

a ggassemble plot object


Method clone()

The objects of this class are cloneable with this method.

Usage
MultivariableDistribution$clone(deep = FALSE)
Arguments
deep

Whether to make a deep clone.


terminological/classifier-result documentation built on March 14, 2020, 8:04 a.m.