ImputeMovingAvg

scalation.modeling.ImputeMovingAvg
object ImputeMovingAvg extends Imputation

The ImputeMovingAvg object imputes missing values using the moving average.

Attributes

Graph
Supertypes
trait Imputation
class Object
trait Matchable
class Any
Self type

Members list

Value members

Concrete methods

def imputeAt(x: VectorD, i: Int): Double

Impute a value for the first missing value in vector x from index i using the moving average of the last dist values.

Impute a value for the first missing value in vector x from index i using the moving average of the last dist values.

Value parameters

i

the starting index to look for missing values

x

the vector with missing values

Attributes

Inherited methods

def findLastMissing(x: VectorD, i_: Int): (Int, Double)

Return the index of last missing value in vector x from index i and the new imputed value.

Return the index of last missing value in vector x from index i and the new imputed value.

Value parameters

i_

the starting index to look for missing value

x

the vector with missing values

Attributes

Inherited from:
Imputation
def findMissing(x: VectorD, i: Int): (Int, Double)

Return the index of first missing value in vector x from index i and the new imputed value.

Return the index of first missing value in vector x from index i and the new imputed value.

Value parameters

i

the starting index to look for missing value

x

the vector with missing values

Attributes

Inherited from:
Imputation

Replace all missing values in matrix x with imputed values. Will change the values in matrix x. Make a copy to preserve values x.copy.

Replace all missing values in matrix x with imputed values. Will change the values in matrix x. Make a copy to preserve values x.copy.

Value parameters

x

the matrix with missing values

Attributes

Inherited from:
Imputation
def impute(x: VectorD, i: Int): (Int, Double)

Impute a value for the first missing value in vector x from index i. The type (Int, Double) returns (vector index for imputation, imputed value). Does not modify the vector.

Impute a value for the first missing value in vector x from index i. The type (Int, Double) returns (vector index for imputation, imputed value). Does not modify the vector.

Value parameters

i

the starting index to look for missing values

x

the vector with missing values

Attributes

Inherited from:
Imputation

Replace all missing values in vector x with imputed values. Will change the values in vector x. Make a copy to preserve values x.copy.

Replace all missing values in vector x with imputed values. Will change the values in vector x. Make a copy to preserve values x.copy.

Value parameters

x

the vector with missing values

Attributes

Inherited from:
Imputation
protected def nextVal(x: VectorD, i: Int): Double

Return the next non-missing value in vector x from index i. If none, return missVal.

Return the next non-missing value in vector x from index i. If none, return missVal.

Value parameters

i

the starting index to look for non-missing value

x

the vector to be searched for a non-missing value

Attributes

Inherited from:
Imputation
protected def normalMedian(mu: Double, sig2: Double): Double

Return the median of three normally distributed random numbers.

Return the median of three normally distributed random numbers.

Value parameters

mu

the mean

sig2

the variance

Attributes

Inherited from:
Imputation
protected def prevVal(x: VectorD, i: Int): Double

Return the previous non-missing value in vector x from index i. If none, return missVal.

Return the previous non-missing value in vector x from index i. If none, return missVal.

Value parameters

i

the starting index to look for non-missing value

x

the vector to be searched (backwards) for a non-missing value

Attributes

Inherited from:
Imputation
def setDist(dist_: Int): Unit

Set the distance dist to the new value dist_.

Set the distance dist to the new value dist_.

Value parameters

dist_

the new value for the distance

Attributes

Inherited from:
Imputation
def setMissVal(missVal_: Double): Unit

Set the missing value missVal to the new missing value indicator missVal_.

Set the missing value missVal to the new missing value indicator missVal_.

Value parameters

missVal_

the new missing value indicator

Attributes

Inherited from:
Imputation

Inherited fields

protected val DAMPEN: Double

Attributes

Inherited from:
Imputation
protected val debug: (String, String) => Unit

Attributes

Inherited from:
Imputation
protected var dist: Int

Attributes

Inherited from:
Imputation
protected var missVal: Double

Attributes

Inherited from:
Imputation
protected val q: Int

Attributes

Inherited from:
Imputation