addSimilarities: Additive integration of similarities

Description Usage Arguments Details Value Author(s) See Also Examples

View source: R/similarities.R

Description

Function that use the previously calculated similarities into a single similarity matrix.

Usage

1
addSimilarities(x, bio_mat, weights = c(0.5, 0.18, 0.1, 0.22))

Arguments

x

A matrix with the similarity of expression

bio_mat

A list of matrices of the same dimension as x.

weights

A numeric vector of weight to multiply each similarity

Details

The total weight can't be higher than 1 to prevent values above 1 but can be below 1. It uses weighted.sum with abs = TRUE internally.

Value

A square matrix of the same dimensions as the input matrices.

Author(s)

Llu<c3><ad>s Revilla

See Also

similarities, weighted.

Examples

1
2
3
4
5
set.seed(100)
a <- seq2mat(LETTERS[1:5], rnorm(10))
b <- seq2mat(LETTERS[1:5], seq(from = 0.1, to = 1, by = 0.1))
sim <- list(b)
addSimilarities(a, sim, c(0.5, 0.5))

BioCor documentation built on Nov. 8, 2020, 4:56 p.m.