Distribution.Rd
Creates an empty discrete probability distribution, i.e. a probability distribution defined over an empty set of variables. Dimension of the empty distribution is 0. The constructor is based on Object
function from R.oo package.
Distribution(name, info = "")
name | Name of the new Distribution (for your information about the distribution only). One word is fine enough. |
---|---|
info | Information about the new Distribution (for your information about the distribution only) |
Reference to an empty distribution
Distribution class is an object with 5 private variables: name, info, variables, dim, data
name
Name of the distribution
info
Information about Distribution
variables
Vector of discrete variables used in the distribution (like: "A" "B" "C", default:NULL)
dim
Dimension of the distribution, ie. number of variables \(n\)
data
Data.table of \(n+1\) columns where \(n\) is the number of random variables from variables
. The last column represents a probability of a respective row - see the following table
A | B | C | D | MUDIM.frequency |
0 | 0 | 0 | 1 | 0.25 |
0 | 1 | 0 | 1 | 0.05 |
1 | 0 | 0 | 1 | 0.15 |
1 | 1 | 0 | 1 | 0.35 |
1 | 0 | 1 | 1 | 0.10 |
d <- Distribution("new",info="demo distribution"); d; #as.character...#> Probability distribution #> * Name:new #> * Info:demo distribution #> * Variables: #> * Non-empty items: #> NULL#> [1] 0