breeze

linalg

package linalg

This package contains everything relating to Vectors, Matrices, Tensors, etc.

If you're doing basic work, you probably want breeze.linalg.DenseVector and breeze.linalg.DenseMatrix, which support most operations. We also have breeze.linalg.SparseVectors and (basic!) support for a sparse matrix (breeze.linalg.CSCMatrix).

This package object contains Matlab-esque functions for interacting with tensors and matrices.

Linear Supertypes
LinearAlgebra, AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. linalg
  2. LinearAlgebra
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. sealed trait Axis extends AnyRef

    This trait is commonly used for breeze.linalg.

  2. trait Broadcasted[+T] extends NumericOps[Broadcasted[T]]

    TODO

  3. case class BroadcastedColumns[T](underlying: T) extends BroadcastedLike[T, BroadcastedColumns[T]] with Product with Serializable

    Class for classes that are broadcasting their columns.

  4. trait BroadcastedLike[T, Self <: Broadcasted[T]] extends Broadcasted[T] with NumericOps[Self]

  5. case class BroadcastedRows[T](underlying: T) extends BroadcastedLike[T, BroadcastedRows[T]] with Product with Serializable

    Class for classes that are broadcasting their rows.

  6. class Broadcaster extends AnyRef

  7. class CSCMatrix[V] extends Matrix[V] with MatrixLike[V, CSCMatrix[V]]

    A compressed sparse column matrix, as used in Matlab and CSparse, etc.

  8. trait CSCMatrixOps_Complex extends AnyRef

    This is an auto-generated trait providing operators for CSCMatrix

  9. trait CSCMatrixOps_Double extends AnyRef

    This is an auto-generated trait providing operators for CSCMatrix

  10. trait CSCMatrixOps_Float extends AnyRef

    This is an auto-generated trait providing operators for CSCMatrix

  11. trait CSCMatrixOps_Int extends AnyRef

    This is an auto-generated trait providing operators for CSCMatrix

  12. trait Counter[K, V] extends Tensor[K, V] with CounterLike[K, V, Map[K, V], Counter[K, V]]

  13. trait Counter2[K1, K2, V] extends Tensor[(K1, K2), V] with Counter2Like[K1, K2, V, [V]Map[K1, V], Counter[K2, V], Counter2[K1, K2, V]]

  14. trait Counter2Like[K1, K2, V, +M1[VV] <: Map[K1, VV], +T <: Counter[K2, V], +This <: Counter2[K1, K2, V]] extends TensorLike[(K1, K2), V, This]

    A map-like tensor that acts like a collection of key-value pairs where the set of values may grow arbitrarily.

  15. trait Counter2Ops extends AnyRef

  16. trait CounterLike[K, V, +M <: Map[K, V], +This <: Counter[K, V]] extends TensorLike[K, V, This] with Serializable

    A map-like tensor that acts like a collection of key-value pairs where the set of values may grow arbitrarily.

  17. trait CounterOps extends AnyRef

  18. final class DenseMatrix[V] extends Matrix[V] with MatrixLike[V, DenseMatrix[V]] with Serializable

    A DenseMatrix is a matrix with all elements found in an array.

  19. trait DenseMatrixMultOps_Complex extends DenseMatrixOps_Complex

    This is an auto-generated trait providing multiplication for DenseMatrix

  20. trait DenseMatrixMultOps_Double extends DenseMatrixOps_Double

    This is an auto-generated trait providing multiplication for DenseMatrix

  21. trait DenseMatrixMultOps_Float extends DenseMatrixOps_Float

    This is an auto-generated trait providing multiplication for DenseMatrix

  22. trait DenseMatrixMultOps_Int extends DenseMatrixOps_Int

    This is an auto-generated trait providing multiplication for DenseMatrix

  23. trait DenseMatrixMultiplyStuff extends DenseMatrixOps_Double with DenseMatrixMultOps_Double

  24. trait DenseMatrixOps_Complex extends DenseMatrixOps_Complex_Generic

    This is an auto-generated trait providing operators for DenseMatrix.

  25. trait DenseMatrixOps_Complex_Generic extends LowPriorityDenseMatrix

    This is an auto-generated trait providing operators for DenseMatrix.

  26. trait DenseMatrixOps_Double extends DenseMatrixOps_Double_Generic

    This is an auto-generated trait providing operators for DenseMatrix.

  27. trait DenseMatrixOps_Double_Generic extends LowPriorityDenseMatrix

    This is an auto-generated trait providing operators for DenseMatrix.

  28. trait DenseMatrixOps_Float extends DenseMatrixOps_Float_Generic

    This is an auto-generated trait providing operators for DenseMatrix.

  29. trait DenseMatrixOps_Float_Generic extends LowPriorityDenseMatrix

    This is an auto-generated trait providing operators for DenseMatrix.

  30. trait DenseMatrixOps_Int extends DenseMatrixOps_Int_Generic

    This is an auto-generated trait providing operators for DenseMatrix.

  31. trait DenseMatrixOps_Int_Generic extends LowPriorityDenseMatrix

    This is an auto-generated trait providing operators for DenseMatrix.

  32. class DenseVector[E] extends StorageVector[E] with VectorLike[E, DenseVector[E]] with Serializable

    A DenseVector is the "obvious" implementation of a Vector, with one twist.

  33. trait DenseVectorOps_Complex extends DenseVectorOps_Complex_Generic

    This is an auto-generated trait providing operators for DenseVector.

  34. trait DenseVectorOps_Complex_Generic extends DenseVector_GenericOps

    This is an auto-generated trait providing operators for DenseVector.

  35. trait DenseVectorOps_Double extends DenseVectorOps_Double_Generic

    This is an auto-generated trait providing operators for DenseVector.

  36. trait DenseVectorOps_Double_Generic extends DenseVector_GenericOps

    This is an auto-generated trait providing operators for DenseVector.

  37. trait DenseVectorOps_Float extends DenseVectorOps_Float_Generic

    This is an auto-generated trait providing operators for DenseVector.

  38. trait DenseVectorOps_Float_Generic extends DenseVector_GenericOps

    This is an auto-generated trait providing operators for DenseVector.

  39. trait DenseVectorOps_HashVector_Complex extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and HashVector

  40. trait DenseVectorOps_HashVector_Double extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and HashVector

  41. trait DenseVectorOps_HashVector_Float extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and HashVector

  42. trait DenseVectorOps_HashVector_Int extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and HashVector

  43. trait DenseVectorOps_Int extends DenseVectorOps_Int_Generic

    This is an auto-generated trait providing operators for DenseVector.

  44. trait DenseVectorOps_Int_Generic extends DenseVector_GenericOps

    This is an auto-generated trait providing operators for DenseVector.

  45. trait DenseVectorOps_SparseVector_Complex extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and SparseVector

  46. trait DenseVectorOps_SparseVector_Double extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and SparseVector

  47. trait DenseVectorOps_SparseVector_Float extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and SparseVector

  48. trait DenseVectorOps_SparseVector_Int extends AnyRef

    This is an auto-generated trait providing operators for DenseVector and SparseVector

  49. trait DenseVector_GenericOps extends AnyRef

  50. trait DenseVector_SpecialOps extends DenseVectorOps_Double

  51. class HashVector[E] extends Vector[E] with VectorLike[E, HashVector[E]]

    A HashVector is a sparse vector backed by an OpenAddressHashArray

  52. trait HashVectorOps_Complex extends AnyRef

    This is an auto-generated trait providing operators for HashVector.

  53. trait HashVectorOps_Double extends AnyRef

    This is an auto-generated trait providing operators for HashVector.

  54. trait HashVectorOps_Float extends AnyRef

    This is an auto-generated trait providing operators for HashVector.

  55. trait HashVectorOps_Int extends AnyRef

    This is an auto-generated trait providing operators for HashVector.

  56. trait LinearAlgebra extends AnyRef

    Basic linear algebraic operations.

  57. trait LowPriorityCounter2 extends AnyRef

  58. trait LowPriorityDenseMatrix extends LowPriorityDenseMatrix1

  59. trait LowPriorityDenseMatrix1 extends AnyRef

  60. trait Matrix[E] extends MatrixLike[E, Matrix[E]]

  61. trait MatrixConstructors[Vec[T] <: Matrix[T]] extends AnyRef

  62. class MatrixEmptyException extends IllegalArgumentException

  63. trait MatrixGenericOps extends AnyRef

  64. trait MatrixLike[E, +Self <: Matrix[E]] extends Tensor[(Int, Int), E] with TensorLike[(Int, Int), E, Self]

  65. trait MatrixMultOps_Complex extends AnyRef

    This is an auto-generated trait providing multiplication for Matrix

  66. trait MatrixMultOps_Double extends AnyRef

    This is an auto-generated trait providing multiplication for Matrix

  67. trait MatrixMultOps_Float extends AnyRef

    This is an auto-generated trait providing multiplication for Matrix

  68. trait MatrixMultOps_Int extends AnyRef

    This is an auto-generated trait providing multiplication for Matrix

  69. class MatrixNotSquareException extends IllegalArgumentException

  70. class MatrixNotSymmetricException extends IllegalArgumentException

  71. class MatrixSingularException extends RuntimeException

    Thrown when trying to solve using a singular matrix.

  72. class NormCacheDecorator[E] extends Vector[E]

    This decorator automatically caches the norm and sums of a vector and invalidates the cache whenever the vector is updated.

  73. class NotConvergedException extends RuntimeException

    Exception thrown if a routine has not converged.

  74. trait NumericOps[+This] extends AnyRef

    In some sense, this is the real root of the linalg hierarchy.

  75. sealed trait QuasiTensor[K, V] extends AnyRef

    We occasionally need a Tensor that doesn't extend NumericOps directly.

  76. implicit final class RichIntMethods extends AnyVal

    for adding slicing

  77. class SliceMatrix[K1, K2, V] extends Matrix[V]

  78. class SliceVector[K, V] extends Vector[V]

    A SliceVector is a vector that is a view of another underlying tensor.

  79. class SparseVector[E] extends StorageVector[E] with VectorLike[E, SparseVector[E]] with Serializable

    A Binary-search backed vector.

  80. trait SparseVectorOps_Complex extends AnyRef

    This is an auto-generated trait providing operators for SparseVector

  81. trait SparseVectorOps_Double extends AnyRef

    This is an auto-generated trait providing operators for SparseVector

  82. trait SparseVectorOps_Float extends AnyRef

    This is an auto-generated trait providing operators for SparseVector

  83. trait SparseVectorOps_Int extends AnyRef

    This is an auto-generated trait providing operators for SparseVector

  84. trait StorageVector[E] extends Vector[E] with Storage[E]

  85. trait Tensor[K, V] extends TensorLike[K, V, Tensor[K, V]]

    A Tensor defines a map from an index set to a set of values.

  86. trait TensorLike[K, V, +This <: Tensor[K, V]] extends QuasiTensor[K, V] with NumericOps[This]

  87. trait Vector[E] extends VectorLike[E, Vector[E]]

    A Vector represents the mathematical concept of a vector in math.

  88. class VectorBuilder[E] extends NumericOps[VectorBuilder[E]] with Serializable

    A VectorBuilder is basically an unsorted Sparse Vector.

  89. trait VectorBuilderOps_Double extends AnyRef

  90. trait VectorConstructors[Vec[T] <: Vector[T]] extends AnyRef

    Trait that can mixed to companion objects to enable utility methods for creating vectors.

  91. trait VectorLike[E, +Self <: Vector[E]] extends Tensor[Int, E] with TensorLike[Int, E, Self]

    Trait for operators and such used in vectors.

  92. trait VectorOps_Complex extends AnyRef

    This is an auto-generated trait providing operators for Vector.

  93. trait VectorOps_Double extends AnyRef

    This is an auto-generated trait providing operators for Vector.

  94. trait VectorOps_Float extends AnyRef

    This is an auto-generated trait providing operators for Vector.

  95. trait VectorOps_Int extends AnyRef

    This is an auto-generated trait providing operators for Vector.

  96. sealed trait View extends AnyRef

    Trait used for methods that can return a view or a copy.

Value Members

  1. object * extends Broadcaster

  2. object Axis

  3. object BroadcastedColumns extends Serializable

  4. object BroadcastedRows extends Serializable

  5. object Broadcaster

  6. object CSCMatrix extends MatrixConstructors[CSCMatrix] with CSCMatrixOps_Int with CSCMatrixOps_Float with CSCMatrixOps_Double with CSCMatrixOps_Complex

  7. object Counter extends CounterOps with Serializable

  8. object Counter2 extends LowPriorityCounter2 with Counter2Ops

  9. object DenseMatrix extends LowPriorityDenseMatrix with DenseMatrixOps_Int with DenseMatrixOps_Float with DenseMatrixOps_Double with DenseMatrixOps_Complex with DenseMatrixMultOps_Int with DenseMatrixMultOps_Float with DenseMatrixMultOps_Double with DenseMatrixMultOps_Complex with DenseMatrixMultiplyStuff with MatrixConstructors[DenseMatrix] with Serializable

  10. object DenseVector extends VectorConstructors[DenseVector] with DenseVector_GenericOps with DenseVectorOps_Int with DenseVectorOps_Float with DenseVectorOps_Double with DenseVectorOps_Complex with DenseVectorOps_SparseVector_Double with DenseVectorOps_SparseVector_Float with DenseVectorOps_SparseVector_Int with DenseVectorOps_SparseVector_Complex with DenseVectorOps_HashVector_Double with DenseVectorOps_HashVector_Float with DenseVectorOps_HashVector_Int with DenseVectorOps_HashVector_Complex with DenseVector_SpecialOps with Serializable

  11. object HashVector extends HashVectorOps_Int with HashVectorOps_Float with HashVectorOps_Double with HashVectorOps_Complex

  12. def LU[T](X: Matrix[T])(implicit td: (T) ⇒ Double): (DenseMatrix[Double], Array[Int])

    Computes the LU factorization of the given real M-by-N matrix X such that X = P * L * U where P is a permutation matrix (row exchanges).

    Computes the LU factorization of the given real M-by-N matrix X such that X = P * L * U where P is a permutation matrix (row exchanges).

    Upon completion, a tuple consisting of a matrix A and an integer array P.

    The upper triangular portion of A resembles U whereas the lower triangular portion of A resembles L up to but not including the diagonal elements of L which are all equal to 1.

    For 0 <= i < M, each element P(i) denotes whether row i of the matrix X was exchanged with row P(i-1) during computation (the offset is caused by the internal call to LAPACK).

    Definition Classes
    LinearAlgebra
  13. object LinearAlgebra extends LinearAlgebra

  14. object Matrix extends MatrixConstructors[Matrix] with MatrixGenericOps with MatrixMultOps_Double with MatrixMultOps_Float with MatrixMultOps_Int with MatrixMultOps_Complex

  15. object MutableInnerProductSpaceDenseMatrixDouble

    Import this to provide access to a DenseMatrix[Double] as a MutableInnerProductSpace, so it can be used in optimization.

  16. object NotConvergedException extends Serializable

  17. object NumericOps

  18. object SparseVector extends SparseVectorOps_Int with SparseVectorOps_Float with SparseVectorOps_Double with SparseVectorOps_Complex with Serializable

  19. object Tensor

  20. object Vector extends VectorOps_Int with VectorOps_Double with VectorOps_Float with VectorOps_Complex

  21. object VectorBuilder extends VectorBuilderOps_Double with Serializable

  22. object View

  23. def axpy[A, X, Y](a: A, x: X, y: Y)(implicit axpy: CanAxpy[A, X, Y]): Unit

    Computes y += x * a, possibly doing less work than actually doing that operation

  24. def canLoadNativeBlas: Boolean

    Attempts to load the NativeBlas libraries.

    Attempts to load the NativeBlas libraries. Returns false if we can't.

    returns

  25. def cholesky(X: Matrix[Double]): DenseMatrix[Double]

    Computes the cholesky decomposition A of the given real symmetric positive definite matrix X such that X = A A.

    Computes the cholesky decomposition A of the given real symmetric positive definite matrix X such that X = A A.t.

    XXX: For higher dimensionalities, the return value really should be a sparse matrix due to its inherent lower triangular nature.

    Definition Classes
    LinearAlgebra
  26. def copy[T](t: T)(implicit canCopy: CanCopy[T]): T

    Copy a T.

    Copy a T. Most tensor objects have a CanCopy implicit, which is what this farms out to.

  27. def cross[V1](a: DenseVector[V1], b: DenseVector[V1])(implicit ring: Ring[V1], man: ClassTag[V1]): DenseVector[V1]

    Vector cross product of 3D vectors a and b.

    Vector cross product of 3D vectors a and b.

    Definition Classes
    LinearAlgebra
  28. def csvread(file: File, separator: Char = ',', quote: Char = '"', escape: Char = '\\', skipLines: Int = 0): DenseMatrix[Double]

    Reads in a DenseMatrix from a CSV File

  29. def csvwrite(file: File, mat: Matrix[Double], separator: Char = ',', quote: Char = '\0', escape: Char = '\\', skipLines: Int = 0): Unit

  30. def det[T](X: Matrix[T])(implicit td: (T) ⇒ Double): Double

    Computes the determinant of the given real matrix.

    Computes the determinant of the given real matrix.

    Definition Classes
    LinearAlgebra
  31. def diag[V](t: DenseVector[V])(implicit arg0: ClassTag[V], arg1: DefaultArrayValue[V]): DenseMatrix[V]

    Creates a Diagonal dense matrix from this vector.

    Creates a Diagonal dense matrix from this vector.

    TODO make a real diagonal matrix class

    V
    t
    returns

  32. def diag[V](m: DenseMatrix[V]): DenseVector[V]

    returns a vector along the diagonal of v.

    returns a vector along the diagonal of v. Requires a square matrix?

    V

    m

    the matrix

  33. def eig(m: Matrix[Double]): (DenseVector[Double], DenseVector[Double], DenseMatrix[Double])

    Eigenvalue decomposition (right eigenvectors)

    Eigenvalue decomposition (right eigenvectors)

    This function returns the real and imaginary parts of the eigenvalues, and the corresponding eigenvectors. For most (?) interesting matrices, the imaginary part of all eigenvalues will be zero (and the corresponding eigenvectors will be real). Any complex eigenvalues will appear in complex-conjugate pairs, and the real and imaginary components of the eigenvector for each pair will be in the corresponding columns of the eigenvector matrix. Take the complex conjugate to find the second eigenvector.

    Based on EVD.java from MTJ 0.9.12

    Definition Classes
    LinearAlgebra
  34. def eigSym(X: Matrix[Double], rightEigenvectors: Boolean): (DenseVector[Double], Option[DenseMatrix[Double]])

    Computes all eigenvalues (and optionally right eigenvectors) of the given real symmetric matrix X.

    Computes all eigenvalues (and optionally right eigenvectors) of the given real symmetric matrix X.

    Definition Classes
    LinearAlgebra
  35. def inv[T](X: Matrix[T])(implicit td: (T) ⇒ Double): DenseMatrix[Double]

    Computes the inverse of a given real matrix.

    Computes the inverse of a given real matrix.

    Definition Classes
    LinearAlgebra
  36. def kron[V1, V2, M, RV](a: DenseMatrix[V1], b: M)(implicit mul: BinaryOp[V1, M, OpMulScalar, DenseMatrix[RV]], asMat: <:<[M, Matrix[V2]], man: ClassTag[RV], dfv: DefaultArrayValue[RV]): DenseMatrix[RV]

    Returns the Kronecker product of the two matrices a and b, usually denoted a ⊗ b.

    Returns the Kronecker product of the two matrices a and b, usually denoted a ⊗ b.

    Definition Classes
    LinearAlgebra
  37. def linspace(a: Double, b: Double, length: Int = 100): DenseVector[Double]

    Generates a vector of linearly spaced values between a and b (inclusive).

    Generates a vector of linearly spaced values between a and b (inclusive). The returned vector will have length elements, defaulting to 100.

  38. def logAndNormalize[T, Axis, V, Result](value: T, axis: Axis)(implicit collapse: CanCollapseAxis[T, Axis, V, V, Result], view: (V) ⇒ NumericOps[V], red: UReduceable[V, Double], map: CanMapValues[V, Double, Double, V], op: BinaryOp[V, Double, OpSub, V]): Result

    logs and then logNormalizes the argument along axis such that each softmax is 0.

    logs and then logNormalizes the argument along axis such that each softmax is 0.0. Returns value if value's softmax is -infinity

  39. def logAndNormalize[V](value: V)(implicit view: (V) ⇒ NumericOps[V], red: UReduceable[V, Double], map: CanMapValues[V, Double, Double, V], op: BinaryOp[V, Double, OpSub, V]): V

    logs and then logNormalizes the argument such that the softmax is 0.

    logs and then logNormalizes the argument such that the softmax is 0.0. Returns value if value's softmax is -infinity

  40. def logNormalize[T, Axis, V, Result](value: T, axis: Axis)(implicit collapse: CanCollapseAxis[T, Axis, V, V, Result], view: (V) ⇒ NumericOps[V], red: UReduceable[V, Double], map: CanMapValues[V, Double, Double, V], op: BinaryOp[V, Double, OpSub, V]): Result

    logs and then logNormalizes the argument along axis such that each softmax is 0.

    logs and then logNormalizes the argument along axis such that each softmax is 0.0. Returns value if value's softmax is -infinity

  41. def logNormalize[V, K](value: V)(implicit view: (V) ⇒ NumericOps[V], red: UReduceable[V, Double], op: BinaryOp[V, Double, OpSub, V]): V

    logNormalizes the argument such that the softmax is 0.

    logNormalizes the argument such that the softmax is 0.0. Returns value if value's softmax is -infinity

  42. def lowerTriangular[T](X: Matrix[T])(implicit arg0: Semiring[T], arg1: ClassTag[T], arg2: DefaultArrayValue[T]): DenseMatrix[T]

    The lower triangular portion of the given real quadratic matrix X.

    The lower triangular portion of the given real quadratic matrix X. Note that no check will be performed regarding the symmetry of X.

    Definition Classes
    LinearAlgebra
  43. val max: URFunc[Double, Double]

    Computes the max, aka the infinity norm.

  44. val mean: URFunc[Double, Double]

    A breeze.generic.URFunc for computing the mean of objects

  45. val meanAndVariance: URFunc[Double, (Double, Double)]

    A breeze.generic.URFunc for computing the mean and variance of objects.

    A breeze.generic.URFunc for computing the mean and variance of objects. This uses an efficient, numerically stable, one pass algorithm for computing both the mean and the variance.

  46. val min: URFunc[Double, Double]

    Computes the minimum.

  47. def norm[T](t: T, v: Double = 2)(implicit canNorm: CanNorm[T]): Double

    Computes the norm of an object.

    Computes the norm of an object. Many tensor objects have a CanNorm implicit, which is what this calls.

  48. def normalize[T, Axis, V, Result](value: T, axis: Axis, n: Double)(implicit collapse: CanCollapseAxis[T, Axis, V, V, Result], div: BinaryOp[V, Double, OpDiv, V], canNorm: CanNorm[V], dav: DefaultArrayValue[V]): Result

    Normalizes the argument along each axis such that each row along the axis has norm 1.

    Normalizes the argument along each axis such that each row along the axis has norm 1.0 (with respect to the argument n). Each column is unchanged if it's norm is 0

  49. def normalize[T, U >: T](t: T, n: Double = 2)(implicit div: BinaryOp[T, Double, OpDiv, U], canNorm: CanNorm[T], dav: DefaultArrayValue[T]): U

    Normalizes the argument such that its norm is 1.

    Normalizes the argument such that its norm is 1.0 (with respect to the argument n). Returns value if value's norm is 0.

  50. package operators

  51. def pinv[V](X: DenseMatrix[V])(implicit cast: (V) ⇒ Double): DenseMatrix[Double]

    Computes the Moore-Penrose pseudo inverse of the given real matrix X.

    Computes the Moore-Penrose pseudo inverse of the given real matrix X.

    Definition Classes
    LinearAlgebra
  52. def pinv(X: DenseMatrix[Double]): DenseMatrix[Double]

    Computes the Moore-Penrose pseudo inverse of the given real matrix X.

    Computes the Moore-Penrose pseudo inverse of the given real matrix X.

    Definition Classes
    LinearAlgebra
  53. def pow(m: DenseMatrix[Double], exp: Double): DenseMatrix[Double]

    Raises m to the exp'th power via eigenvalue decomposition.

    Raises m to the exp'th power via eigenvalue decomposition. Currently requires that m's eigenvalues are real.

    m
    exp

    Definition Classes
    LinearAlgebra
  54. def qr(A: DenseMatrix[Double], skipQ: Boolean = false): (DenseMatrix[Double], DenseMatrix[Double])

    QR Factorization

    QR Factorization

    A

    m x n matrix

    skipQ

    (optional) if true, don't reconstruct orthogonal matrix Q (instead returns (null,R))

    returns

    (Q,R) Q: m x m R: m x n

    Definition Classes
    LinearAlgebra
  55. def qrp(A: DenseMatrix[Double]): (DenseMatrix[Double], DenseMatrix[Double], DenseMatrix[Int], Array[Int])

    QR Factorization with pivoting

    QR Factorization with pivoting

    input: A m x n matrix output: (Q,R,P,pvt) where AP = QR Q: m x m R: m x n P: n x n : permutation matrix (P(pvt(i),i) = 1) pvt : pivot indices

    Definition Classes
    LinearAlgebra
  56. def rank(m: DenseMatrix[Double], tol: Option[Double] = None): Int

    Computes the rank of a DenseMatrix[Double].

    Computes the rank of a DenseMatrix[Double].

    The rank of the matrix is computed using the SVD method. The singular values of the SVD which are greater than a specified tolerance are counted.

    m

    matrix for which to compute the rank

    tol

    optional tolerance for singular values. If not supplied, the default tolerance is: max(m.cols, m.rows) * eps * sigma_max, where eps is the machine epsilon and sigma_max is the largest singular value of m.

    returns

    the rank of the matrix (number of singular values)

    Definition Classes
    LinearAlgebra
  57. def ranks[V](x: Vector[V])(implicit arg0: Ordering[V]): Array[Double]

    Returns the rank of each element in the given vector, adjusting for ties.

    Returns the rank of each element in the given vector, adjusting for ties.

    Definition Classes
    LinearAlgebra
  58. val softmax: URFunc[Double, Double]

    Computes the softmax (a.

    Computes the softmax (a.k.a. logSum) of an object. Softmax is defined as \log \sum_i \exp(x(i)), but implemented in a more numerically stable way. Softmax is so-called because it is a differentiable function that tends to look quite a lot like max. Consider log(exp(30) + exp(10)). That's basically 30. We use softmax a lot in machine learning.

  59. val stddev: URFunc[Double, Double]

    Computes the standard deviation by calling variance and then sqrt'ing

  60. val sum: URFunc[Double, Double]

  61. package support

  62. def svd(mat: DenseMatrix[Double]): (DenseMatrix[Double], DenseVector[Double], DenseMatrix[Double])

    Computes the SVD of a m by n matrix Returns an m*m matrix U, a vector of singular values, and a n*n matrix V'

    Computes the SVD of a m by n matrix Returns an m*m matrix U, a vector of singular values, and a n*n matrix V'

    Definition Classes
    LinearAlgebra
  63. def upperTriangular[T](X: Matrix[T])(implicit arg0: Semiring[T], arg1: ClassTag[T], arg2: DefaultArrayValue[T]): DenseMatrix[T]

    The upper triangular portion of the given real quadratic matrix X.

    The upper triangular portion of the given real quadratic matrix X. Note that no check will be performed regarding the symmetry of X.

    Definition Classes
    LinearAlgebra
  64. def useNativeLibraries: Boolean

    Returns true if we can use native libraries.

    Returns true if we can use native libraries. You can disable it by writing breeze.linalg.useNativeLibraries to false

  65. def useNativeLibraries_=(v: Boolean): Unit

    Disables or attempts to enable native libraries.

    Disables or attempts to enable native libraries. Will throw a RuntimeException if you try to set the value to true and we can't load the libraries.

    v

  66. val variance: URFunc[Double, Double]

    A breeze.generic.URFunc for computing the variance of objects.

    A breeze.generic.URFunc for computing the variance of objects. The method just calls meanAndVariance and returns the second result.

Inherited from LinearAlgebra

Inherited from AnyRef

Inherited from Any

Ungrouped