protected double[] firstHit(Instance inst) {
		boolean fired = false;
		int countFired = 0;
		double[] votes = new double[this.numClass];
		for (int j = 0; j < this.ruleSet.size(); j++) {
			if (this.ruleSet.get(j).ruleEvaluate(inst) == true) {
				countFired = countFired + 1;
				for (int z = 0; z < this.numClass; z++) {
					votes[z] = this.ruleSet.get(j).obserClassDistrib.getValue(z) 
							/ this.ruleSet.get(j).obserClassDistrib.sumOfValues();
					}
				return votes;
				}
			}
		if (countFired > 0) {
			fired = true;
			} else {
				fired = false;
				}
		if (fired == false) {
			votes = oberversDistribProb(inst, this.observedClassDistribution);
			}
		return votes;
		}
protected double [ ] firstHit ( Instance inst ) { boolean fired = false ; int countFired = 0 ; double [ ] votes = new double [ this . numClass ] ; for ( int j = 0 ; j < this . ruleSet . size ( ) ; j ++ ) { if ( this . ruleSet . get ( j ) . ruleEvaluate ( inst ) == true ) { countFired = countFired + 1 ; for ( int z = 0 ; z < this . numClass ; z ++ ) { votes [ z ] = this . ruleSet . get ( j ) . obserClassDistrib . getValue ( z ) / this . ruleSet . get ( j ) . obserClassDistrib . sumOfValues ( ) ; } return votes ; } } if ( countFired > 0 ) { fired = true ; } else { fired = false ; } if ( fired == false ) { votes = oberversDistribProb ( inst , this . observedClassDistribution ) ; } return votes ; }
The following three functions are used for the prediction