people/a/AlammarJay/js/two_variable_nn.js

Summary

Maintainability
F
1 wk
Test Coverage

File two_variable_nn.js has 398 lines of code (exceeds 250 allowed). Consider refactoring.
Open

var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
                                                  svg_el, table_el,
                                                  dataPoints, labels,
                                                  weights, bias,
                                                  gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
Severity: Minor
Found in people/a/AlammarJay/js/two_variable_nn.js - About 5 hrs to fix

    Function initializeNeuralNetworkGraph has 121 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    multiVariableNeuralNetworkTrainer.prototype.initializeNeuralNetworkGraph = function () {
      this.nnGraphHolder = d3.select(this.neuralNetworkGraphEl) // 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/two_variable_nn.js - About 4 hrs to fix

      Function gradientDescentStep has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
      Open

      multiVariableNeuralNetworkTrainer.prototype.gradientDescentStep = function (steps) {
      
        // I probably shouldn't do this. I started doing feature normalization so we can keep to one learning rate.
        // I decided to do it this way to maintain narrative continuity.
        this.weightLearningRates = [0.00000001, 0.01];
      Severity: Minor
      Found in people/a/AlammarJay/js/two_variable_nn.js - About 2 hrs 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 multiVariableNeuralNetworkTrainer has 62 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
                                                        svg_el, table_el,
                                                        dataPoints, labels,
                                                        weights, bias,
                                                        gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
      Severity: Major
      Found in people/a/AlammarJay/js/two_variable_nn.js - About 2 hrs to fix

        Function initializeErrorGraph has 48 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        multiVariableNeuralNetworkTrainer.prototype.initializeErrorGraph = function () {
        
          this.error_chart_history_x = 300;       // How many error data points to show
          this.error_chart_history_y = 100000;    // How high the bar goes
          this.error_history = [10000];
        Severity: Minor
        Found in people/a/AlammarJay/js/two_variable_nn.js - About 1 hr to fix

          Function multiVariableNeuralNetworkTrainer has 15 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
                                                            svg_el, table_el,
                                                            dataPoints, labels,
                                                            weights, bias,
                                                            gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
          Severity: Major
          Found in people/a/AlammarJay/js/two_variable_nn.js - About 1 hr to fix

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

            multiVariableNeuralNetworkTrainer.prototype.gradientDescentStep = function (steps) {
            
              // I probably shouldn't do this. I started doing feature normalization so we can keep to one learning rate.
              // I decided to do it this way to maintain narrative continuity.
              this.weightLearningRates = [0.00000001, 0.01];
            Severity: Minor
            Found in people/a/AlammarJay/js/two_variable_nn.js - About 1 hr to fix

              Function multiVariableNeuralNetworkTrainer has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring.
              Open

              var multiVariableNeuralNetworkTrainer = function (numberOfInputNodes,
                                                                svg_el, table_el,
                                                                dataPoints, labels,
                                                                weights, bias,
                                                                gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js - About 25 mins 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

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

              multiVariableNeuralNetworkTrainer.prototype.batchAddErrorPoint = function (valuesArray) {
              
                this.error_history = this.error_history.concat(valuesArray);
              
                // Cut the needed number of elements to be within our specified error_chart_history_x
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 day to fix
              people/a/AlammarJay/js/simple_nn.js on lines 289..310

              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 197.

              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

              multiVariableNeuralNetworkTrainer.prototype.addErrorPoint = function (value) {
              
                this.error_history.push(value);
                // Redraw the line.
                d3.select(this.svg_el + " .error-history-line")
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 5 hrs to fix
              people/a/AlammarJay/js/simple_nn.js on lines 274..286

              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 146.

              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

                this.biasNode = this.biasG
                  .append("rect")
                  .attr("class", "biasNode")
                  .attr("width", nodeRadius * 2)
                  .attr("height", nodeRadius * 2)
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 3 hrs to fix
              people/a/AlammarJay/js/simple_nn.js on lines 764..772

              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 102.

              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

                this.outputNode = this.neuralNetworkG
                  .append("circle")
                  .attr("class", "output-node")
                  .attr("r", nodeRadius)
                  .attr("cx", this.neuralNetworkWidth - nodeRadius + this.neuralNetworkMargin.left)
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 3 hrs to fix
              people/a/AlammarJay/js/simple_nn.js on lines 782..787

              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 101.

              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

                this.errorGraphLine = d3.line()
                  .x(function (d, i) {
                    return this.error_x(i);
                  }.bind(this))
                  .y(function (d, i) {
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 2 hrs to fix
              people/a/AlammarJay/js/simple_nn.js on lines 218..224

              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 88.

              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/two_variable_nn.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/shallow_nn_grapher.js on lines 38..50
              people/a/AlammarJay/js/simple_nn.js on lines 706..718

              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

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

                this.errorG.append("g")
                  .attr("class", "axis axis--x")
                  .attr("transform", "translate(0," + this.errorChartHeight + ")")
                  .call(d3.axisBottom(this.error_x).ticks(5));
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 3 other locations - About 2 hrs to fix
              people/a/AlammarJay/js/simple_nn.js on lines 160..163
              people/a/AlammarJay/js/simple_nn.js on lines 227..230
              people/a/AlammarJay/js/simple_nn.js on lines 579..582

              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 77.

              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

                this.weightNode = this.weightG
                  .append("ellipse")
                  .attr("class", "weightNode")
                  .attr("rx", nodeRadius * 1.7)
                  .attr("ry", nodeRadius)
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 377..383

              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

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

                this.weightNode = this.weightG
                  .append("ellipse")
                  .attr("class", "weightNode")
                  .attr("rx", nodeRadius * 1.7)
                  .attr("ry", nodeRadius)
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 337..343

              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

                this.error_y = d3.scaleLinear()
                  .rangeRound([this.errorChartHeight, 2])
                  .domain([0, d3.max(this.error_history, function (d) {
                    return d;
                  }) * 1.3]);
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 207..211

              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 70.

              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

                if (gradientDescentButton !== '') {
                  $(this.table_el + " " + gradientDescentButton).click(function () {
                    trainerSelf.gradientDescentStep(1);
                    ga('send', 'event', trainerSelf.analyticsCategory, "Clicked on", "1 Gradient Descent Step");
                  });
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 2 other locations - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 88..93
              people/a/AlammarJay/js/two_variable_nn.js on lines 67..72

              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 69.

              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

                if (gradientDescent10Button !== '') {
                  $(this.table_el + " " + gradientDescent10Button).click(function () {
                    trainerSelf.gradientDescentStep(10);
                    ga('send', 'event', trainerSelf.analyticsCategory, "Clicked on", "10 Gradient Descent Steps");
                  });
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 2 other locations - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 88..93
              people/a/AlammarJay/js/two_variable_nn.js on lines 61..66

              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 69.

              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.neuralNetworkGraphEl) // 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/two_variable_nn.js and 4 other locations - About 1 hr to fix
              people/a/AlammarJay/js/shallow_nn_grapher.js on lines 26..29
              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

              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

                this.errorHolder = d3.select(this.svg_el) // select the 'div' element to append the svg
                  .append("svg")           // append an SVG element to the body
                  .attr("width", this.graphWidth)      // make the SVG element 449 pixels wide
                  .attr("height", 249);    // make the SVG element 249 pixels high
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 4 other locations - About 1 hr to fix
              people/a/AlammarJay/js/shallow_nn_grapher.js on lines 26..29
              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 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 2 locations. Consider refactoring.
              Open

                this.errorG = this.errorHolder.append("g").attr("transform", "translate(" + this.margin.left + "," + this.margin.top + ")");
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 198..200

              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 66.

              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

                this.errorG.append("defs").append("clipPath")
                  .attr("id", "clip2")
                  .append("rect")
                  .attr("width", this.errorChartWidth)
                  .attr("height", this.errorChartHeight);
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 245..249

              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 66.

              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

                this.biasG.append("text")
                  .attr("id", "biasValue")
                  .attr("text-anchor", "middle")
                  .attr("x", nodeRadius)
                  .attr("y", nodeRadius + 5)
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 773..778

              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 65.

              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

                this.errorYAxis = this.errorG.append("g")
                  .attr("class", "axis axis--y")
                  .call(d3.axisLeft(this.error_y).ticks(5));
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 232..234

              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 59.

              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 3 locations. Consider refactoring.
              Open

                this.inputNode = this.neuralNetworkG
                  .append("circle")
                  .attr("class", "input-node")
                  .attr("r", nodeRadius)
                  .attr("cx", this.neuralNetworkMargin.left + nodeRadius)
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 2 other locations - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 731..736
              people/a/AlammarJay/js/two_variable_nn.js on lines 364..369

              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 57.

              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 3 locations. Consider refactoring.
              Open

                this.inputNode = this.neuralNetworkG
                  .append("circle")
                  .attr("class", "input-node")
                  .attr("r", nodeRadius)
                  .attr("cx", this.neuralNetworkMargin.left + nodeRadius)
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 2 other locations - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 731..736
              people/a/AlammarJay/js/two_variable_nn.js on lines 325..330

              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 57.

              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

                this.errorG.selectAll(this.svg_el + " .axis--y .tick text")
                  .attr("fill", function (d) {
                    return this.errorGraphScale(d)
                  }.bind(this))
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/simple_nn.js on lines 324..327

              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 56.

              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

                    d3.range(this.numberOfInputNodes).map(function (id) {
                      this.updateParameter('weight', id, newWeights[id], false)
                    }.bind(this));
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 489..491

              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 55.

              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

                    d3.range(this.numberOfInputNodes).map(function (id) {
                      this.updateParameter('weight', id, newWeights[id], false)
                    }.bind(this));
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 1 hr to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 497..499

              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 55.

              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

                  for (var p = 0; p < this.numberOfInputNodes; p++)
                    newWeights[p] = this.weights[p] - weightAdjustments[p];
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 55 mins to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 471..472

              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 53.

              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

                  for (var m = 0; m < this.numberOfInputNodes; m++)
                    weightAdjustments[m] = this.weightLearningRates[m] * weightsMeans[m];
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 55 mins to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 476..477

              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 53.

              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

                this.errorG.append("g")
                  .attr("clip-path", "url(#clip2)")
                  .append("path")
                  .datum(this.error_history)
                  .attr("class", "error-history-line")
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 50 mins to fix
              people/a/AlammarJay/js/simple_nn.js on lines 253..257

              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

                this.weightG.append("text")
                  .attr("id", "weight1Value")
                  .attr("text-anchor", "middle")
                  .attr("y", 5)
                  .text("");
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 50 mins to fix
              people/a/AlammarJay/js/simple_nn.js on lines 751..755

              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

                this.weightG = this.neuralNetworkG.append("g")
                  .attr("transform", "translate(" + (weight1GroupX) + "," + (weight1GroupY) + ")"); //this.neuralNetworkMargin.top + this.neuralNetworkHeight / 2
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 45 mins to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 375..376

              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 50.

              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

                this.weightG = this.neuralNetworkG.append("g")
                  .attr("transform", "translate(" + (weight2GroupX) + "," + (weight2GroupY) + ")"); //this.neuralNetworkMargin.top + this.neuralNetworkHeight / 2
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 45 mins to fix
              people/a/AlammarJay/js/two_variable_nn.js on lines 335..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 50.

              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

                this.errorG.select(this.svg_el + " .axis--y")
                  .call(d3.axisLeft(this.error_y).ticks(5));
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 45 mins to fix
              people/a/AlammarJay/js/simple_nn.js on lines 320..321

              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 50.

              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/two_variable_nn.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/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 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.errorChartWidth = +this.errorHolder.attr("width") - this.margin.left - this.margin.right;
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.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/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 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.errorChartHeight = +this.errorHolder.attr("height") - this.margin.top - this.margin.bottom;
              Severity: Major
              Found in people/a/AlammarJay/js/two_variable_nn.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/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 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/two_variable_nn.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/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

              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 3 locations. Consider refactoring.
              Open

                d3.select(this.neuralNetworkGraphEl + " #biasValue")
                  .text(this.bias.toLocaleString('fr', {maximumFractionDigits: 1}));
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 2 other locations - About 35 mins to fix
              people/a/AlammarJay/js/simple_nn.js on lines 793..794
              people/a/AlammarJay/js/simple_nn.js on lines 796..797

              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 46.

              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

                this.errorGraphScale = d3.scaleLinear()
                  .domain([400, 10000, 100000, 1000000])
                  .range(this.errorGraphScaleColors);
              Severity: Minor
              Found in people/a/AlammarJay/js/two_variable_nn.js and 1 other location - About 30 mins to fix
              people/a/AlammarJay/js/simple_nn.js on lines 214..216

              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 45.

              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