Class MatrixHelper


  • public class MatrixHelper
    extends MatrixHelper
    Helper class for the matrix-algorithm library.
    Author:
    FracPete (fracpete at waikato dot ac dot nz)
    • Constructor Detail

      • MatrixHelper

        public MatrixHelper()
    • Method Detail

      • jamaToWeka

        public static weka.core.matrix.Matrix jamaToWeka​(Jama.Matrix jama)
        Turns a Jama matrix into a Weka one.
        Parameters:
        jama - the jama matrix to convert
        Returns:
        the converted matrix
      • wekaToJama

        public static Jama.Matrix wekaToJama​(weka.core.matrix.Matrix weka)
        Turns a Weka matrix into a Jama one.
        Parameters:
        weka - the Weka matrix to convert
        Returns:
        the converted matrix
      • matrixAlgoToWeka

        public static weka.core.matrix.Matrix matrixAlgoToWeka​(com.github.waikatodatamining.matrix.core.Matrix matrixalgo)
        Turns a matrix-algorithm matrix into a Weka one.
        Parameters:
        matrixalgo - the jama matrix to convert
        Returns:
        the converted matrix
      • wekaToMatrixAlgo

        public static com.github.waikatodatamining.matrix.core.Matrix wekaToMatrixAlgo​(weka.core.matrix.Matrix weka)
        Turns a Weka matrix into a matrix-algorithm one.
        Parameters:
        weka - the Weka matrix to convert
        Returns:
        the converted matrix
      • matrixToSpreadSheet

        public static SpreadSheet matrixToSpreadSheet​(weka.core.matrix.Matrix matrix,
                                                      String colPrefix)
        Turns the matrix into a spreadsheet.
        Parameters:
        matrix - the matrix to convert
        colPrefix - the prefix for the column names
        Returns:
        the generated spreadsheet