Learn R Programming

largeVis (version 0.2.1.1)

buildWijMatrix: buildWijMatrix

Description

Rescale the weights in an edge matrix to match a given perplexity.

Usage

buildWijMatrix(x, threads = NULL, perplexity = 50)

# S3 method for edgematrix buildWijMatrix(x, threads = NULL, perplexity = 50)

# S3 method for TsparseMatrix buildWijMatrix(x, threads = NULL, perplexity = 50)

# S3 method for CsparseMatrix buildWijMatrix(x, threads = NULL, perplexity = 50)

Arguments

x

An edgematrix, either an `edgematrix` object or a sparse matrix.

threads

The maximum number of threads to spawn. Determined automatically if NULL (the default).

perplexity

Given perplexity.

Value

A list with the following components:

'dist'

An [N,K] matrix of the distances to the nearest neighbors.

'id'

An [N,K] matrix of the node indexes of the neartest neighbors. Note that this matrix is 1-indexed, unlike most other matrices in this package.

'k'

The number of nearest neighbors.