Index: in/trunk/model-sites-dev/mars/RUN-APPLY-VALANCE-MODEL.sh
===================================================================
--- /main/trunk/model-sites-dev/mars/RUN-APPLY-VALANCE-MODEL.sh	(revision 34796)
+++ 	(revision )
@@ -1,15 +1,0 @@
-#!/bin/bash
-
-input_data_filename=${1:-collect/deam/etc/deam-essentia-features-arousal-valence.arff}
-output_data_filename=${2:-predicted-valance.csv}
-
-. ./_set_weka_classpath.bash
-
-java -cp "$cp_args" org.greenstone.mars.WekaApplyValanceModel \
-     "reptree-valance-serialized.model" \
-     "$input_data_filename" \
-     "$output_data_filename" 
-
-
-
-    
Index: /main/trunk/model-sites-dev/mars/RUN-APPLY-VALENCE-MODEL.sh
===================================================================
--- /main/trunk/model-sites-dev/mars/RUN-APPLY-VALENCE-MODEL.sh	(revision 34797)
+++ /main/trunk/model-sites-dev/mars/RUN-APPLY-VALENCE-MODEL.sh	(revision 34797)
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+input_data_filename=${1:-collect/deam/etc/deam-essentia-features-arousal-valence.arff}
+output_data_filename=${2:-predicted-valence.csv}
+
+. ./_set_weka_classpath.bash
+
+java -cp "$cp_args" org.greenstone.mars.WekaApplyValenceModel \
+     "reptree-valence-serialized.model" \
+     "$input_data_filename" \
+     "$output_data_filename" 
+
+
+
+    
Index: in/trunk/model-sites-dev/mars/RUN-TRAIN-VALANCE-MODEL.sh
===================================================================
--- /main/trunk/model-sites-dev/mars/RUN-TRAIN-VALANCE-MODEL.sh	(revision 34796)
+++ 	(revision )
@@ -1,9 +1,0 @@
-#!/bin/bash
-
-. ./_set_weka_classpath.bash
-
-java -cp "$cp_args" org.greenstone.mars.WekaTrainValanceModel \
-     "collect/deam/etc/deam-essentia-features-arousal-valence.arff" \
-     "reptree-valance-serialized.model"
-
-    
Index: /main/trunk/model-sites-dev/mars/RUN-TRAIN-VALENCE-MODEL.sh
===================================================================
--- /main/trunk/model-sites-dev/mars/RUN-TRAIN-VALENCE-MODEL.sh	(revision 34797)
+++ /main/trunk/model-sites-dev/mars/RUN-TRAIN-VALENCE-MODEL.sh	(revision 34797)
@@ -0,0 +1,9 @@
+#!/bin/bash
+
+. ./_set_weka_classpath.bash
+
+java -cp "$cp_args" org.greenstone.mars.WekaTrainValenceModel \
+     "collect/deam/etc/deam-essentia-features-arousal-valence.arff" \
+     "reptree-valence-serialized.model"
+
+    
Index: /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyArousalModel.java
===================================================================
--- /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyArousalModel.java	(revision 34796)
+++ /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyArousalModel.java	(revision 34797)
@@ -87,7 +87,7 @@
 		// Dealing with ground-truth data:
 		//   => already has 'arousal' attribute
-		//   => in fact has 'valance' attribute too, which we want to remove
+		//   => in fact has 'valence' attribute too, which we want to remove
 		
-		unlabeled_instances = WekaUtil.applyFilter(unlabeled_instances,"472"); // top-up with removal of 'valance'
+		unlabeled_instances = WekaUtil.applyFilter(unlabeled_instances,"472"); // top-up with removal of 'valence'
 		
 		// reference share this as 'groundtruth_instances' to trigger error calculation and output
Index: in/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyValanceModel.java
===================================================================
--- /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyValanceModel.java	(revision 34796)
+++ 	(revision )
@@ -1,79 +1,0 @@
-package org.greenstone.mars;
-
-//import java.util.Random;
-
-import java.io.BufferedInputStream;
-import java.io.FileInputStream;
-
-import java.io.BufferedReader;
-import java.io.BufferedWriter;
-import java.io.FileReader;
-import java.io.FileWriter;
-
-import weka.core.converters.ConverterUtils.DataSource;
-import weka.core.Attribute;
-import weka.core.Instance;
-import weka.core.Instances;
-import weka.core.SerializationHelper;
-
-import weka.filters.Filter;
-import weka.filters.unsupervised.attribute.Remove;
-
-import weka.classifiers.Classifier;
-
-
-// Based on:
-//   https://waikato.github.io/weka-wiki/use_weka_in_your_java_code/
-
-class WekaApplyValanceModel
-{
-    
-    public static void main(String[] args)
-    {
-	WekaUtil.checkUsageApplyModel(args);
-	
-	String classifier_input_filename        = args[0];
-	String unclassified_data_input_filename = args[1];
-	String classified_data_output_filename  = args[2];
-
-	Classifier classifier = WekaUtil.loadClassifierModel(classifier_input_filename);
-
-	Instances unlabeled_instances= WekaUtil.loadInstancesForClassification(unclassified_data_input_filename);
-
-	// It is permissible to run this code and supply it with a data file that includes groundtruth in it.
-	// In this situation, the 'unlabeled' instances:
-	//  (i) need to be massaged to be in the same form as truly unlabeled data
-	// (ii) we also set up 'groundtruth_instances' as an alias (reference) to 'filtered_unlabeled_instanced'
-	//      to trigger calculating the error on the predicted vaues
-
-	boolean has_groundtruth_data = WekaUtil.instancesHavePredictAttribute(unlabeled_instances,WekaUtil.VALANCE_ATTRIBUTE_NAME);	
-
-	// The following deals with (i) internally, ensuring that what is returned is suitable for making predictions on
-	Instances filtered_unlabeled_instances
-	    = WekaUtil.filterInstancesForApplying(unlabeled_instances,has_groundtruth_data,
-						  WekaUtil.VALANCE_ATTRIBUTE_NAME,"471");
-
-	// The following deals with (ii)
-	Instances groundtruth_instances = (has_groundtruth_data) ? filtered_unlabeled_instances : null;
-	
-	Instances labeled_instances = WekaUtil.makePredictions(classifier, filtered_unlabeled_instances, groundtruth_instances);
-	    
-	try {
-	    // Save labeled data
-	    
-	    System.out.println("Saving labeled instances: " + classified_data_output_filename);		
-	    FileWriter fw = new FileWriter(classified_data_output_filename);
-	    BufferedWriter bw = new BufferedWriter(fw);
-	    
-	    bw.write(labeled_instances.toString());
-	    bw.newLine();
-	    bw.flush();
-	    bw.close();
-		     
-	}
-	catch (Exception e) {
-	    e.printStackTrace();
-	}
-	    
-    }
-}
Index: /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyValenceModel.java
===================================================================
--- /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyValenceModel.java	(revision 34797)
+++ /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaApplyValenceModel.java	(revision 34797)
@@ -0,0 +1,79 @@
+package org.greenstone.mars;
+
+//import java.util.Random;
+
+import java.io.BufferedInputStream;
+import java.io.FileInputStream;
+
+import java.io.BufferedReader;
+import java.io.BufferedWriter;
+import java.io.FileReader;
+import java.io.FileWriter;
+
+import weka.core.converters.ConverterUtils.DataSource;
+import weka.core.Attribute;
+import weka.core.Instance;
+import weka.core.Instances;
+import weka.core.SerializationHelper;
+
+import weka.filters.Filter;
+import weka.filters.unsupervised.attribute.Remove;
+
+import weka.classifiers.Classifier;
+
+
+// Based on:
+//   https://waikato.github.io/weka-wiki/use_weka_in_your_java_code/
+
+class WekaApplyValenceModel
+{
+    
+    public static void main(String[] args)
+    {
+	WekaUtil.checkUsageApplyModel(args);
+	
+	String classifier_input_filename        = args[0];
+	String unclassified_data_input_filename = args[1];
+	String classified_data_output_filename  = args[2];
+
+	Classifier classifier = WekaUtil.loadClassifierModel(classifier_input_filename);
+
+	Instances unlabeled_instances= WekaUtil.loadInstancesForClassification(unclassified_data_input_filename);
+
+	// It is permissible to run this code and supply it with a data file that includes groundtruth in it.
+	// In this situation, the 'unlabeled' instances:
+	//  (i) need to be massaged to be in the same form as truly unlabeled data
+	// (ii) we also set up 'groundtruth_instances' as an alias (reference) to 'filtered_unlabeled_instanced'
+	//      to trigger calculating the error on the predicted vaues
+
+	boolean has_groundtruth_data = WekaUtil.instancesHavePredictAttribute(unlabeled_instances,WekaUtil.VALENCE_ATTRIBUTE_NAME);	
+
+	// The following deals with (i) internally, ensuring that what is returned is suitable for making predictions on
+	Instances filtered_unlabeled_instances
+	    = WekaUtil.filterInstancesForApplying(unlabeled_instances,has_groundtruth_data,
+						  WekaUtil.VALENCE_ATTRIBUTE_NAME,"471");
+
+	// The following deals with (ii)
+	Instances groundtruth_instances = (has_groundtruth_data) ? filtered_unlabeled_instances : null;
+	
+	Instances labeled_instances = WekaUtil.makePredictions(classifier, filtered_unlabeled_instances, groundtruth_instances);
+	    
+	try {
+	    // Save labeled data
+	    
+	    System.out.println("Saving labeled instances: " + classified_data_output_filename);		
+	    FileWriter fw = new FileWriter(classified_data_output_filename);
+	    BufferedWriter bw = new BufferedWriter(fw);
+	    
+	    bw.write(labeled_instances.toString());
+	    bw.newLine();
+	    bw.flush();
+	    bw.close();
+		     
+	}
+	catch (Exception e) {
+	    e.printStackTrace();
+	}
+	    
+    }
+}
Index: /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainArousalModel.java
===================================================================
--- /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainArousalModel.java	(revision 34796)
+++ /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainArousalModel.java	(revision 34797)
@@ -48,5 +48,5 @@
 	String output_model_filename = args[1];
 
-	// knock out 472 (valance) from dataset
+	// knock out 472 (valence) from dataset
 	Instances filtered_data_instances = WekaUtil.loadAndFilterDataInstances(input_data_filename, "472");
 	Classifier classifier = WekaUtil.trainREPTree(filtered_data_instances);
@@ -73,5 +73,5 @@
 
 	    // *********
-	    Instances filtered_data_instances = WekaUtil.applyFilter(data_instances,"472"); // top-up with removal of 'valance'
+	    Instances filtered_data_instances = WekaUtil.applyFilter(data_instances,"472"); // top-up with removal of 'valence'
 
 			
Index: in/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainValanceModel.java
===================================================================
--- /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainValanceModel.java	(revision 34796)
+++ 	(revision )
@@ -1,95 +1,0 @@
-package org.greenstone.mars;
-    
-//import weka.core.converters.ConverterUtils.DataSource;
-import weka.core.Instances;
- 
-//import weka.filters.Filter;
-//import weka.filters.unsupervised.attribute.Remove;
-
-import weka.classifiers.Classifier;
-import weka.classifiers.Evaluation;
-//import weka.classifiers.trees.REPTree;
-
-// Based on:
-//   https://waikato.github.io/weka-wiki/use_weka_in_your_java_code/
-
-
-class WekaTrainValanceModel
-{
-    // Scheme:       weka.classifiers.trees.REPTree -M 2 -V 0.001 -N 3 -S 1 -L -1 -I 0.0   -- (i.e., default vals)
-    // Relation:     deam-essentia-features-arousal-valence-weka.filters.unsupervised.attribute.Remove-R471-weka.filters.unsupervised.attribute.Remove-R458-466-weka.filters.unsupervised.attribute.Remove-R425
-    // Instances:    1743
-
-    // Note, above missed -R 427 (ordinal val)
-
-    
-    public static void main(String[] args)
-    {
-	/*
-	if (args.length != 2) {
-	    System.err.println("Error: incorrect number of command-line arguments");
-	    System.err.println("Usage: input_training_data.arff output-model.{model|ser}");
-	    System.exit(1);
-	    }*/
-	
-	WekaUtil.checkUsageTraining(args);
-
-	String input_data_filename = args[0];
-	String output_model_filename = args[1];
-
-	// knock out 471 (arousal) from dataset
-	Instances filtered_data_instances = WekaUtil.loadAndFilterDataInstances(input_data_filename, "471");
-	Classifier classifier = WekaUtil.trainREPTree(filtered_data_instances);
-	System.out.println(classifier);
-		    		    
-	Evaluation eval = WekaUtil.evaluateClassifier(classifier,filtered_data_instances);
-	System.out.println(eval.toSummaryString());
-
-	try {
-	    System.out.println("Saving REPTree classifier model as: " + output_model_filename);
-	    weka.core.SerializationHelper.write(output_model_filename, classifier);
-	}
-	catch (Exception e) {
-	    e.printStackTrace();
-	}
-
-	/*	
-        System.out.println("Training on ARFF file: " + input_arff_filename);
-
-	try {
-	    DataSource data_source = new DataSource(input_arff_filename);
-	    Instances data_instances = data_source.getDataSet();
-
-	    // *********
-	    Instances filtered_data_instances = WekaUtil.applyFilter(data_instances,"471"); // top-up with removal of 'arousal'
-
-	    // ****** comment varies
-	    // With removal of R471, last column is the one we want to predict => numAttributes()-1
-	    filtered_data_instances.setClassIndex(filtered_data_instances.numAttributes()-1);
-	    
-
-	    // Build scheme/classifier
-	    REPTree classifier = new REPTree(); // scheme
-	    String[] reptree_options = weka.core.Utils.splitOptions("-M 2 -V 0.001 -N 3 -S 1 -L -1 -I 0.0");
-	    classifier.setOptions(reptree_options);
-
-	    classifier.buildClassifier(filtered_data_instances);
-	    System.out.println(classifier);
-
-	    
-	    Evaluation eval = WekaUtil.evaluateClassifier(classifier,filtered_data_instances);
-	    System.out.println(eval.toSummaryString());
-		    
-	    System.out.println("Saving REPTree classifier model as: " + output_model_filename);
-	    weka.core.SerializationHelper.write(output_model_filename, classifier);
-
-	     
-	}
-	catch (Exception e) {
-	    e.printStackTrace();
-	}
- 
-	*/
-	
-    }
-}
Index: /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainValenceModel.java
===================================================================
--- /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainValenceModel.java	(revision 34797)
+++ /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaTrainValenceModel.java	(revision 34797)
@@ -0,0 +1,95 @@
+package org.greenstone.mars;
+    
+//import weka.core.converters.ConverterUtils.DataSource;
+import weka.core.Instances;
+ 
+//import weka.filters.Filter;
+//import weka.filters.unsupervised.attribute.Remove;
+
+import weka.classifiers.Classifier;
+import weka.classifiers.Evaluation;
+//import weka.classifiers.trees.REPTree;
+
+// Based on:
+//   https://waikato.github.io/weka-wiki/use_weka_in_your_java_code/
+
+
+class WekaTrainValenceModel
+{
+    // Scheme:       weka.classifiers.trees.REPTree -M 2 -V 0.001 -N 3 -S 1 -L -1 -I 0.0   -- (i.e., default vals)
+    // Relation:     deam-essentia-features-arousal-valence-weka.filters.unsupervised.attribute.Remove-R471-weka.filters.unsupervised.attribute.Remove-R458-466-weka.filters.unsupervised.attribute.Remove-R425
+    // Instances:    1743
+
+    // Note, above missed -R 427 (ordinal val)
+
+    
+    public static void main(String[] args)
+    {
+	/*
+	if (args.length != 2) {
+	    System.err.println("Error: incorrect number of command-line arguments");
+	    System.err.println("Usage: input_training_data.arff output-model.{model|ser}");
+	    System.exit(1);
+	    }*/
+	
+	WekaUtil.checkUsageTraining(args);
+
+	String input_data_filename = args[0];
+	String output_model_filename = args[1];
+
+	// knock out 471 (arousal) from dataset
+	Instances filtered_data_instances = WekaUtil.loadAndFilterDataInstances(input_data_filename, "471");
+	Classifier classifier = WekaUtil.trainREPTree(filtered_data_instances);
+	System.out.println(classifier);
+		    		    
+	Evaluation eval = WekaUtil.evaluateClassifier(classifier,filtered_data_instances);
+	System.out.println(eval.toSummaryString());
+
+	try {
+	    System.out.println("Saving REPTree classifier model as: " + output_model_filename);
+	    weka.core.SerializationHelper.write(output_model_filename, classifier);
+	}
+	catch (Exception e) {
+	    e.printStackTrace();
+	}
+
+	/*	
+        System.out.println("Training on ARFF file: " + input_arff_filename);
+
+	try {
+	    DataSource data_source = new DataSource(input_arff_filename);
+	    Instances data_instances = data_source.getDataSet();
+
+	    // *********
+	    Instances filtered_data_instances = WekaUtil.applyFilter(data_instances,"471"); // top-up with removal of 'arousal'
+
+	    // ****** comment varies
+	    // With removal of R471, last column is the one we want to predict => numAttributes()-1
+	    filtered_data_instances.setClassIndex(filtered_data_instances.numAttributes()-1);
+	    
+
+	    // Build scheme/classifier
+	    REPTree classifier = new REPTree(); // scheme
+	    String[] reptree_options = weka.core.Utils.splitOptions("-M 2 -V 0.001 -N 3 -S 1 -L -1 -I 0.0");
+	    classifier.setOptions(reptree_options);
+
+	    classifier.buildClassifier(filtered_data_instances);
+	    System.out.println(classifier);
+
+	    
+	    Evaluation eval = WekaUtil.evaluateClassifier(classifier,filtered_data_instances);
+	    System.out.println(eval.toSummaryString());
+		    
+	    System.out.println("Saving REPTree classifier model as: " + output_model_filename);
+	    weka.core.SerializationHelper.write(output_model_filename, classifier);
+
+	     
+	}
+	catch (Exception e) {
+	    e.printStackTrace();
+	}
+ 
+	*/
+	
+    }
+}
Index: /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaUtil.java
===================================================================
--- /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaUtil.java	(revision 34796)
+++ /main/trunk/model-sites-dev/mars/src/java/org/greenstone/mars/WekaUtil.java	(revision 34797)
@@ -31,5 +31,5 @@
 {
     public final static String AROUSAL_ATTRIBUTE_NAME = "arousal_sample_26500ms";
-    public final static String VALANCE_ATTRIBUTE_NAME = "valence_sample_26500ms";
+    public final static String VALENCE_ATTRIBUTE_NAME = "valence_sample_26500ms";
 
 
@@ -76,5 +76,5 @@
 	    // top up,
 	    //   e.g. '471' representing arousal in ground-truth files
-	    //   e.g. '472' representing valance in ground-truth files
+	    //   e.g. '472' representing valence in ground-truth files
 	    remove_option_args += "," + additional_remove;
 	}
@@ -84,5 +84,5 @@
 	try {
 	    // remove ordinal attributes and any additional topups,
-	    // such as 'valance' (when predicting 'arousal') and vice versa
+	    // such as 'valence' (when predicting 'arousal') and vice versa
 	    
 	    String[] filter_options = weka.core.Utils.splitOptions(remove_option_args); 
@@ -109,5 +109,5 @@
 	    DataSource gt_data_source = new DataSource(gt_datasource_filename);
 	    Instances gt_instances = gt_data_source.getDataSet();
-	    gt_instances = applyFilter(gt_instances,additional_remove); // remove 'valance' or 'arousal'
+	    gt_instances = applyFilter(gt_instances,additional_remove); // remove 'valence' or 'arousal'
 	    
 	    gt_instances.setClassIndex(gt_instances.numAttributes() - 1);
@@ -138,5 +138,5 @@
 	    Instances data_instances = data_source.getDataSet();
 
-	    // Training dataset has two ground-truth attributes: 'arousal' and 'valance'.
+	    // Training dataset has two ground-truth attributes: 'arousal' and 'valence'.
 	    // When training for one, need to knock out the other.  This is the purpose
 	    // of 'additional_attribute_remove'
@@ -265,5 +265,5 @@
 	else {
 	    // Dealing with ground-truth data:
-	    //   => already has 'arousal' and 'valance' attributes
+	    //   => already has 'arousal' and 'valence' attributes
 	    //   => need to keep the 'predict_attribute_name' and remove the other one
 	    //   => (its -R value of which is specified in 'additional_attribute_remove')
