
Last chance! 50% off unlimited learning
Sale ends in
cptable(v, pa = NULL, values = NULL, gmData=NULL, normalize = TRUE, smooth = 0, levels=NULL)
cptspec(x)
gmData
object is given, then 'cpt' returns an object of
class 'ctab' (which is a general representation of a table).
If no gmData
object is given, then
'cpt' returns an object of class 'cptTemplate'.
'cptspec' returns an object of class 'cptspec' (which is just a list
with a special class attribute).normalize=TRUE
then for each configuration of the parents,
"pa", the probabilities are normalized to sum to one.
If smooth
is non--zero then zero entries of
values
are replaced with smooth
before normalization takes place.
If no gmData
object is given, then levels
(giving the
levels of 'v') must be given. Otherwise levels
is ignored.g <- newgmData(letters[1:5],nLevels=2)
t1 <- cptable("a",pa="b", gmData=g,values=1:4)
t2 <- cptable("a",pa=c("b","c"), levels=c("y","n"),values=1:4)
Run the code above in your browser using DataLab