distances: Distances for sparse 2d representations

Description Usage Arguments

Description

Distances for sparse 2d representations

Usage

1
2
3
4
5
6
dist_cosine(x, y = NULL, ptrans = "l2", strans = NULL, by = c("primary",
  "secondary", "row", "column"), ref_names = NULL, pairwise = FALSE)

dist_euclidean(x, y = NULL, ptrans = NULL, strans = NULL,
  by = c("primary", "secondary", "row", "column"), ref_names = NULL,
  pairwise = FALSE)

Arguments

x, y

sparse or dense objects supported by simdist. See simdist-package for description of supported types and related terminology.

ptrans, strans

Primary and secondary transformations. Can be either a function, string or a numeric vector. When a function, it must take 3 arguments - an object supported by simdist distance measures, names of a dimension ("primary" or "secondary") and logical na.rm. When a string it must name a transformation function without the semantic prefix (norm_, scale_ or trans_); see link{transformations}. When numeric vector it specifies weights to scale along the corresponding dimension.

by

Dimension along which to perform distance computation. For all supported data structures computation along primary dimension is more or as efficient than along the secondary dimension.

ref_names

reference names for secondary entries. By default both x and y secondary names are used. Secondary entries not in ref_names are discarded from x and y.


vspinu/simdist documentation built on May 3, 2019, 7:09 p.m.