simSyn {smdc}R Documentation

Synthesis of Document Similarity

Description

This function synthesize the similarity.

Usage

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


## 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)
  }

[Package smdc version 0.0.2 Index]