nb_rank: Predicting label rankings based on the naive Bayes ranking...

Description Usage Arguments Details Value Examples

Description

This function predicts the rankings given prior and conditional probabilities obtained from model_nbr

Usage

1
nb_rank(x, y, new.x, n = 1)

Arguments

x

is n x p matrix of n observations and p training attributes and can have continuous or nominal values.

y

is n x j matrix of label rankings

new.x

is a vector of new attributes

n

is a parameter of 'memory'; that is, how fast past gets forgotten. (see details of time_weights).

Details

This function predicts a ranking for test.x attributes. It initially builds a model for naive Bayes algorithm that calculates priors and conditional label ranking probabilities and then use them to predict rankings. The attributes can be nominal or continuous data.

Value

a numeric vector of ranking

Examples

1
2
3
train.x <- lr.nom[1:16,]
test.x <- lr.nom[17,]
predrank <- nb_rank(train.x,y,test.x,n=1)


Search within the labelrank package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.