Description Usage Arguments Value See Also Examples
View source: R/row_pair_apply.R
One or more fitted heuristics can be passed in. They must all implement predictProbInternal. Users will generally not use the output directly but instead pass this to rowPairApply.
1 |
... |
A list of predictProbInternal implementers, e.g. a fitted ttb model. |
An object of class heuristics, which implements createFunction. Users will generally not use this directly– rowPairApply will.
rowPairApply
which is what heuristicsProb is passed in to.
predictProbInternal
which must be implemented by heuristics in
order to use them with the heuristicsProb() wrapper function.
1 2 3 4 5 6 7 | ## This is typical usage:
data <- cbind(y=c(30,20,10,5), x1=c(1,1,0,0), x2=c(1,1,0,1))
ttb <- ttbModel(data, 1, c(2:ncol(data)))
rowPairApply(data, heuristicsProb(ttb))
## This outputs ttb's predictions for all 6 row pairs of data.
## (It has 6 row pairs because 4*2/2 = 6.) It gets the predictions
## by calling ttb's predictProbInternal.
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.