January 2018
Intermediate to advanced
470 pages
11h 9m
English
In the preceding steps, we have seen some classes or methods that we should describe here, too. The first method, named toCategorical(), converts the Frame column from String/Int to enum; this is used to convert dayTime bags (that is, gr1, gr2, gr3, gr4) to a factor-like type. This function is also used to convert the Class column to a factor type in order to perform classification:
def toCategorical(f: Frame, i: Int): Unit = { f.replace(i, f.vec(i).toCategoricalVec) f.update() }
This builds a confusion matrix for anomaly detection according to a threshold if an instance is considered anomalous (if its MSE exceeds the given threshold):
def confusionMat(mSEs:water.fvec.Frame,actualFrame:water.fvec.Frame,thresh: ...
Read now
Unlock full access