processData(datum){
        let sum = 0;
           for(let i = 0; i < this.weights.length; i++) {
              sum += this.weights[i] * datum[i];
           }
        let result = this.activation(sum);
        console.log('x: ' + datum[0] + ' y: ' + datum[1]);
        console.log('Output: ' + result);
        return result;
    }
/*
    Takes an array of floats as input
    the datum is 1 row of the training data or any single array input data
    */
Takes an array of floats as input
the datum is 1 row of the training data or any single array input data
Takes an array of floats as input the datum is 1 row of the training data or any single array input data
processData(datum){
        let sum = 0;
           for(let i = 0; i < this.weights.length; i++) {
              sum += this.weights[i] * datum[i];
           }
        let result = this.activation(sum);
        console.log('x: ' + datum[0] + ' y: ' + datum[1]);
        console.log('Output: ' + result);
        return result;
    }
processData ( datum ) { let sum = 0 ; for ( let i = 0 ; i < this . weights . length ; i ++ ) { sum += this . weights [ i ] * datum [ i ] ; } let result = this . activation ( sum ) ; console . log ( 'x: ' + datum [ 0 ] + ' y: ' + datum [ 1 ] ) ; console . log ( 'Output: ' + result ) ; return result ; }
Takes an array of floats as input
the datum is 1 row of the training data or any single array input data
Takes an array of floats as input the datum is 1 row of the training data or any single array input data