people/a/AlammarJay/js/simple_nn.js

Summary

Maintainability
F
1 wk
Test Coverage

File simple_nn.js has 583 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * Created by alammar on 11/16/16.
 */


Severity: Major
Found in people/a/AlammarJay/js/simple_nn.js - About 1 day to fix

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

    NN_trainer.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", 150);    // make the SVG element 249 pixels high
    Severity: Major
    Found in people/a/AlammarJay/js/simple_nn.js - About 3 hrs to fix

      Function NN_trainer has 69 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      var NN_trainer = function (svg_el, table_el, areas, prices, weight, bias, x1, y1, x2, y2,
                                 gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
                                 gradientDescentConvergeButton, normalize, error_chart_el, heatmap_el,
                                 weightRange, biasRange, neuralNetworkGraphEl, analyticsCategory) {
        this.svg_el = svg_el;
      Severity: Major
      Found in people/a/AlammarJay/js/simple_nn.js - About 2 hrs to fix

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

        NN_trainer.prototype.initializeErrorGraph = function () {
          this.error_chart_history_x = 200;       // How many error data points to show
          this.error_chart_history_y = 100000;    // How high the bar goes
          this.error_history = [10000];
        
        
        Severity: Major
        Found in people/a/AlammarJay/js/simple_nn.js - About 2 hrs to fix

          Function NN_trainer has 21 arguments (exceeds 4 allowed). Consider refactoring.
          Open

          var NN_trainer = function (svg_el, table_el, areas, prices, weight, bias, x1, y1, x2, y2,
                                     gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
                                     gradientDescentConvergeButton, normalize, error_chart_el, heatmap_el,
                                     weightRange, biasRange, neuralNetworkGraphEl, analyticsCategory) {
          Severity: Major
          Found in people/a/AlammarJay/js/simple_nn.js - About 2 hrs to fix

            Function updateUI has 58 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            NN_trainer.prototype.updateUI = function (mean_delta_sum, errorLineValues) {
            
              //Update error chart if available
              if (this.error_chart_el !== "")
                this.addErrorPoint(mean_delta_sum);
            Severity: Major
            Found in people/a/AlammarJay/js/simple_nn.js - About 2 hrs to fix

              Function initializeHeatmap has 58 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

              NN_trainer.prototype.initializeHeatmap = function () {
              
              
                this.heatmapSideNumberOfElements = 15;
                //this.heatmapColors = ['#f7fcf0','#e0f3db','#ccebc5','#a8ddb5','#7bccc4','#4eb3d3','#2b8cbe','#0868ac','#084081'].reverse();
              Severity: Major
              Found in people/a/AlammarJay/js/simple_nn.js - About 2 hrs to fix

                Function initializeGraph has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                NN_trainer.prototype.initializeGraph = function () {
                  this.holder = d3.select(this.svg_el) // 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", 249);    // make the SVG element 249 pixels high
                Severity: Minor
                Found in people/a/AlammarJay/js/simple_nn.js - About 1 hr to fix

                  Function updateUI has a Cognitive Complexity of 11 (exceeds 5 allowed). Consider refactoring.
                  Open

                  NN_trainer.prototype.updateUI = function (mean_delta_sum, errorLineValues) {
                  
                    //Update error chart if available
                    if (this.error_chart_el !== "")
                      this.addErrorPoint(mean_delta_sum);
                  Severity: Minor
                  Found in people/a/AlammarJay/js/simple_nn.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 gradientDescentStep has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  NN_trainer.prototype.gradientDescentStep = function (number_of_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.learningRate = 0.00000001;
                  Severity: Minor
                  Found in people/a/AlammarJay/js/simple_nn.js - About 1 hr to fix

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

                    NN_trainer.prototype.gradientDescentStep = function (number_of_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.learningRate = 0.00000001;
                    Severity: Minor
                    Found in people/a/AlammarJay/js/simple_nn.js - About 55 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

                    Function NN_trainer has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring.
                    Open

                    var NN_trainer = function (svg_el, table_el, areas, prices, weight, bias, x1, y1, x2, y2,
                                               gradientDescentButton, gradientDescent10Button, gradientDescent100Button,
                                               gradientDescentConvergeButton, normalize, error_chart_el, heatmap_el,
                                               weightRange, biasRange, neuralNetworkGraphEl, analyticsCategory) {
                      this.svg_el = svg_el;
                    Severity: Minor
                    Found in people/a/AlammarJay/js/simple_nn.js - About 35 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

                    NN_trainer.prototype.batchAddErrorPoint = function (valuesArray) {
                    
                      this.error_history = this.error_history.concat(valuesArray);
                    
                    
                    
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 day to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 224..243

                    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

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

                      this.neuralNetworkMargin = {top: 10, right: 10, bottom: 10, left: 10},
                        this.neuralNetworkWidth = +this.nnGraphHolder.attr("width") - this.neuralNetworkMargin.left - this.neuralNetworkMargin.right,
                        this.neuralNetworkHeight = +this.nnGraphHolder.attr("height") - this.neuralNetworkMargin.top - this.neuralNetworkMargin.bottom,
                        this.neuralNetworkG = this.nnGraphHolder.append("g");
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 5 hrs to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 1729..1732

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

                    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

                    NN_trainer.prototype.addErrorPoint = function (value) {
                      this.error_history.push(value);
                      // Redraw the line.
                      d3.select(this.error_chart_el + " .error-history-line")
                        .attr("d", this.errorGraphLine)
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 5 hrs to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 208..221

                    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

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

                      this.errorHolder.append("text")
                        .attr("text-anchor", "middle")  // this makes it easy to centre the text as the transform is applied to the anchor
                        .attr("transform", "translate(" +
                          ((this.miniErrorChartMargin.left + this.errorChartWidth + this.miniErrorChartMargin.right) / 2)
                          + "," +
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 3 hrs to fix
                    people/a/AlammarJay/js/simple_nn.js on lines 606..613

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

                    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.heatmapHolder.append("text")
                        .attr("text-anchor", "middle")  // this makes it easy to centre the text as the transform is applied to the anchor
                        .attr("transform", "translate(" +
                          ((this.miniGraphMargin.left + this.heatmapWidth + this.miniGraphMargin.right) / 2)
                          + "," +
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 3 hrs to fix
                    people/a/AlammarJay/js/simple_nn.js on lines 261..268

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

                    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/simple_nn.js and 1 other location - About 3 hrs to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 397..405

                    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/simple_nn.js and 1 other location - About 3 hrs to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 415..420

                    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/simple_nn.js and 1 other location - About 2 hrs to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 129..135

                    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/simple_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/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

                    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(4));
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_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 579..582
                    people/a/AlammarJay/js/two_variable_nn.js on lines 138..141

                    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

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

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

                    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

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

                      this.heatmapG.append("g")
                        .attr("class", "axis axis--x")
                        .attr("transform", "translate(0," + this.heatmapHeight + ")")
                        .call(d3.axisBottom(this.heatmapXAxisScale).ticks(5));
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_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/two_variable_nn.js on lines 138..141

                    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

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

                      this.errorHolder = d3.select(this.error_chart_el) // select the 'body' element
                        .append("svg")           // append an SVG element to the body
                        .attr("width", this.miniGraphWidth)      // make the SVG element 449 pixels wide
                        .attr("height", this.miniGraphHeight);    // make the SVG element 249 pixels high
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/nn_calc.js on lines 1725..1728

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

                    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([1, d3.max(this.error_history, function (d) {
                          return d;
                        }) * 1.3]);
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 118..122

                    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 (gradientDescent10Button !== '') {
                        $(this.table_el + " " + gradientDescent10Button).click(function () {
                          trainer_self.gradientDescentStep(10);
                          ga('send', 'event', trainer_self.analyticsCategory, "Clicked on", "10 Gradient Descent Steps");
                        });
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 2 other locations - About 1 hr to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 61..66
                    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 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", 150);    // make the SVG element 249 pixels high
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_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/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

                      this.holder = d3.select(this.svg_el) // 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", 249);    // make the SVG element 249 pixels high
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_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 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 2 locations. Consider refactoring.
                    Open

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

                    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", "clip")
                        .append("rect")
                        .attr("width", this.errorChartWidth)
                        .attr("height", this.errorChartHeight);
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 148..152

                    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/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 406..411

                    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

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

                      $(this.table_el + "-weightSlider").on("mouseup touchend", (function () {
                        ga('send', 'event', trainer_self.analyticsCategory, "Interacted with", "Weight slider");
                        _paq.push(['trackEvent', trainer_self.analyticsCategory, "Interacted with", "Weight slider"]);
                      }));
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/simple_nn.js on lines 76..79

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

                    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.table_el + "-biasSlider").on("mouseup touchend", (function () {
                        ga('send', 'event', trainer_self.analyticsCategory, "Interacted with", "Bias slider");
                        _paq.push(['trackEvent', trainer_self.analyticsCategory, "Interacted with", "Bias slider"]);
                      }));
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/simple_nn.js on lines 71..74

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

                    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/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 143..145

                    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/simple_nn.js and 2 other locations - About 1 hr to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 325..330
                    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

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

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

                    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

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

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

                    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

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

                      this.heatmapG.append("g")
                        .attr("class", "axis axis--y")
                        .call(d3.axisLeft(this.heatmapYAxisScale).ticks(5));
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 1 hr to fix
                    people/a/AlammarJay/js/simple_nn.js on lines 165..167

                    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

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

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

                    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", "weightValue")
                        .attr("text-anchor", "middle")
                        .attr("y", 5)
                        .text("");
                    Severity: Minor
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 50 mins to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 384..388

                    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.errorG.select(this.error_chart_el + " .axis--y")
                        .call(d3.axisLeft(this.error_y).ticks(5));
                    Severity: Minor
                    Found in people/a/AlammarJay/js/simple_nn.js and 1 other location - About 45 mins to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 253..254

                    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.heatmapWidth = +this.heatmapHolder.attr("width") - this.miniGraphMargin.left - this.miniGraphMargin.right;
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_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 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.errorChartHeight = +this.errorHolder.attr("height") -
                        this.miniErrorChartMargin.top - this.miniErrorChartMargin.bottom;
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_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 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.heatmapHeight = +this.heatmapHolder.attr("height") - this.miniGraphMargin.top - this.miniGraphMargin.bottom;
                    Severity: Major
                    Found in people/a/AlammarJay/js/simple_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/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 3 locations. Consider refactoring.
                    Open

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

                    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

                    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/simple_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/two_variable_nn.js on lines 432..433

                    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/simple_nn.js and 1 other location - About 30 mins to fix
                    people/a/AlammarJay/js/two_variable_nn.js on lines 125..127

                    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