# Stats

#### object Stats extends Serializable

Linear Supertypes
Serializable, Serializable, AnyRef, Any
Ordering
1. Alphabetic
2. By inheritance
Inherited
1. Stats
2. Serializable
3. Serializable
4. AnyRef
5. Any
1. Hide All
2. Show all
Visibility
1. Public
2. All

### Value Members

1. #### final def !=(arg0: AnyRef): Boolean

Definition Classes
AnyRef
2. #### final def !=(arg0: Any): Boolean

Definition Classes
Any
3. #### final def ##(): Int

Definition Classes
AnyRef → Any
4. #### final def ==(arg0: AnyRef): Boolean

Definition Classes
AnyRef
5. #### final def ==(arg0: Any): Boolean

Definition Classes
Any

7. #### def aboutEq(a: DenseMatrix[Double], b: DenseMatrix[Double], thresh: Double): Boolean

Compares two matrices for approximate equality.

Compares two matrices for approximate equality.

a

A matrix.

b

A second matrix.

thresh

equality threshold

returns

True iff all corresponding elements of the two matrices are within `thresh` of each other.

9. #### def aboutEq(as: DenseVector[Double], bs: DenseVector[Double], thresh: Double): Boolean

Compares two arrays for approximate equality.

Compares two arrays for approximate equality. Modify margin by setting Stats.thresh.

as

A array of numbers.

bs

A second array of numbers.

thresh

equality threshold

returns

True if the two numbers are within `thresh` of each other.

11. #### def aboutEq(a: Double, b: Double, thresh: Double): Boolean

Compares two numbers for approximate equality

Compares two numbers for approximate equality

a

A number.

b

A second number.

thresh

equality threshold

returns

True if the two numbers are within `thresh` of each other.

12. #### final def asInstanceOf[T0]: T0

Definition Classes
Any
13. #### def classificationError(predictions: RDD[DenseVector[Double]], actuals: RDD[DenseVector[Double]], k: Int = 1): Double

Computes top-k classification error based on a distribution of predictions.

Computes top-k classification error based on a distribution of predictions.

predictions

Distribution of predictions.

actuals

Distribution of actuals.

k

How many classes to include.

returns

The error percent.

14. #### def clone(): AnyRef

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( ... )
15. #### final def eq(arg0: AnyRef): Boolean

Definition Classes
AnyRef
16. #### def equals(arg0: Any): Boolean

Definition Classes
AnyRef → Any
17. #### def finalize(): Unit

Attributes
protected[java.lang]
Definition Classes
AnyRef
Annotations
@throws( classOf[java.lang.Throwable] )
18. #### final def getClass(): Class[_]

Definition Classes
AnyRef → Any
19. #### def getErrPercent(predicted: RDD[Array[Int]], actual: RDD[Array[Int]], num: Long): Double

Computes error percent based on array of predicted labels and array of actual labels.

Computes error percent based on array of predicted labels and array of actual labels.

predicted

The predicted labels.

actual

The actual labels.

num

Total number of examples.

returns

Error percent.

20. #### def hashCode(): Int

Definition Classes
AnyRef → Any
21. #### final def isInstanceOf[T0]: Boolean

Definition Classes
Any
22. #### final def ne(arg0: AnyRef): Boolean

Definition Classes
AnyRef
23. #### def normalizeRows(mat: DenseMatrix[Double], alpha: Double = 1.0): DenseMatrix[Double]

Given a local matrix, compute the mean and variance of each row.

Given a local matrix, compute the mean and variance of each row. Subtract the row mean from each row and divide by the sqrt(variance + alpha).

mat

Input matrix.

alpha

Alpha for the denominator.

returns

Normalized Matrix.

24. #### final def notify(): Unit

Definition Classes
AnyRef
25. #### final def notifyAll(): Unit

Definition Classes
AnyRef
26. #### final def synchronized[T0](arg0: ⇒ T0): T0

Definition Classes
AnyRef
27. #### val thresh: Double

Margin to use for comparing numerical values.

28. #### def toString(): String

Definition Classes
AnyRef → Any
29. #### final def wait(): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
30. #### final def wait(arg0: Long, arg1: Int): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )
31. #### final def wait(arg0: Long): Unit

Definition Classes
AnyRef
Annotations
@throws( ... )