Package

smile

math

Permalink

package math

Mathematical and statistical functions.

Linear Supertypes
Operators, AnyRef, Any
Content Hierarchy
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. math
  2. Operators
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. case class Ax(A: MatrixExpression, x: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  2. case class MatrixAddMatrix(A: MatrixExpression, B: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  3. case class MatrixAddValue(A: MatrixExpression, y: Double) extends MatrixExpression with Product with Serializable

    Permalink
  4. case class MatrixDivMatrix(A: MatrixExpression, B: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  5. case class MatrixDivValue(A: MatrixExpression, y: Double) extends MatrixExpression with Product with Serializable

    Permalink
  6. sealed trait MatrixExpression extends AnyRef

    Permalink
  7. case class MatrixLift(A: DenseMatrix) extends MatrixExpression with Product with Serializable

    Permalink
  8. case class MatrixMulMatrix(A: MatrixExpression, B: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  9. case class MatrixMulValue(A: MatrixExpression, y: Double) extends MatrixExpression with Product with Serializable

    Permalink
  10. case class MatrixMultiplicationChain(A: Seq[MatrixExpression]) extends MatrixExpression with Product with Serializable

    Permalink
  11. case class MatrixMultiplicationExpression(A: MatrixExpression, B: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  12. class MatrixOrderOptimization extends Logging

    Permalink

    Optimizes the order of matrix multiplication chain.

    Optimizes the order of matrix multiplication chain. Matrix multiplication is associative. However, the complexity of matrix multiplication chain is not associative.

  13. case class MatrixSubMatrix(A: MatrixExpression, B: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  14. case class MatrixSubValue(A: MatrixExpression, y: Double) extends MatrixExpression with Product with Serializable

    Permalink
  15. case class MatrixTranspose(A: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  16. trait Operators extends AnyRef

    Permalink

    High level feature selection operators.

  17. case class ValueAddMatrix(y: Double, A: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  18. case class ValueAddVector(y: Double, x: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  19. case class ValueDivMatrix(y: Double, A: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  20. case class ValueDivVector(y: Double, x: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  21. case class ValueMulMatrix(y: Double, A: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  22. case class ValueMulVector(y: Double, x: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  23. case class ValueSubMatrix(y: Double, A: MatrixExpression) extends MatrixExpression with Product with Serializable

    Permalink
  24. case class ValueSubVector(y: Double, x: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  25. case class VectorAddValue(x: VectorExpression, y: Double) extends VectorExpression with Product with Serializable

    Permalink
  26. case class VectorAddVector(x: VectorExpression, y: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  27. case class VectorDivValue(x: VectorExpression, y: Double) extends VectorExpression with Product with Serializable

    Permalink
  28. case class VectorDivVector(x: VectorExpression, y: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  29. sealed trait VectorExpression extends AnyRef

    Permalink

    Vector Expression.

  30. case class VectorLift(x: Array[Double]) extends VectorExpression with Product with Serializable

    Permalink
  31. case class VectorMulValue(x: VectorExpression, y: Double) extends VectorExpression with Product with Serializable

    Permalink
  32. case class VectorMulVector(x: VectorExpression, y: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink
  33. case class VectorSubValue(x: VectorExpression, y: Double) extends VectorExpression with Product with Serializable

    Permalink
  34. case class VectorSubVector(x: VectorExpression, y: VectorExpression) extends VectorExpression with Product with Serializable

    Permalink

Value Members

  1. implicit def array2VectorExpression(x: Array[Double]): VectorLift

    Permalink
    Definition Classes
    Operators
  2. def beta(x: Double, y: Double): Double

    Permalink

    The beta function, also called the Euler integral of the first kind.

    The beta function, also called the Euler integral of the first kind.

    B(x, y) = 01 tx-1 (1-t)y-1dt

    for x, y > 0 and the integration is over [0,1].The beta function is symmetric, i.e. B(x,y) = B(y,x).

    Definition Classes
    Operators
  3. def chisqtest(table: Array[Array[Int]]): CorTest

    Permalink

    Given a two-dimensional contingency table in the form of an array of integers, returns Chi-square test for independence.

    Given a two-dimensional contingency table in the form of an array of integers, returns Chi-square test for independence. The rows of contingency table are labels by the values of one nominal variable, the columns are labels by the values of the other nominal variable, and whose entries are non-negative integers giving the number of observed events for each combination of row and column. Continuity correction will be applied when computing the test statistic for 2x2 tables: one half is subtracted from all |O-E| differences. The correlation coefficient is calculated as Cramer's V.

    Definition Classes
    Operators
  4. def chisqtest(x: Array[Int], prob: Array[Double], constraints: Int = 1): ChiSqTest

    Permalink

    One-sample chisq test.

    One-sample chisq test. Given the array x containing the observed numbers of events, and an array prob containing the expected probabilities of events, and given the number of constraints (normally one), a small value of p-value indicates a significant difference between the distributions.

    Definition Classes
    Operators
  5. def chisqtest2(x: Array[Int], y: Array[Int], constraints: Int = 1): ChiSqTest

    Permalink

    Two-sample chisq test.

    Two-sample chisq test. Given the arrays x and y, containing two sets of binned data, and given one constraint, a small value of p-value indicates a significant difference between two distributions.

    Definition Classes
    Operators
  6. def cholesky(A: MatrixExpression): CholeskyDecomposition

    Permalink

    Cholesky decomposition.

    Cholesky decomposition.

    Definition Classes
    Operators
  7. def cholesky(A: DenseMatrix): CholeskyDecomposition

    Permalink

    Cholesky decomposition.

    Cholesky decomposition.

    Definition Classes
    Operators
  8. def cholesky(A: Array[Array[Double]]): CholeskyDecomposition

    Permalink

    Cholesky decomposition.

    Cholesky decomposition.

    Definition Classes
    Operators
  9. def det(A: MatrixExpression): Double

    Permalink

    Returns the determinant of matrix.

    Returns the determinant of matrix.

    Definition Classes
    Operators
  10. def det(A: DenseMatrix): Double

    Permalink

    Returns the determinant of matrix.

    Returns the determinant of matrix.

    Definition Classes
    Operators
  11. def diag(A: Matrix): Array[Double]

    Permalink

    Returns the diagonal elements of matrix.

    Returns the diagonal elements of matrix.

    Definition Classes
    Operators
  12. def digamma(x: Double): Double

    Permalink

    The digamma function is defined as the logarithmic derivative of the gamma function.

    The digamma function is defined as the logarithmic derivative of the gamma function.

    Definition Classes
    Operators
  13. def eigen(A: DenseMatrix, k: Int): EigenValueDecomposition

    Permalink

    Eigen decomposition.

    Eigen decomposition.

    Definition Classes
    Operators
  14. def eigen(A: MatrixExpression): EigenValueDecomposition

    Permalink

    Eigen decomposition.

    Eigen decomposition.

    Definition Classes
    Operators
  15. def eigen(A: DenseMatrix): EigenValueDecomposition

    Permalink

    Eigen decomposition.

    Eigen decomposition.

    Definition Classes
    Operators
  16. def eigen(A: Array[Array[Double]]): EigenValueDecomposition

    Permalink

    Eigen decomposition.

    Eigen decomposition.

    Definition Classes
    Operators
  17. def erf(x: Double): Double

    Permalink

    The error function (also called the Gauss error function) is a special function of sigmoid shape which occurs in probability, statistics, materials science, and partial differential equations.

    The error function (also called the Gauss error function) is a special function of sigmoid shape which occurs in probability, statistics, materials science, and partial differential equations. It is defined as:

    erf(x) = 0x e-t2dt

    The complementary error function, denoted erfc, is defined as erfc(x) = 1 - erf(x). The error function and complementary error function are special cases of the incomplete gamma function.

    Definition Classes
    Operators
  18. def erfc(x: Double): Double

    Permalink

    The complementary error function.

    The complementary error function.

    Definition Classes
    Operators
  19. def erfcc(x: Double): Double

    Permalink

    The complementary error function with fractional error everywhere less than 1.2 × 10-7.

    The complementary error function with fractional error everywhere less than 1.2 × 10-7. This concise routine is faster than erfc.

    Definition Classes
    Operators
  20. def eye(m: Int, n: Int): ColumnMajorMatrix

    Permalink

    Returns an m-by-n identity matrix.

    Returns an m-by-n identity matrix.

    Definition Classes
    Operators
  21. def eye(n: Int): ColumnMajorMatrix

    Permalink

    Returns an n-by-n identity matrix.

    Returns an n-by-n identity matrix.

    Definition Classes
    Operators
  22. def ftest(x: Array[Double], y: Array[Double]): FTest

    Permalink

    Test if the arrays x and y have significantly different variances.

    Test if the arrays x and y have significantly different variances. Small values of p-value indicate that the two arrays have significantly different variances.

    Definition Classes
    Operators
  23. def gamma(x: Double): Double

    Permalink

    Gamma function.

    Gamma function. Lanczos approximation (6 terms).

    Definition Classes
    Operators
  24. def inv(A: MatrixExpression): DenseMatrix

    Permalink

    Returns the inverse of matrix.

    Returns the inverse of matrix.

    Definition Classes
    Operators
  25. def inv(A: DenseMatrix): DenseMatrix

    Permalink

    Returns the inverse of matrix.

    Returns the inverse of matrix.

    Definition Classes
    Operators
  26. def inverf(p: Double): Double

    Permalink

    The inverse error function.

    The inverse error function.

    Definition Classes
    Operators
  27. def inverfc(p: Double): Double

    Permalink

    The inverse complementary error function.

    The inverse complementary error function.

    Definition Classes
    Operators
  28. def kendalltest(x: Array[Double], y: Array[Double]): CorTest

    Permalink

    Kendall rank correlation test.

    Kendall rank correlation test. The Kendall Tau Rank Correlation Coefficient is used to measure the degree of correspondence between sets of rankings where the measures are not equidistant. It is used with non-parametric data. The p-value is calculated by approximation, which is good for n > 10.

    Definition Classes
    Operators
  29. def kstest(x: Array[Double], y: Array[Double]): KSTest

    Permalink

    The two-sample KS test for the null hypothesis that the data sets are drawn from the same distribution.

    The two-sample KS test for the null hypothesis that the data sets are drawn from the same distribution. Small values of p-value show that the cumulative distribution function of x is significantly different from that of y. The arrays x and y are modified by being sorted into ascending order.

    Definition Classes
    Operators
  30. def kstest(x: Array[Double], y: Distribution): KSTest

    Permalink

    The one-sample KS test for the null hypothesis that the data set x is drawn from the given distribution.

    The one-sample KS test for the null hypothesis that the data set x is drawn from the given distribution. Small values of p-value show that the cumulative distribution function of x is significantly different from the given distribution. The array x is modified by being sorted into ascending order.

    Definition Classes
    Operators
  31. def lgamma(x: Double): Double

    Permalink

    log of the Gamma function.

    log of the Gamma function. Lanczos approximation (6 terms)

    Definition Classes
    Operators
  32. def lu(A: MatrixExpression): LUDecomposition

    Permalink

    LU decomposition.

    LU decomposition.

    Definition Classes
    Operators
  33. def lu(A: DenseMatrix): LUDecomposition

    Permalink

    LU decomposition.

    LU decomposition.

    Definition Classes
    Operators
  34. def lu(A: Array[Array[Double]]): LUDecomposition

    Permalink

    LU decomposition.

    LU decomposition.

    Definition Classes
    Operators
  35. implicit def matrix2MatrixExpression(x: DenseMatrix): MatrixLift

    Permalink
    Definition Classes
    Operators
  36. implicit def matrixExpression2Array(exp: MatrixExpression): DenseMatrix

    Permalink
    Definition Classes
    Operators
  37. def ones(m: Int, n: Int): ColumnMajorMatrix

    Permalink

    Returns an m-by-n matrix of all ones.

    Returns an m-by-n matrix of all ones.

    Definition Classes
    Operators
  38. def ones(n: Int): ColumnMajorMatrix

    Permalink

    Returns an n-by-n matrix of all ones.

    Returns an n-by-n matrix of all ones.

    Definition Classes
    Operators
  39. def pearsontest(x: Array[Double], y: Array[Double]): CorTest

    Permalink

    Pearson correlation coefficient test.

    Pearson correlation coefficient test.

    Definition Classes
    Operators
  40. implicit def pimpArray2D(data: Array[Array[Double]]): PimpedArray2D

    Permalink
    Definition Classes
    Operators
  41. implicit def pimpDouble(x: Double): PimpedDouble

    Permalink
    Definition Classes
    Operators
  42. implicit def pimpDoubleArray(data: Array[Double]): PimpedDoubleArray

    Permalink
    Definition Classes
    Operators
  43. implicit def pimpIntArray(data: Array[Int]): PimpedArray[Int]

    Permalink
    Definition Classes
    Operators
  44. implicit def pimpMatrix(matrix: DenseMatrix): PimpedMatrix

    Permalink
    Definition Classes
    Operators
  45. def qr(A: MatrixExpression): QRDecomposition

    Permalink

    QR decomposition.

    QR decomposition.

    Definition Classes
    Operators
  46. def qr(A: DenseMatrix): QRDecomposition

    Permalink

    QR decomposition.

    QR decomposition.

    Definition Classes
    Operators
  47. def qr(A: Array[Array[Double]]): QRDecomposition

    Permalink

    QR decomposition.

    QR decomposition.

    Definition Classes
    Operators
  48. def rank(A: MatrixExpression): Int

    Permalink

    Returns the rank of matrix.

    Returns the rank of matrix.

    Definition Classes
    Operators
  49. def rank(A: DenseMatrix): Int

    Permalink

    Returns the rank of matrix.

    Returns the rank of matrix.

    Definition Classes
    Operators
  50. def spearmantest(x: Array[Double], y: Array[Double]): CorTest

    Permalink

    Spearman rank correlation coefficient test.

    Spearman rank correlation coefficient test. The Spearman Rank Correlation Coefficient is a form of the Pearson coefficient with the data converted to rankings (ie. when variables are ordinal). It can be used when there is non-parametric data and hence Pearson cannot be used.

    The raw scores are converted to ranks and the differences between the ranks of each observation on the two variables are calculated.

    The p-value is calculated by approximation, which is good for n > 10.

    Definition Classes
    Operators
  51. def svd(A: DenseMatrix, k: Int): SingularValueDecomposition

    Permalink

    SVD decomposition.

    SVD decomposition.

    Definition Classes
    Operators
  52. def svd(A: MatrixExpression): SingularValueDecomposition

    Permalink

    SVD decomposition.

    SVD decomposition.

    Definition Classes
    Operators
  53. def svd(A: DenseMatrix): SingularValueDecomposition

    Permalink

    SVD decomposition.

    SVD decomposition.

    Definition Classes
    Operators
  54. def svd(A: Array[Array[Double]]): SingularValueDecomposition

    Permalink

    SVD decomposition.

    SVD decomposition.

    Definition Classes
    Operators
  55. def trace(A: Matrix): Double

    Permalink

    Returns the trace of matrix.

    Returns the trace of matrix.

    Definition Classes
    Operators
  56. def ttest(x: Array[Double], y: Array[Double]): TTest

    Permalink

    Given the paired arrays x and y, test if they have significantly different means.

    Given the paired arrays x and y, test if they have significantly different means. Small values of p-value indicate that the two arrays have significantly different means.

    Definition Classes
    Operators
  57. def ttest(x: Array[Double], mean: Double): TTest

    Permalink

    Independent one-sample t-test whether the mean of a normally distributed population has a value specified in a null hypothesis.

    Independent one-sample t-test whether the mean of a normally distributed population has a value specified in a null hypothesis. Small values of p-value indicate that the array has significantly different mean.

    Definition Classes
    Operators
  58. def ttest2(x: Array[Double], y: Array[Double], equalVariance: Boolean = false): TTest

    Permalink

    Test if the arrays x and y have significantly different means.

    Test if the arrays x and y have significantly different means. Small values of p-value indicate that the two arrays have significantly different means.

    equalVariance

    true if the data arrays are assumed to be drawn from populations with the same true variance. Otherwise, The data arrays are allowed to be drawn from populations with unequal variances.

    Definition Classes
    Operators
  59. implicit def vectorExpression2Array(exp: VectorExpression): Array[Double]

    Permalink
    Definition Classes
    Operators
  60. def zeros(m: Int, n: Int): ColumnMajorMatrix

    Permalink

    Returns an m-by-n zero matrix.

    Returns an m-by-n zero matrix.

    Definition Classes
    Operators
  61. def zeros(n: Int): ColumnMajorMatrix

    Permalink

    Returns an n-by-n zero matrix.

    Returns an n-by-n zero matrix.

    Definition Classes
    Operators

Inherited from Operators

Inherited from AnyRef

Inherited from Any

Ungrouped