Synthesis of Document Similarity

Share:

Description

This function synthesize the similarity.

Usage

1
simSyn(sims, weight)

Arguments

sims

List of similarity matrix.

weight

Weight vector of similarity matrix.

Value

Weighted sum of similarity matrix

Author(s)

Masaaki TAKADA

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
## The function is currently defined as
function (sims, weight) 
{
    len = length(sims)
    if (len != length(weight)) {
        stop(message = "different lengths between sims and weight")
    }
    sim <- weight[1] * sims[[1]]
    for (i in 2:len) {
        sim <- sim + weight[i] * sims[[i]]
    }
    return(sim)
  }