Description Usage Arguments Details Value Author(s) See Also Examples
Build a regression model using a transaction boosting classification by association algorithm. The algorithm is currently in development, and is not yet formally documented.
1 2 3 4 5 |
formula |
A symbolic description of the model to be fitted. Has to be of form |
data |
A data.frame containing the training data. |
support, confidence |
Minimum support and confidence for creating association rules. |
gamma, cost |
Hyperparameters for the bCBA algorithm. |
num_levels |
The number of levels into which the target will be quantized for classification. |
verbose |
Optional logical flag to allow verbose execution, where additional intermediary execution information is printed at runtime. |
parameter, control |
Optional parameter and control lists for apriori. |
sort.parameter |
Ordered vector of arules interest measures (as characters) which are used to sort rules in preprocessing. |
lhs.support |
Logical variable, which, when set to default value of True, indicates that LHS support should be used for rule mining. |
disc.method |
Discretization method for arules discretize function for factorizing numeric input (default: "cluster") |
disc.categories |
Number of discretization categories for arules discretize function for factorizing numeric input (default: 10) |
Uses the bCBA algorithm from arulesCBA to build a transaction-boosted classifier with weighted rules for predicting the target variable. The weighted rules are used in regression by calculating the weighted sum of the means of the class values for the rules which match the new item.
Returns an object of class CBA
representing the trained classifier
with fields:
rules |
the classifier rule base. |
default |
deault class label. |
levels |
levels of the class variable. |
means |
the means of each discretized bucket of the target variable. |
Ian Johnson
predict.CBA
,
bCBA
,
apriori
,
rules
,
transactions
.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | library(arulesCBA)
data(iris)
irisDisc <- as.data.frame(lapply(iris[2:4], function(x) discretize(x, categories=9)))
irisDisc$Sepal.Length <- iris$Sepal.Length
irisDisc$Species <- iris$Species
regressor <- bCBA.regression(Sepal.Length ~ ., irisDisc, support = .01)
result <- predict(regressor, irisDisc)
#Mean squared error
sum((result - iris$Sepal.Length)^2) / length(result)
summary(result)
summary(iris$Sepal.Length)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.