code: public void trainOnInstanceImpl(Instance inst) {
  		accumulatedError= Math.abs(this.prediction(inst)-inst.classValue()) + fadingFactor*accumulatedError;
  		nError=1+fadingFactor*nError;
  		// Initialise Perceptron if necessary   
  		if (this.initialisePerceptron) {
  			//this.fadingFactor=this.fadingFactorOption.getValue();
  			//this.classifierRandom.setSeed(randomSeedOption.getValue());
  			this.classifierRandom.setSeed(randomSeed);
  			this.initialisePerceptron = false; // not in resetLearningImpl() because it needs Instance!
  			this.weightAttribute = new double[inst.numAttributes()];
  			for (int j = 0; j < inst.numAttributes(); j++) {
  				weightAttribute[j] = 2 * this.classifierRandom.nextDouble() - 1;
  			}
  			// Update Learning Rate
  			learningRatio = originalLearningRatio;
  			//this.learningRateDecay = learningRateDecayOption.getValue();
  
  		}
  
  		// Update attribute statistics
  		this.perceptronInstancesSeen++;
  		this.perceptronYSeen++;
  
  
  		for(int j = 0; j < inst.numAttributes() -1; j++)
  		{
  			perceptronattributeStatistics.addToValue(j, inst.value(j));     
  			squaredperceptronattributeStatistics.addToValue(j, inst.value(j)*inst.value(j));
  		}
  		this.perceptronsumY += inst.classValue();
  		this.squaredperceptronsumY += inst.classValue() * inst.classValue();
  
  		if(!constantLearningRatioDecay){
  			learningRatio = originalLearningRatio / (1+ perceptronInstancesSeen*learningRateDecay); 
  		}
  
  		this.updateWeights(inst,learningRatio);
  		//this.printPerceptron();
  	}
docs: Update the model using the provided instance