class LearnPatternSimilarityClassifier extends ASimplifiedTSClassifier<Integer> {

	public int findNearestInstanceIndex(final int[][] leafNodeCounts) {
		double minDistance = Double.MAX_VALUE;
		int nearestInstIdx = 0;
		for (int inst = 0; inst < this.trainLeafNodes.length; inst++) {
			double tmpDist = 0;
			for (int i = 0; i < this.trainLeafNodes[inst].length; i++) {
				tmpDist += MathUtil.intManhattanDistance(this.trainLeafNodes[inst][i], leafNodeCounts[i]);
			}

			if (tmpDist < minDistance) {
				minDistance = tmpDist;
				nearestInstIdx = inst;
			}
		}
		return nearestInstIdx;
	}

	public  LearnPatternSimilarityClassifier(final int seed, final int numTrees, final int maxTreeDepth, final int numSegments);

}