JSdistFromP {cummeRbund} | R Documentation

## Jensen-Shannon distance on rows from a pre-defined vector of probabilities

### Description

JSdist takes a matrix of expression probabilites (calculated directly or output from makeprobs()) and returns a matrix of Jensen-Shannon distances between individual rows and a specific vector of probabilities (q)

### Usage

    JSdistFromP(mat,q)

### Arguments

`mat` | A matrix of expression probabilities (e.g. from makeprobs())
`q` | A vector of expression probabilities.

### Details

Returns Jensen-Shannon distance for each row of a matrix of probabilities against a provided probability distribution (q)

### Value

A vector of JS distances

### Note

None

### Author(s)

Loyal A. Goff

### References

None

### Examples

    mat<-matrix(sample(1:50,50),10)
    q<-c(100,4,72,8,19)
    q<-q/sum(q)
    js.distance<-JSdistFromP(mat,q)

[Package cummeRbund version 2.34.0 Index]