/** * Creates a new matrix by copying the given set of row vectors. * * @param rows * The row vectors to create a matrix from. Must all be the same * dimensionality. * @return * A new matrix whose rows are equal to the given set of rows. */ public MatrixType copyRowVectors( Vectorizable ... rows ) { return this.copyRowVectors(Arrays.asList(rows)); }
/** * Creates a new matrix by copying the given set of row vectors. * * @param rows * The row vectors to create a matrix from. Must all be the same * dimensionality. * @return * A new matrix whose rows are equal to the given set of rows. */ public MatrixType copyRowVectors( Vectorizable ... rows ) { return this.copyRowVectors(Arrays.asList(rows)); }
/** * Creates a new matrix by copying the given set of row vectors. * * @param rows * The row vectors to create a matrix from. Must all be the same * dimensionality. * @return * A new matrix whose rows are equal to the given set of rows. */ public MatrixType copyRowVectors( Vectorizable ... rows ) { return this.copyRowVectors(Arrays.asList(rows)); }
private Matrix prepareMatrix(Vector y) { final Matrix Y = DMF.createMatrix(1, y.getDimensionality() + 1); Y.setElement(0, 0, 1); Y.setSubMatrix(0, 1, DMF.copyRowVectors(y)); return Y.transpose(); }
private Matrix prepareMatrix(Vector y) { final Matrix Y = DMF.createMatrix(1, y.getDimensionality() + 1); Y.setElement(0, 0, 1); Y.setSubMatrix(0, 1, DMF.copyRowVectors(y)); return Y.transpose(); }
this.documentsByTerms = this.getMatrixFactory().copyRowVectors(documents); this.termCount = DatasetUtil.getDimensionality(documents); this.documentCount = documents.size();
this.documentsByTerms = this.getMatrixFactory().copyRowVectors(documents); this.termCount = DatasetUtil.getDimensionality(documents); this.documentCount = documents.size();
this.documentsByTerms = this.getMatrixFactory().copyRowVectors(documents); this.termCount = DatasetUtil.getDimensionality(documents); this.documentCount = documents.size();