diff --git a/UCS/RESULTS_FILE.txt b/UCS/RESULTS_FILE.txt index 73d0619abb5b6ad51832ffd6f6978a0db55a96ec..0ac008b885737224b703cdf57a4e06edcf927fd6 100644 --- a/UCS/RESULTS_FILE.txt +++ b/UCS/RESULTS_FILE.txt @@ -1,4 +1,10 @@ - Accuracy: 0.78125 Total time: 114.03 Rules: 360 - Total Av. Rules: 247.06666666666666 - Accuracy: 0.78125 Total time: 114.62 Rules: 365 - Total Av. Rules: 488.4 + Accuracy: 0.90625 Total time: 33.04 Rules: 199 + Accuracy: 0.921875 Total time: 34.97 Rules: 194 + Accuracy: 0.859375 Total time: 35.2 Rules: 197 + Accuracy: 0.859375 Total time: 36.26 Rules: 193 + Accuracy: 0.890625 Total time: 34.05 Rules: 205 + Accuracy: 0.875 Total time: 34.18 Rules: 201 + Accuracy: 0.921875 Total time: 34.91 Rules: 218 + Accuracy: 0.90625 Total time: 35.54 Rules: 202 + Accuracy: 0.890625 Total time: 35.22 Rules: 205 + Accuracy: 0.828125 Total time: 37.87 Rules: 216 diff --git a/UCS/UCS_Configuration_File.txt b/UCS/UCS_Configuration_File.txt index 8654dc975bdb35123452833ddae0b41c1b845669..718466e8013acca53d4c7524555e618dc9b933b5 100644 --- a/UCS/UCS_Configuration_File.txt +++ b/UCS/UCS_Configuration_File.txt @@ -8,9 +8,9 @@ trainFile=6Multiplexer_Data_Complete.txt # FileName of training dataset testFile=None # FileName of testing dataset. If no testing data available or desired, put 'None'. outputDirectory=Local_Output # Output file directory outputFile=ExampleRun # FileName of output files. -learningIterations=20000 # Specify complete algorithm evaluation checkpoints and maximum number of learning iterations (e.g. 1000.2000.5000 = A maximum of 5000 learning iterations with evaluations at 1000, 2000, and 5000 iterations) -N=1000 # Maximum size of the rule population (a.k.a. Micro-classifier population size, where N is the sum of the classifier numerosities in the population) -p_spec=0.7 # The probability of specifying an attribute when covering. (1-p_spec = the probability of adding '#' in ternary rule representations). Greater numbers of attributes in a dataset will require lower values of p_spec. +learningIterations=10000 # Specify complete algorithm evaluation checkpoints and maximum number of learning iterations (e.g. 1000.2000.5000 = A maximum of 5000 learning iterations with evaluations at 1000, 2000, and 5000 iterations) +N=500 # Maximum size of the rule population (a.k.a. Micro-classifier population size, where N is the sum of the classifier numerosities in the population) +p_spec=0.6 # The probability of specifying an attribute when covering. (1-p_spec = the probability of adding '#' in ternary rule representations). Greater numbers of attributes in a dataset will require lower values of p_spec. kfold=5 # if not used, set to 0. ######-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- @@ -26,9 +26,9 @@ trackingFrequency=0 # Specifies the number of iterations before each esti ######-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- ###### Supervised Learning Parameters - Generally just use default values. ######-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- -nu=5 # (v) Power parameter used to determine the importance of high accuracy when calculating fitness. (typically set to 5, recommended setting of 1 in noisy data) +nu=10 # (v) Power parameter used to determine the importance of high accuracy when calculating fitness. (typically set to 5, recommended setting of 1 in noisy data) chi=0.8 # (X) The probability of applying crossover in the GA. (typically set to 0.5-1.0) -upsilon=0.4 # (u) The probability of mutating an allele within an offspring.(typically set to 0.1-0.5) +upsilon=0.5 # (u) The probability of mutating an allele within an offspring.(typically set to 0.1-0.5) theta_GA=25 # The GA threshold; The GA is applied in a set when the average time since the last GA in the set is greater than theta_GA. theta_del=20 # The deletion experience threshold; The calculation of the deletion probability changes once this threshold is passed. theta_sub=20 # The subsumption experience threshold; diff --git a/UCS/UCS_OutputFileManager.py b/UCS/UCS_OutputFileManager.py index a1c9ed4fbcb01225466071dadb6556402c9d74f8..25bf7dee48ec0f9d8701e532b4c4a4a98fab6cad 100644 --- a/UCS/UCS_OutputFileManager.py +++ b/UCS/UCS_OutputFileManager.py @@ -34,7 +34,6 @@ from UCS.UCS_Constants import * class OutputFileManager: totalPopulationSize = 0 - totalAverage = 0 def writePopStats(self, outFile, trainEval, testEval, exploreIter, pop, correct): """ Makes output text file which includes all of the evaluation statistics for a complete analysis of all training and testing data on the current LCS rule population. """ @@ -140,7 +139,6 @@ class OutputFileManager: # Write each classifier-------------------------------------------------------------------------------------------------------------------------------------- OutputFileManager.totalPopulationSize = len(pop.popSet) - OutputFileManager.totalAverage += len(pop.popSet) print(len(pop.popSet)) for cl in pop.popSet: rulePopOut.write(str(cl.printClassifier())) diff --git a/UCS/UCS_Run.py b/UCS/UCS_Run.py index ae060b11c7b07b5fcc12181e99ac4f4953b94bae..ee488d41fb6aa2661e33c82110b0cbfdb98c8e9a 100644 --- a/UCS/UCS_Run.py +++ b/UCS/UCS_Run.py @@ -85,11 +85,10 @@ def mainRun(): print("Total run time in seconds: %.2f" % total) f = open("RESULTS_FILE.txt", 'a') f.write(" Accuracy: " + str(kfold_accuracy) + " Total time: " + str(total) + " Rules: " + str(OutputFileManager.totalPopulationSize) + "\n") - f.write(" Total Av. Rules: " + str(OutputFileManager.totalAverage / 15) + "\n") if __name__ == '__main__': - for i in range(15): + for i in range(10): mainRun() diff --git a/UCS/__pycache__/UCS_OutputFileManager.cpython-36.pyc b/UCS/__pycache__/UCS_OutputFileManager.cpython-36.pyc index 7847f6eeda339f59819a256be4dc5728d025d636..3ef47d470e1cc4d4c6426a9fab68a49f77aa6678 100644 Binary files a/UCS/__pycache__/UCS_OutputFileManager.cpython-36.pyc and b/UCS/__pycache__/UCS_OutputFileManager.cpython-36.pyc differ