use of org.apache.ignite.ml.math.impls.vector.FunctionVector in project ignite by apache.
the class LinearRegressionQRTrainer method extractInputs.
/**
* Extracts all inputs from data set matrix and updates matrix so that first column contains value 1.0.
*
* @param data data to build model
* @return Inputs matrix
*/
private Matrix extractInputs(Matrix data) {
data = data.copy();
data.assignColumn(0, new FunctionVector(data.rowSize(), row -> 1.0));
return data;
}
use of org.apache.ignite.ml.math.impls.vector.FunctionVector in project ignite by apache.
the class GradientDescent method extractInputs.
/**
* Extracts all inputs from data set matrix and updates matrix so that first column contains value 1.0.
*
* @param data data to build model
* @return Inputs matrix
*/
private Matrix extractInputs(Matrix data) {
data = data.copy();
data.assignColumn(0, new FunctionVector(data.rowSize(), row -> 1.0));
return data;
}
Aggregations