jLOAF: How it works - NMAI-lab/JLOAF GitHub Wiki

This framework functions in the following manner:

                                           Gathers Data
                                                |
                                       Creates a CaseBase 
                                                |
                                     (Optional) Preprocessing 
                                                |
                                    Choose learning algorithm
                                                |
                         Testing learned behavior || running an agent in an environment

Gathering Data, Creates a CaseBase:

The user is required to provide log files of behavior of an expert. These log files don't have to be in any specific format, however the user is required to write a LogFile2CaseBase.java file converts the log file into a format that fits within the bounds of the framework. Further information on this can be found in the Input and Action classes.

Preprocessing

This framework has two types of preprocessing available: Row reduction (Clustering and Sampling) and column reduction (Feature Selection). These filters follow the chain of command pattern and therefore can be chained together in a pipeline format. The user has the ability to select which filters as well as which order they will be applied to the casebase. Each filter returns a casebase and further information can be found at preprocessing.

Choose Learning algorithm

There are multiple learning algorithms to choose from in the framework. These include CBR which uses K nearest neighbour to retrieve the most similar case, Temporal backtracking which is a special case which is used to learn state based behavior, Bayesian networks learners as well as Neural Network learners. The choice is dependent on the requirements of the user as well as the domain. Some algorithms perform better with certain kinds of behavior, some are faster, some depend on the whether we are learning stochastic, reactive or state based behavior.

Testing learned behavior

The framework can be run in two ways, using a performanceEvaluator method which gives the user a little more control over which learning algorithms to use, as well as which filters to stack against each other. This is all done inside a main file which the user has to edit. The other method is to use TestingConfig which requires cmd line arguments to run, there is no user interaction with the main.java files. Both methods output all performance metrics to the console, write it to a CSV as well as write it to an sqllite DB.

Running an agent in an environment

The agent will have to be connected to an outside environment. How this is done is upto the user. The user will have to follow the steps of setting up the agent and call the selectAction function which should take an input that has been converted from the environment perception into a Input object. The return of that function will have to be converted into something that the environment can understand. There is an example of this in krislet-jLOAF.