public static void main(String[] args)
    {	
	System.out.println("\n\n***********************************");
	System.out.println("* JBO Pulsar Classifiication Tool *");
	System.out.println("***********************************");
	System.out.println("* Version 1.0                     *");
	System.out.println("* By Rob Lyon                     *");
	System.out.println("* Contact robert.lyon@cs.man.ac.uk*");
	System.out.println("***********************************\n");
	System.out.println("Processing command line arguments.");

	// Process any command line arguments.
	if (args != null)
	{		
	    if (args.length > 0)
	    {
		for(int i =0; i<args.length;i++)
		    input.processArgument(args[i]);
	    }
	}

	// Continue to load application.

	final DebugLogger  log = new DebugLogger(input.isLoggingEnabled());

	// temporary setting whilst testing
	//log.enableLogging();
	log.out("Starting");

	System.out.println("\n***********************************");
	System.out.println("* Data Recieved From Command Line *");
	System.out.println("***********************************\n");
	System.out.println(input.toString());
	System.out.println("\n***********************************\n");

	if(input.getActionPossibleFromInputs().equals(Constants.AUTOMATED_TRAINING))
	{
	    System.out.println("AUTOMATED_TRAINING");
	    I_Controller c = new AutoTrainerController(input);
	    c.run();
	}
	else if(input.getActionPossibleFromInputs().equals(Constants.AUTOMATED_CLASSIFICATION))
	{
	    System.out.println("AUTOMATED_CLASSIFICATION");
	    I_Controller c = new AutoClassificationController(input);
	    c.run();
	}
	else if(input.getActionPossibleFromInputs().equals(Constants.AUTOMATED_TESTING))
	{
	    System.out.println("AUTOMATED_TESTING");
	}
	else // BUILD GUI
	{
	    System.out.println("No Arguments supplied.\n");

	    System.out.println("********************************************************************************");
	    System.out.println("Usage: java -jar JBOPulsarClassificationTool <arg 1> ... < arg n>" );
	    System.out.println("Arguments:");
	    System.out.println(" -acc=          The desired accuracy of the network being trained (0 - 100)." );   
	    System.out.println(" -country=      The country choice for GUI setup, i.e. UK." );
	    System.out.println(" -classifier=   The desired classifier to use, 1 is KNN, 0 is naive." );
	    System.out.println(" -lang=         The language choice for GUI setup, i.e. EN." );
	    System.out.println(" -load=         The neural network to load." );
	    System.out.println(" -save=         The path to save a neural network at." );
	    System.out.println(" -t=            Path to the training set." );
	    System.out.println(" -v=            Path to the validation set." );
	    System.out.println(" -k=            Value of K for a KNN classifier (between 2 and 9 arbitrarily)." );
	    System.out.println(" -tests=        The number of tests to run." );
	    System.out.println(" -w=            The width of the self organizing map, defaults to 10." );
	    System.out.println(" -settings=     The path to a settings file that may contain these arguments.");
	    System.out.println("********************************************************************************\n");

	    System.out.println("Attempting to build GUI...");

	    EventQueue.invokeLater(new Runnable()
	    {
		public void run()
		{	
		    try 
		    {
			// Set the system look and feel
			UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
		    } 
		    catch (Exception e) {} // Don't worry about the exceptions.

		    try
		    {
			// First clear log.				
			Logging.clearLog();

			// Initialise controller that will build view/model.
			//Controller c = new Controller(log);

			//if(!c.initialise(messages)) // if we can't initialise the controller.
			//Logging.log("Could not initialise Controller exiting");

			System.out.println("GUI not built yet!");

			//**************************************************
			//*        ADDED TO FIND CLUSTER SIMILARITY        *
			//**************************************************

			/*
			// Variables
			String t_DataPath = "/Users/rob/git/JBO-Pulsar-Classifier/JBO Pulsar Classifier Tool/Resources/training_set_mod.pat";
			String v_DataPath = "/Users/rob/git/JBO-Pulsar-Classifier/JBO Pulsar Classifier Tool/Resources/validation_set.pat";
			String initialisedNetworkPath = "/Users/rob/PRE_INITIALISED_NETWORK.xml";
			String outputFilePath = "/Users/rob/CLUSTER_RESULTS.txt";
			int classifier_type = 1;// KNN
			int mapWidth = 12;
			
			//Experiments.preInitialiseSOM(t_DataPath, initialisedNetworkPath, mapWidth);
			
			Experiments.getClusterSimilarity(classifier_type, initialisedNetworkPath, t_DataPath, v_DataPath, outputFilePath);
			
			 */

			//**************************************************
			//*        		END           		   *
			//**************************************************

			//**************************************************
			//*        ADDED TO TEST WITH LARGE DATA           *
			//**************************************************
			
			
			String pathToClassificationFiles = "/Users/rob/Sugarsync/Code/workspace/DATA/CandidateData/ClassificationData/snss_versions";
			String pathToTrainingFiles = "/Users/rob/Sugarsync/Code/workspace/DATA/CandidateData/TrainingData";// Original training set
			//String pathToTrainingFiles = "/Users/rob/Sugarsync/Code/workspace/DATA/CandidateData/TrainingData_Negatives_Altered/snss_versions/random_loaded"; // Negatives altered
			//String pathToTrainingFiles = "/Users/rob/Sugarsync/Code/workspace/DATA/CandidateData/TrainingData_Positive_Labelling_Altered/snss_versions/random_loaded";// Positives relabelled
			//String pathToTrainingFiles = "/Users/rob/Sugarsync/Code/workspace/DATA/CandidateData/TrainingData_Positives_Altered/snss_versions/random_loaded";// Positives removed
			int classifier_type = 1;// KNN
			int mapWidth = 12;
			int k = 13;
			int min_k = 1;
			int max_k = 21;
			int tieBreakingParameter = 1;//Randomly
			
			//Experiments.classificationTestsStaticK(pathToTrainingFiles, pathToClassificationFiles, classifier_type, mapWidth, k);
			Experiments.classificationTestsVariableK(pathToTrainingFiles,pathToClassificationFiles,mapWidth,k,tieBreakingParameter);			
			
			System.exit(0);
			//**************************************************
			//*                   REMOVE                       *
			//**************************************************
		    }
		    catch (Exception e)
		    { 
			e.printStackTrace();
			Logging.errorLog("Error intialising Controller", e); 
		    }
		}
	    });
	}

	System.out.println("\n********************************************************************************");
	System.out.println("Usage: java -jar JBOPulsarClassificationTool <arg 1> ... < arg n>" );
	System.out.println("Arguments:");
	System.out.println(" -acc=          The desired accuracy of the network being trained (0 - 100)." );   
	System.out.println(" -country=      The country choice for GUI setup, i.e. UK." );
	System.out.println(" -classifier=   The desired classifier to use, 1 is KNN, 0 is naive." );
	System.out.println(" -lang=         The language choice for GUI setup, i.e. EN." );
	System.out.println(" -load=         The neural network to load." );
	System.out.println(" -save=         The path to save a neural network at." );
	System.out.println(" -t=            Path to the training set." );
	System.out.println(" -v=            Path to the validation set." );
	System.out.println(" -k=            Value of K for a KNN classifier (between 2 and 9 arbitrarily)." );
	System.out.println(" -tests=        The number of tests to run." );
	System.out.println(" -w=            The width of the self organizing map, defaults to 10." );
	System.out.println(" -settings=     The path to a settings file that may contain these arguments.");
	System.out.println("********************************************************************************\n\n");
	System.out.println("Done.");
    }