docs: public void trainOnInstanceImpl(Instance inst) {
  		accumulatedError= Math.abs(this.prediction(inst)-inst.classValue())*inst.weight() + fadingFactor*accumulatedError;
  		nError=inst.weight()+fadingFactor*nError;
  		// Initialise Perceptron if necessary   
  		if (this.initialisePerceptron == true) {
  			//Initialize numericAttributesIndex
  			LinkedList<Integer> numericIndices= new LinkedList<Integer>();
  			for (int i = 0; i < inst.numAttributes(); i++)
  				if(inst.attribute(i).isNumeric() && i!=inst.classIndex())
  					numericIndices.add(i);
  			numericAttributesIndex=new int[numericIndices.size()];
  			int j=0;
  			for(Integer index : numericIndices)
  				numericAttributesIndex[j++]=index;
  
  			this.fadingFactor=this.fadingFactorOption.getValue();
  			this.initialisePerceptron = false; // not in resetLearningImpl() because it needs Instance!
  			this.weightAttribute = new double[numericAttributesIndex.length+1];
  			for (int i = 0; i < numericAttributesIndex.length+1; i++) {
  				//if (inst.attribute(i).isNumeric())
  				weightAttribute[i] = 2 * this.classifierRandom.nextDouble() - 1;
  			}
  			// Update Learning Rate
  			learningRatio = learningRatioOption.getValue();
  			this.learningRateDecay = learningRateDecayOption.getValue();
  
  		}
  
  		// Update attribute statistics
  		this.perceptronInstancesSeen+=inst.weight();
  		this.perceptronYSeen+=inst.weight();
  
  
  		for(int j = 0; j < numericAttributesIndex.length; j++)
  		{
  			int instAttIndex = modelAttIndexToInstanceAttIndex(numericAttributesIndex[j], inst);
  			double value=inst.value(instAttIndex);
  			perceptronattributeStatistics.addToValue(j, value*inst.weight());	
  			squaredperceptronattributeStatistics.addToValue(j, value*value*inst.weight());
  		}
  		double value=inst.classValue();
  		this.perceptronsumY += value*inst.weight();
  		this.squaredperceptronsumY += value * value*inst.weight();
  
  		if(constantLearningRatioDecayOption.isSet()==false){
  			learningRatio = learningRatioOption.getValue() / (1+ perceptronInstancesSeen*learningRateDecay); 
  		}
  
  		//double prediction = this.updateWeights(inst,learningRatio);
  		//accumulatedError= Math.abs(prediction-inst.classValue()) + fadingFactor*accumulatedError;
  
  
  		this.updateWeights(inst,learningRatio);
  
  	}