@ Override public double [ ] getVotesForInstance ( Instance inst ) { double [ ] votes = new double [ 2 ] ; if ( this . reset == false ) { double error = this . getAnomalyScore ( inst ) ; // Exponential function to convert the error [0, +inf) into a vote [1,0]. votes [ 0 ] = Math . pow ( 2.0 , - 1.0 * ( error / this . threshold ) ) ; votes [ 1 ] = 1.0 - votes [ 0 ] ; } return votes ; }
Calculates the error between the autoencoder s reconstruction of the input and the argument instances . This error is converted to vote scores .