nearest_cosine: Calculate nearest point by cosine similarity

Description Usage Arguments Details Value See Also

Description

Applying EM to each individual point. Like a separate mixture model for every journal.

Usage

1
nearest_cosine(idx, citations, communities, self = TRUE)

Arguments

idx

A journal name or index. Vectorised for nearest_profile()

citations

a matrix of citations (from columns to rows) or an igraph object

communities

A membership vector or igraph::communities object

self

logical. Include self-citations? If FALSE, they will not be counted.

Details

Find the nearest citation profile to x that is a convex combination of the community profiles y.

In order for an n-vector to be a citation profile, the elements must be non-negative and sum to one. This is also true for any convex combination (finite mixture distribution) of citation profiles.

Geometrically, this represents a point on part of the surface of the unit n-1-sphere that is within the positive closed orthant in R^n. In a 3-journal network, this corresponds to the eighth of the unit sphere in the first octant and in a 2-journal network, the quarter of the unit circle in the first quadrant.

The largest possible angle between two valid citation profiles is θ = π/2, with cosine similarity cos θ = 0. For example, the most well-separated profiles in 2-d are (1, 0) and (0, 1) — i.e. the x-axis and the y-axis.

Value

An object exactly like that returned by nearest_point(). Use $cosine to extract the cosine similarity.

See Also

nearest_point(), cosine_similarity()


Selbosh/scrooge documentation built on May 5, 2019, 8 p.m.