SecreC 2 language  2.8.0 (2023.09)
Language and standard library reference
Functions

Functions

template<domain D :shared3p >
D bool outlierDetectionMAD (D int32[[1]] data, D bool[[1]] isAvailable, float32 lambda)
 
template<domain D :shared3p >
D bool outlierDetectionMAD (D int64[[1]] data, D bool[[1]] isAvailable, float64 lambda)
 
template<domain D :shared3p >
D bool outlierDetectionMAD (D float32[[1]] data, D bool[[1]] isAvailable, float32 lambda)
 
template<domain D :shared3p >
D bool outlierDetectionMAD (D float64[[1]] data, D bool[[1]] isAvailable, float64 lambda)
 

Detailed Description

Outlier detection (using median absolute deviation)

Note
D - shared3p protection domain
Supported types - int32 / int64 / float32 / float64
Constant 1.0 is used as the parameter for median absolute deviation.
Parameters
data- input vector
isAvailable- vector indicating which elements of the input vector are available
lambda- constant. The value of lambda depends on the dataset. Anything from 3 to 5 can be used as a starting value.
Returns
returns a boolean mask vector. For each sample point x, the corresponding mask element is true if the corresponding isAvailable element is true and its absolute deviation from the median of the sample does not exceed lambda ยท MAD where MAD is the median absolute deviation of the sample.
Leakage
Leaks the number of missing values in the input

Function Documentation

◆ outlierDetectionMAD() [1/4]

D bool outlierDetectionMAD ( D float32[[1]]  data,
D bool[[1]]  isAvailable,
float32  lambda 
)

◆ outlierDetectionMAD() [2/4]

D bool outlierDetectionMAD ( D float64[[1]]  data,
D bool[[1]]  isAvailable,
float64  lambda 
)

◆ outlierDetectionMAD() [3/4]

D bool outlierDetectionMAD ( D int32[[1]]  data,
D bool[[1]]  isAvailable,
float32  lambda 
)

◆ outlierDetectionMAD() [4/4]

D bool outlierDetectionMAD ( D int64[[1]]  data,
D bool[[1]]  isAvailable,
float64  lambda 
)