Function matrixApplyNumericalEncoding

  • Numerically encodes the strings in the matrix with an encoding dictionary.

    Parameters

    • matrixInitial: (string | number)[][]

      Original matrix before encoding.

    • dictionary: Record<string, number>

      Dictionary against which to do the encoding.

    Returns number[][]

    • Encoded matrix.