R/bayes.R
    bayesComputeMarginalFactor.RdComputes the probability (discrete feature) or relative likelihood (continuous feature) of one given feature and a concrete value for it.
bayesComputeMarginalFactor(df, feature, doEcdf = FALSE)
| df | data.frame that contains all the feature's data  | 
    
|---|---|
| feature | data.frame containing the designated feature as created
by @seealso   | 
    
| doEcdf | default FALSE a boolean to indicate whether to use the empirical CDF to return a probability when inferencing a continuous feature. If false, uses the empirical PDF to return the rel. likelihood. This parameter does not have any effect when inferring discrete values. Using the ECDF, a probability to find a value less than or equal to the given value is returned.  | 
    
numeric the probability or likelihood of the given feature assuming its given value.
feat <- mmb::createFeatureForBayes( name = "Petal.Length", value = mean(iris$Petal.Length)) mmb::bayesComputeMarginalFactor(df = iris, feature = feat)#> [1] 0.1258313mmb::bayesComputeMarginalFactor(df = iris, feature = feat, doEcdf = TRUE)#> [1] 0.38