@SuppressWarnings("unused")
    public static void getClusterSimilarity(int classifier_type,String initialisedNetworkPath,String t_DataPath,String v_DataPath,String outputFilePath)
    {

	// Clear the output file
	Common.fileDelete(outputFilePath);

	// Write the CSV headers to the file.
	Writer.write(outputFilePath,",STATS,X,Y,\n");

	// Get the Training Data
	I_DataSet t_data = new PatternFileProcessor().process(t_DataPath);
	I_DataSet v_data = new PatternFileProcessor().process(v_DataPath);

	System.out.println("Training Data Rows:"+t_data.getRows());
	System.out.println("Training Data Cols:"+t_data.getColumns());

	// Major error if we return at this stage. This
	// means that the training data
	// can't be read, or is just plain invalid.
	if(t_data == null)
	{
	    System.out.println("Training data is null.");
	    System.exit(0);
	}

	// Read in pre-initialised SOM network. By loading in the 
	// same network state prior to training, we should be able
	// to reproduce map states, given that the starting state
	// is now the same (i.e. no longer randomly initialised).
	SOMClassifier classifier = (SOMClassifier)SOMClassifier.read(initialisedNetworkPath);

	// Ensure the SOM has the correct training data.
	classifier.map.setData(t_data.getDataAsArrayList());

	// Train the map.

	// This method ensures reproducibility, as the map is not
	// trained using calls to random.
	//classifier.map.TrainNoRandom(0.000001);
	classifier.map.Train(0.000001);

	// If no clusters are found, then something has gone wrong.
	// Perhaps the training data has no positive instance?
	if(!classifier.locateClusters(t_data))
	{
	    System.out.println("No clusters found.");
	    System.exit(0); // Just exit.
	}

	// Validate against validation data set
	if(classifier_type < 0)
	    classifier.validate(v_data, 0);
	else
	    classifier.validate(v_data, classifier_type);

	// Get Statistics
	I_ClassifierStatistics stats = classifier.getStatistics();

	// If there are more than zero positive instances.
	if(classifier.positiveCoords.size() < 0)
	{
	    System.out.println("No positive co-ordinates found.");
	    return;
	}

	System.out.println("Positive Co-ords: "+ classifier.positiveCoords.size());

	double totalDistance = 0.0;
	List<String> distances = new ArrayList<String>();
	int totalPositive = classifier.positiveCoords.size();

	// For each positive point
	for(int i = 0; i < totalPositive-1;i++)
	{
	    // Work out its distance to all other points.
	    Point p = classifier.positiveCoords.get(i);
	    Writer.write(outputFilePath,",,"+p.getX()+","+p.getY()+",\n");

	    for(int j = i+1; j < classifier.positiveCoords.size();j++)
	    {
		Point tmp = classifier.positiveCoords.get(j);
		double dist = Common.distance(p.getX(),p.getY(),tmp.getX(),tmp.getY());
		distances.add(Double.toString(dist));
		totalDistance += dist;
	    }
	}

	// Append some details and formatting to output file.
	Writer.write(outputFilePath,",,"+classifier.positiveCoords.get(totalPositive-1).getX()+","+classifier.positiveCoords.get(totalPositive-1).getX()+",\n");
	Writer.write(outputFilePath,",,,,\n");

	// Now calculate the statistics for these positive points.
	double min = StatsOps.Min(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",MIN,"+min+",,\n");
	double max = StatsOps.Max(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",MAX,"+max+",,\n");
	double var = StatsOps.Varience(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",VAR,"+var+",,\n");
	double stdev = StatsOps.StandardDeviation(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",STDEV,"+stdev+",,\n");			    
	double avg = totalDistance / (classifier.positiveCoords.size() * (classifier.positiveCoords.size() -1))/2;
	Writer.write(outputFilePath,",AVG,"+avg+",,\n");
	Writer.write(outputFilePath,",,,,\n");

	// Un-comment as necessary
	/*System.out.println("Average distance: "+ avg);
	System.out.println("Min distance: "+ min);
	System.out.println("Max distance: "+ max);
	System.out.println("Varience distance: "+ var);
	System.out.println("Standard Deviation: "+ stdev);*/


	// Now we do the same for the negative co-ordinates.
	if(classifier.negativeCoords.size() > 0)
	{
	    System.out.println("No negative co-ordinates found.");
	    return;
	}
	Writer.write(outputFilePath,",,X,Y,\n");

	System.out.println("Negative Co-ords: "+ classifier.negativeCoords.size());

	totalDistance = 0.0;

	// Clear previous points.
	distances.clear();
	distances = new ArrayList<String>();

	int totalNegative = classifier.negativeCoords.size();
	for(int i = 0; i < totalNegative-1;i++)
	{
	    Point p = classifier.negativeCoords.get(i);
	    Writer.write(outputFilePath,",,"+p.getX()+","+p.getY()+",\n");

	    for(int j = i+1; j < classifier.negativeCoords.size();j++)
	    {
		Point tmp = classifier.negativeCoords.get(j);
		double dist = Common.distance(p.getX(),p.getY(),tmp.getX(),tmp.getY());
		distances.add(Double.toString(dist));
		totalDistance += dist;
	    }
	}

	// Append some details and formatting to output file.
	Writer.write(outputFilePath,",,"+classifier.negativeCoords.get(totalNegative-1).getX()+","+classifier.negativeCoords.get(totalNegative-1).getX()+",\n");
	Writer.write(outputFilePath,",,,,\n");

	min = StatsOps.Min(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",MIN,"+min+",,\n");
	max = StatsOps.Max(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",MAX,"+max+",,\n");
	var = StatsOps.Varience(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",VAR,"+var+",,\n");
	stdev = StatsOps.StandardDeviation(com.scienceguyrob.utils.Common.convertStringListToDoubleArray(distances));
	Writer.write(outputFilePath,",STDEV,"+stdev+",,\n");			    
	avg = totalDistance / (classifier.negativeCoords.size() * (classifier.negativeCoords.size() -1))/2;
	Writer.write(outputFilePath,",AVG,"+avg+",,\n");
	Writer.write(outputFilePath,",,,,\n");

	// Un-comment as necessary
	/*System.out.println("Average distance: "+ avg);
	System.out.println("Min distance: "+ min);
	System.out.println("Max distance: "+ max);
	System.out.println("Varience distance: "+ var);
	System.out.println("Standard Deviation: "+ stdev);*/

	// More formatting
	Writer.write(outputFilePath,",,,,\n");
	Writer.write(outputFilePath,",X,Y,FREQ,\n");

	// Now I obtain the frequencies of the points.
	ArrayList<FrequencyPoint> fPoints = new ArrayList<FrequencyPoint>();
	for(int i = 0; i < classifier.positiveCoords.size();i++)
	{
	    Point p = classifier.positiveCoords.get(i);

	    if(fPoints.size() == 0)
		fPoints.add(new FrequencyPoint(p.x,p.y,1));
	    else
	    {
		boolean recorded = false;

		for(int j = 0 ; j <fPoints.size(); j++)
		{
		    if(fPoints.get(j).X == p.x &&
			    fPoints.get(j).Y == p.y)
		    {
			fPoints.get(j).frequency++;
			recorded = true;
			break;
		    }
		}

		if(!recorded) { fPoints.add(new FrequencyPoint(p.x,p.y,1)); }
	    }
	}

	for(int i = 0; i < fPoints.size();i++)
	{
	    FrequencyPoint p = fPoints.get(i);
	    Writer.write(outputFilePath,","+p.X+","+p.Y+","+p.frequency+",\n");
	}

	Writer.write(outputFilePath,",,,,\n");
	Writer.write(outputFilePath,",X,Y,FREQ,\n");

	fPoints.clear();
	for(int i = 0; i < classifier.negativeCoords.size();i++)
	{
	    Point p = classifier.negativeCoords.get(i);

	    if(fPoints.size() == 0)
		fPoints.add(new FrequencyPoint(p.x,p.y,1));
	    else
	    {
		boolean recorded = false;

		for(int j = 0 ; j <fPoints.size(); j++)
		{
		    if(fPoints.get(j).X == p.x &&
			    fPoints.get(j).Y == p.y)
		    {
			fPoints.get(j).frequency++;
			recorded = true;
			break;
		    }
		}

		if(!recorded) { fPoints.add(new FrequencyPoint(p.x,p.y,1)); }
	    }
	}

	for(int i = 0; i < fPoints.size();i++)
	{
	    FrequencyPoint p = fPoints.get(i);
	    Writer.write(outputFilePath,","+p.X+","+p.Y+","+p.frequency+",\n");
	}
    }