//::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** @author John Miller * @version 1.6 * @date Sat Jun 15 14:42:41 EDT 2019 * @see LICENSE (MIT style license file). */ package scalation.analytics.par import scalation.linalgebra.par.{MatrixD, VectorD} //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** The `PredictorMat` companion object provides a meythod for splitting * a combined data matrix in predictor matrix and a response vector. */ object PredictorMatO { //::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: /** Pull out the designated response column from the combined matrix. * When 'col' is negative or the last column, slice out the last column. * @param xy the combined data and response matrix * @param col the designated response column to be pulled out */ def pullResponse (xy: MatrixD, col: Int = -1): (MatrixD, VectorD) = { if (col < 0 || col == xy.dim2-1) (xy.sliceCol (0, xy.dim2-1), xy.col (xy.dim2-1)) else (xy.sliceEx (xy.dim1, col), xy.col (col)) } // pullResponse } // PredictorMatO