-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathaddSimilarities.Rd
39 lines (37 loc) · 1.1 KB
/
addSimilarities.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/similarities.R
\name{addSimilarities}
\alias{addSimilarities}
\title{Additive integration of similarities}
\usage{
addSimilarities(x, bio_mat, weights = c(0.5, 0.18, 0.1, 0.22))
}
\arguments{
\item{x}{A matrix with the similarity of expression}
\item{bio_mat}{A list of matrices of the same dimension as x.}
\item{weights}{A numeric vector of weight to multiply each similarity}
}
\value{
A square matrix of the same dimensions as the input matrices.
}
\description{
Function that use the previously calculated similarities into a single
similarity matrix.
}
\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.
}
\examples{
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))
}
\seealso{
\code{\link[=similarities]{similarities()}}, \code{\link[=weighted]{weighted()}}.
}
\author{
Lluís Revilla
}