people/a/AlammarJay/js/shallow_nn_grapher.js

Summary

Maintainability
F
1 wk
Test Coverage

File shallow_nn_grapher.js has 442 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Created by alammar on 12/8/16.
 */

var shallowNeuralNetworkGrapher = function (inputNodeCount, outputNodeCount, svgElement, analyticsCategory) {
Severity: Minor
Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 6 hrs to fix

    Function drawGraph has 90 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    shallowNeuralNetworkGrapher.prototype.drawGraph = function () {
      var grapher = this;
      this.nodeRadius = 15;
      this.weightNodeWidthRatio = 1.7;
      // Let's calculate our coordinates for all the nodes
    Severity: Major
    Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 3 hrs to fix

      Function drawGraph has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
      Open

      shallowNeuralNetworkGrapher.prototype.drawGraph = function () {
        var grapher = this;
        this.nodeRadius = 15;
        this.weightNodeWidthRatio = 1.7;
        // Let's calculate our coordinates for all the nodes
      Severity: Minor
      Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function graphWeightNodes has 41 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      shallowNeuralNetworkGrapher.prototype.graphWeightNodes = function (data) {
        var radius = this.nodeRadius * 0.6;
        var t = d3.transition()
          .duration(750);
      
      
      Severity: Minor
      Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

        Function graphBiasToSoftmaxArrows has 39 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        shallowNeuralNetworkGrapher.prototype.graphBiasToSoftmaxArrows = function (data) {
          var inputToBiasLines = this.neuralNetworkG.selectAll(this.svgElement + " .bias-to-softmax-line")
            .data(data);
        
          inputToBiasLines.exit()
        Severity: Minor
        Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

          Function graphInputToBiasLines has 37 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          shallowNeuralNetworkGrapher.prototype.graphInputToBiasLines = function (data) {
            var inputToBiasLines = this.neuralNetworkG.selectAll(this.svgElement + " .input-to-bias-line")
              .data(data);
          
            inputToBiasLines.exit()
          Severity: Minor
          Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

            Function graphSoftmaxToOutputArrows has 37 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            shallowNeuralNetworkGrapher.prototype.graphSoftmaxToOutputArrows = function (data) {
            
              var inputToBiasLines = this.neuralNetworkG.selectAll(this.svgElement + " .softmax-to-output-line").data(data);
            
              inputToBiasLines.exit().remove();
            Severity: Minor
            Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

              Function graphOutputNodes has 34 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              shallowNeuralNetworkGrapher.prototype.graphOutputNodes = function (data) {
                // JOIN
                var inputGroups = this.neuralNetworkG.selectAll(this.svgElement + " .output-group")
                  .data(data);
              
              
              Severity: Minor
              Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

                Function graphInputNodes has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                shallowNeuralNetworkGrapher.prototype.graphInputNodes = function (data) {
                  // JOIN
                  var inputGroups = this.neuralNetworkG.selectAll(this.svgElement + " .input-group").data(data);
                
                  // EXIT old elements not present in new data.
                Severity: Minor
                Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

                  Function graphBiasNodes has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  shallowNeuralNetworkGrapher.prototype.graphBiasNodes = function (data) {
                    // JOIN
                    var biasNodes = this.neuralNetworkG.selectAll(this.svgElement + " .bias-group").data(data);
                  
                    // EXIT old elements not present in new data.
                  Severity: Minor
                  Found in people/a/AlammarJay/js/shallow_nn_grapher.js - About 1 hr to fix

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                    shallowNeuralNetworkGrapher.prototype.graphBiasToSoftmaxArrows = function (data) {
                      var inputToBiasLines = this.neuralNetworkG.selectAll(this.svgElement + " .bias-to-softmax-line")
                        .data(data);
                    
                      inputToBiasLines.exit()
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 1 day to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 1031..1076

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 267.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      softmaxGroup
                        .append("rect")
                        .attr("class", "softmaxNode")
                        .attr("width", this.nodeRadius * 2)
                        .attr("height", this.neuralNetworkHeight)
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 3 hrs to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 630..638

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 112.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                      this.inputLayerCoordinates = d3.range(this.inputNodeCount).map(function (i) {
                        var y = grapher.neuralNetworkMargin.top + (i + 1) * grapher.neuralNetworkHeight / (grapher.inputNodeCount + 1)
                        return { x: inputLayerX, y: y, index: i }
                      });
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 2 other locations - About 3 hrs to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 72..76
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 78..81

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 98.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                      this.biasLayerCoordinates = d3.range(this.outputNodeCount).map(function (i) {
                    
                        var y = grapher.neuralNetworkMargin.top + (i + 1) * grapher.neuralNetworkHeight / (grapher.outputNodeCount + 1)
                        return { x: biasLayerX, y: y, index: i }
                      });
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 2 other locations - About 3 hrs to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 67..70
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 78..81

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 98.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                      this.outputLayerCoordinates = d3.range(this.outputNodeCount).map(function (i) {
                        var y = grapher.neuralNetworkMargin.top + (i + 1) * grapher.neuralNetworkHeight / (grapher.outputNodeCount + 1)
                        return { x: outputLayerX, y: y, index: i }
                      });
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 2 other locations - About 3 hrs to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 67..70
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 72..76

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 98.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      var inputLayerX = this.neuralNetworkMargin.left + this.nodeRadius, // X value of input layer
                        biasLayerX = this.neuralNetworkWidth * 2 / 3 - 20, //
                        outputLayerX = this.neuralNetworkWidth - this.nodeRadius + this.neuralNetworkMargin.left,
                        softmaxLayerX = (outputLayerX + biasLayerX) / 2;
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 1845..1848

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 89.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      inputs.append("text")
                        .attr("id", "input-name")
                        .attr("class", "grapher-node-text")
                        .attr("text-anchor", "middle")
                        .attr("x", 0)
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 358..366

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 84.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      inputs.append("text")
                        .attr("id", "output-name")
                        .attr("class", "grapher-node-text")
                        .attr("text-anchor", "middle")
                        .attr("x", 0)
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 206..214

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 84.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      var inputs = inputGroups.enter()
                        .append("g")
                        .attr("class", "input-group")
                        .attr("transform", function (d) {
                          return "translate(" + (d.x) + "," + (d.y) + ")";
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 344..349

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 83.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      var inputs = inputGroups.enter()
                        .append("g")
                        .attr("class", "output-group")
                        .attr("transform", function (d) {
                          return "translate(" + (d.x) + "," + (d.y) + ")";
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 2 hrs to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 192..197

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 83.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 5 locations. Consider refactoring.
                    Open

                      defs.append("marker")
                        .attrs({
                          "id": "arrow",
                          "viewBox": "0 -5 10 10",
                          "refX": 5,
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 4 other locations - About 2 hrs to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 1703..1715
                    people/a/AlammarJay/js/nn_calc.js on lines 1737..1749
                    people/a/AlammarJay/js/simple_nn.js on lines 706..718
                    people/a/AlammarJay/js/two_variable_nn.js on lines 289..301

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 81.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Identical blocks of code found in 2 locations. Consider refactoring.
                    Open

                      softmaxGroup.append("text")
                        .attr("id", "biasValue")
                        .attr("text-anchor", "middle")
                        .attr("x", this.neuralNetworkHeight / 2)
                        .attr("y", -2)
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 648..654

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 74.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      var softmaxGroup = softmax.enter()
                        .append("g")
                        .attr("class", "softmax")
                        .attr("transform", function (d) {
                          return "translate(" + (d.x) + "," + (d.y) + ")";
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 766..774

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 73.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                      this.nnGraphHolder = d3.select(this.svgElement) // select the 'body' element
                        .append("svg")           // append an SVG element to the body
                        .attr("width", this.graphWidth)      // make the SVG element 449 pixels wide
                        .attr("height", 250);    // make the SVG element 249 pixels high
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 4 other locations - About 1 hr to fix
                    people/a/AlammarJay/js/simple_nn.js on lines 129..132
                    people/a/AlammarJay/js/simple_nn.js on lines 691..694
                    people/a/AlammarJay/js/two_variable_nn.js on lines 103..106
                    people/a/AlammarJay/js/two_variable_nn.js on lines 273..276

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 67.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                      inputGroups.attr("class", "input-group")
                        .attr("transform", function (d) {
                          return "translate(" + (d.x) + "," + (d.y) + ")";
                        }.bind(this));
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 4 other locations - About 1 hr to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 21..27
                    people/a/AlammarJay/js/nn_calc.js on lines 322..328
                    people/a/AlammarJay/js/nn_calc.js on lines 1234..1240
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 333..336

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 64.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 5 locations. Consider refactoring.
                    Open

                      inputGroups.attr("class", "output-group")
                        .attr("transform", function (d) {
                          return "translate(" + (d.x) + "," + (d.y) + ")";
                        }.bind(this));
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 4 other locations - About 1 hr to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 21..27
                    people/a/AlammarJay/js/nn_calc.js on lines 322..328
                    people/a/AlammarJay/js/nn_calc.js on lines 1234..1240
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 181..184

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 64.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      groupElements.select("#weight0Value")
                        .text(function (d) {
                          return "W" + (d.outputIndex + 1) + "," + (d.inputIndex + 1);
                        });
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 162..165

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 58.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      biasNodes.attr("class", "bias-group")
                        .attr("transform", function (d) {
                          return "translate(" + (d.x) + "," + (d.y - this.nodeRadius) + ")";
                        }.bind(this));
                    Severity: Minor
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 50 mins to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 293..298

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 52.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                      var biases = biasNodes.enter()
                        .append("g")
                        .attr("class", "bias-group")
                        .attr("transform", function (d) {
                          return "translate(" + (d.x) + "," + (d.y - this.nodeRadius) + ")";
                    Severity: Minor
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 1 other location - About 50 mins to fix
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 286..289

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 52.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                      inputs
                        .append("circle")
                        .attr("class", "input-node")
                        .attr("r", this.nodeRadius)
                        .attr("cx", 0)
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 2 other locations - About 50 mins to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 422..427
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 351..356

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 51.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 3 locations. Consider refactoring.
                    Open

                      inputs
                        .append("circle")
                        .attr("class", "output-node")
                        .attr("r", this.nodeRadius)
                        .attr("cx", 0)
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 2 other locations - About 50 mins to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 422..427
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 199..204

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 51.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 15 locations. Consider refactoring.
                    Open

                      this.neuralNetworkWidth = +this.nnGraphHolder.attr("width") - this.neuralNetworkMargin.left - this.neuralNetworkMargin.right;
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 14 other locations - About 40 mins to fix
                    people/a/AlammarJay/js/accuracy-graph.js on lines 19..19
                    people/a/AlammarJay/js/accuracy-graph.js on lines 20..20
                    people/a/AlammarJay/js/relu_graph.js on lines 34..34
                    people/a/AlammarJay/js/relu_graph.js on lines 35..35
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 32..32
                    people/a/AlammarJay/js/sigmoid_graph.js on lines 34..34
                    people/a/AlammarJay/js/sigmoid_graph.js on lines 35..35
                    people/a/AlammarJay/js/simple_nn.js on lines 196..197
                    people/a/AlammarJay/js/simple_nn.js on lines 542..542
                    people/a/AlammarJay/js/simple_nn.js on lines 543..543
                    people/a/AlammarJay/js/two_variable_nn.js on lines 109..109
                    people/a/AlammarJay/js/two_variable_nn.js on lines 110..110
                    people/a/AlammarJay/js/two_variable_nn.js on lines 278..278
                    people/a/AlammarJay/js/two_variable_nn.js on lines 279..279

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 49.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 15 locations. Consider refactoring.
                    Open

                      this.neuralNetworkHeight = +this.nnGraphHolder.attr("height") - this.neuralNetworkMargin.top - this.neuralNetworkMargin.bottom;
                    Severity: Major
                    Found in people/a/AlammarJay/js/shallow_nn_grapher.js and 14 other locations - About 40 mins to fix
                    people/a/AlammarJay/js/accuracy-graph.js on lines 19..19
                    people/a/AlammarJay/js/accuracy-graph.js on lines 20..20
                    people/a/AlammarJay/js/relu_graph.js on lines 34..34
                    people/a/AlammarJay/js/relu_graph.js on lines 35..35
                    people/a/AlammarJay/js/shallow_nn_grapher.js on lines 31..31
                    people/a/AlammarJay/js/sigmoid_graph.js on lines 34..34
                    people/a/AlammarJay/js/sigmoid_graph.js on lines 35..35
                    people/a/AlammarJay/js/simple_nn.js on lines 196..197
                    people/a/AlammarJay/js/simple_nn.js on lines 542..542
                    people/a/AlammarJay/js/simple_nn.js on lines 543..543
                    people/a/AlammarJay/js/two_variable_nn.js on lines 109..109
                    people/a/AlammarJay/js/two_variable_nn.js on lines 110..110
                    people/a/AlammarJay/js/two_variable_nn.js on lines 278..278
                    people/a/AlammarJay/js/two_variable_nn.js on lines 279..279

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 49.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    There are no issues that match your filters.

                    Category
                    Status