View source: R/stablelearner.R

accuracy | R Documentation |

Function to compute the prediction accuracy from an object
of class `"stablelearner"`

or `"stablelearnerList"`

as a parallel
to the similarity values estimated by `stability`

in each
iteration of the stability assessment procedure.

```
accuracy(x, measure = "kappa", na.action = na.exclude,
applyfun = NULL, cores = NULL)
```

`x` |
an object of class |

`measure` |
a character string (or a vector of character strings).
Name(s) of the measure(s) used to compute accuracy. Currently implemented
measures are |

`na.action` |
a function which indicates what should happen to the predictions
of the results containing |

`applyfun` |
a |

`cores` |
integer. The number of cores to use in multicore computations
using |

This function can be used to compute prediction accuracy after the stability was
estimated using `stability`

.

A matrix of size `2*B`

times length(`measure`

) containing prediction
accuracy values of the learners trained during the stability assessment procedure.

`stability`

```
library("partykit")
res <- ctree(Species ~ ., data = iris)
stab <- stability(res)
accuracy(stab)
```

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.