johnpaulada/matrix-factorization-js

View on GitHub

Showing 3 of 3 total issues

Function factorizeMatrix has 28 lines of code (exceeds 25 allowed). Consider refactoring.
Open

function factorizeMatrix(TARGET_MATRIX, LATENT_FEATURES_COUNT=5, ITERS=5000, LEARNING_RATE=0.0002, REGULARIZATION_RATE=0.02, THRESHOLD=0.001) {
  const FACTOR1_ROW_COUNT = TARGET_MATRIX.length
  const FACTOR2_ROW_COUNT = TARGET_MATRIX[0].length
  const factorMatrix1 = fillMatrix(FACTOR1_ROW_COUNT, LATENT_FEATURES_COUNT, () => Math.random())
  const factorMatrix2 = fillMatrix(FACTOR2_ROW_COUNT, LATENT_FEATURES_COUNT, () => Math.random())
Severity: Minor
Found in src/matrix-factorization.js - About 1 hr to fix

    Function calculateError has 7 arguments (exceeds 4 allowed). Consider refactoring.
    Open

    function calculateError(ROW_COUNT, COLUMN_COUNT, TARGET_MATRIX, LATENT_FEATURES_COUNT, REGULARIZATION_RATE, factorMatrix1, transposedFactorMatrix2) {
    Severity: Major
    Found in src/matrix-factorization.js - About 50 mins to fix

      Function factorizeMatrix has 6 arguments (exceeds 4 allowed). Consider refactoring.
      Open

      function factorizeMatrix(TARGET_MATRIX, LATENT_FEATURES_COUNT=5, ITERS=5000, LEARNING_RATE=0.0002, REGULARIZATION_RATE=0.02, THRESHOLD=0.001) {
      Severity: Minor
      Found in src/matrix-factorization.js - About 45 mins to fix
        Severity
        Category
        Status
        Source
        Language