private RealMatrix firstLayer ( RealMatrix input ) { RealMatrix hidden = ( this . weightsOne . multiply ( input ) ) . scalarAdd ( this . biasOne ) ; double [ ] tempValues = new double [ this . hiddenLayerSize ] ; // Logistic function used for hidden layer activation for ( int i = 0 ; i < this . hiddenLayerSize ; i ++ ) { tempValues [ i ] = 1.0 / ( 1.0 + Math . pow ( Math . E , - 1.0 * hidden . getEntry ( i , 0 ) ) ) ; } return new Array2DRowRealMatrix ( tempValues ) ; }
Performs the requisite calculations between the input layer and the hidden layer .