BlockMatrix is 3 dimensional matrix where the rows are grouped It is useful for when we want to multiply groups of vectors only between themselves.
BlockMatrix is 3 dimensional matrix where the rows are grouped It is useful for when we want to multiply groups of vectors only between themselves. For example, grouping users by countries and calculating products only between users from the same country
This uses standard join if the matrices are comparable size and large, otherwise, if one is much smaller than the other, we use a hash join
Params: minCos: the minimum cosine similarity you care about accuracy for delta: the error on the approximated cosine (e.g.
Params: minCos: the minimum cosine similarity you care about accuracy for delta: the error on the approximated cosine (e.g. 0.05 = 5%) boundedProb: the probability we have larger than delta error see: http://arxiv.org/pdf/1206.2082v2.pdf for more details
Represents an Edge in a graph with some edge data
This algothm is just matrix multiplication done by hand to make it clearer when we do the sampling implementation
This is the future Matrix API.
This is the future Matrix API. The old one will be removed in scalding 0.10.0 (or 1.0.0).
Create Matrix2 instances with methods in the Matrix2 object. Note that this code optimizes the order in which it evaluates matrices, and replaces equivalent terms to avoid recomputation. Also, this code puts the parenthesis in the optimal place in terms of size according to the sizeHints. For instance: (A*B)*C == A*(B*C) but if B is a 10 x 106 matrix, and C is 106 x 100, it is better to do the B*C product first in order to avoid storing as much intermediate output.
NOTE THIS REQUIREMENT: for each formula, you can only have one Ring[V] in scope. If you evaluate part of the formula with one Ring, and another part with another, you must go through a TypedPipe (call toTypedPipe) or the result may not be correct.
Abstracts the approach taken to join the two matrices
This trait allows users to plug in join algorithms where they are needed to improve products and propagations.
This trait allows users to plug in join algorithms where they are needed to improve products and propagations. The default works well in most cases, but highly skewed matrices may need some special handling
This is the enrichment pattern on Mappable[T] for converting to Matrix types
Matrix class - represents an infinite (hopefully sparse) matrix.
Matrix class - represents an infinite (hopefully sparse) matrix. any elements without a row are interpretted to be zero. the pipe hold ('rowIdx, 'colIdx, 'val) where in principle each row/col/value type is generic, with the constraint that ValT is a Ring[T] In practice, RowT and ColT are going to be Strings, Integers or Longs in the usual case.
WARNING: It is NOT OKAY to use the same instance of Matrix/Row/Col with DIFFERENT Monoids/Rings/Fields. If you want to change, midstream, the Monoid on your ValT, you have to construct a new Matrix. This is due to caching of internal computation graphs.
RowVector - handles matrices of row dimension one. It is the result of some of the matrix methods and has methods that return ColVector and diagonal matrix
ColVector - handles matrices of col dimension one. It is the result of some of the matrix methods and has methods that return RowVector and diagonal matrix
Infinite column vector - only for intermediate computations
Infinite row vector - only for intermediate computations
Generating Poisson-distributed random variables according to Donald Knuth's algorithm as shown on Wikipedia's Poisson Distribution page
Class representing a matrix product
Class representing a matrix product
multiplicand
multiplier
a HashMap of common subtrees; None if possibly not optimal (did not go through optimize), Some(...) with a HashMap that was created in optimize
A representation of a scalar value that can be used with Matrices
Serve as a repo for self-contained combinatorial functions with no dependencies such as combinations, aka n choose k, nCk permutations , aka nPk subset sum : numbers that add up to a finite sum weightedSum: For weights (a,b,c, ...), want integers (x,y,z,...) to satisfy constraint |ax + by + cz + ...
Serve as a repo for self-contained combinatorial functions with no dependencies such as combinations, aka n choose k, nCk permutations , aka nPk subset sum : numbers that add up to a finite sum weightedSum: For weights (a,b,c, ...), want integers (x,y,z,...) to satisfy constraint |ax + by + cz + ... - result | < error ...
TODO: Muliplication is the expensive stuff.
TODO: Muliplication is the expensive stuff. We need to optimize the methods below: This object holds the implicits to handle matrix products between various types
Allows us to sort matrices by approximate type