ImputeMICE

scalation.modeling.ImputeMICE
object ImputeMICE extends Imputation

The ImputeMICE object imputes missing values using MICE. Use the columns in matrix z to impute values for target vector x.

Attributes

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

Members list

Value members

Concrete methods

override def imputeAll(x: VectorD): VectorD

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 (target column)

Attributes

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

Impute a value for vector x at index i. Does not modify the vector.

Impute a value for vector x at index i. Does not modify the vector.

Value parameters

i

the index position for which to impute a value

x

the vector with missing values

Attributes

def imputeStep(): Unit

Perform a MICE imputation step by fixing each column that has missing values.

Perform a MICE imputation step by fixing each column that has missing values.

Attributes

def initialImpute(): (Array[IndexedSeq[Int]], MatrixD)

Make initial imputation by replacing missing values with the column means. Return the positions imputed and the new imputed matrix.

Make initial imputation by replacing missing values with the column means. Return the positions imputed and the new imputed matrix.

Attributes

def setZ(z_: MatrixD): Unit

Set the value for the z matrix containing the dataset (consisting of multiple columns/variables) where missing values are to be imputed.

Set the value for the z matrix containing the dataset (consisting of multiple columns/variables) where missing values are to be imputed.

Value parameters

z_

the matrix to be assigned

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
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