View source: R/ExpNBFuzzyParam.R
ExpNBFuzzyParam | R Documentation |
ExpNBFuzzyParam
Fuzzy Exponential Naive Bayes Classifier with Fuzzy parameters
ExpNBFuzzyParam(train, cl, alphacut = 1e-04, metd = 2, cores = 2)
train |
matrix or data frame of training set cases |
cl |
factor of true classifications of training set |
alphacut |
value of the alpha-cut parameter, this value is between 0 and 1. |
metd |
Method of transforming the triangle into scalar, It is the type of data entry for the test sample, use metd 1 if you want to use the Yager technique, metd 2 if you want to use the Q technique of the uniformity test (article: Directional Statistics and Shape analysis), and metd 3 if you want to use the Thorani technique |
cores |
how many cores of the computer do you want to use to use for prediction (default = 2) |
A vector of classifications
rodrigues2016newFuzzyClass
set.seed(1) # determining a seed
data(VirtualRealityData)
# Splitting into Training and Testing
split <- caTools::sample.split(t(VirtualRealityData[, 1]), SplitRatio = 0.7)
Train <- subset(VirtualRealityData, split == "TRUE")
Test <- subset(VirtualRealityData, split == "FALSE")
# ----------------
# matrix or data frame of test set cases.
# A vector will be interpreted as a row vector for a single case.
test <- Test[, -4]
fit_FENB <- ExpNBFuzzyParam(
train = Train[, -4],
cl = Train[, 4], metd = 1, cores = 2
)
pred_FENB <- predict(fit_FENB, test)
head(pred_FENB)
head(Test[, 4])
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.