Main Page   Compound List   File List   Compound Members   File Members   Related Pages  

SupLearnPara.cpp File Reference

Program for learning interactively user-specific semantics attached to sub-graphs. More...

#include <iostream>
#include <string>
#include <vector>
#include <fstream>
#include <cstdio>
#include <cstdlib>
#include <cmath>
#include <cassert>
#include <ctime>
#include "graphCharac+.hh"

Go to the source code of this file.

Functions

void usage (std::string argv0)
 Usage function.

int main (int argc, char *argv[])
 Main procedure for interactive learning. More...


Detailed Description

Program for learning interactively user-specific semantics attached to sub-graphs.

Author:
P.Héas (IRIT / ENSAE / DLR / CNES)
Since:
January 2005

Definition in file SupLearnPara.cpp.


Function Documentation

int main int    argc,
char *    argv[]
 

Main procedure for interactive learning.

The program follows the following sequential organisation:

  • 1) This progamm creats first a GraphManipulator object. A method "ReadGraphVersion3(...)" is then called to read a graph at format 2 (c.f. Documentation on the "Inference of a graph of dynamic clusters trajectories") stored on the disk. Note that this object posses similarties with the GraphDynaCluster object used previously for infering the trajectories, with the difference that the GraphManipulator object does not possess any methods and attributes related to the graph inference; It possesses attributes and methods to read a already created graph, to manipulate sub-graphs, to create sorted collections of sub-graphs with supervised learning methods, etc....
  • 2) Then the interactive learning procedure is initializated : the users defines a time window, a part of interest in the graph and the complexity of the graph (via the divergence treshold). Then he defines the spatio-temporal location of a sub-graph of interest. Optionally he fixes the a priori model similarity parameters and can also set some specific parameters for the search.
  • 3) Therfore, the matching procedure by the parametric similarity model is performed between all the possible sub-graphs included in the graph part defined by the user (with the input parameters :'minSample' and 'maxSample') and a reference sub-graph defined by the first user example and with a parameter vector filled with ones (or the prior parameters provided by the user are used). A sorted collection of sub-graphs is created. The ordering of the sub-graphs is done according to their likelihood for the user-specific positive semantic. Note that, in the case that a couple of 2 MT class are considered per sub-graph, each element of the pair is first matched idependently with all the possible sub-graphs. Then unlikely MT class associations are removed from the collections of sub-graph couple to match.

Todo:
GENERAL REMARK: We remark here that, to reduce the computational complexity and the clarty of many methods called by this program, it would have been wiser to consider 2 MT class (or more) in a single graph and not, as it is done here, in 2 different graphs which are associated. TO BE MODIFIED IN PRIORITY

Note that the time delay information is not included in the graph at format 2 directly, but is included in the standard format. Thus, this input has to be removed and a procedure for reading the graph at the standard format has to replace the actual one. TO BE MODIFIED!!



**************************************Beginning of the learning loop**************************************

  • 4) In order to derive a sub-graph collection sorted according to negative semantic likelihood probabilities, a matching procedure is performed with the most unlikely sub-graph of the positive semantic collection (for the first iteration only) or with the last user negative example. The current estimated parameter vector is used (for the first iteration, we use a parameter vector filled with ones)
  • 5) Then, positive and negative semantic learning are initialisated and performed with the user last examples. It results in the iference of a collection of sub-graphs sorted according to posterior probabilities. In parallel, the relevance feedback measurement are derived. (until the user has not provided a negative example, the negative learning is on stand by. Thus, in this case, the collection is not sorted according to posterior probabilities but only according to the likelihood probabilities relative to the positive semantic)
  • 6) Then the program enters another loop where new positive or negative examples are provided by the user. To update the sub-graph sorted collections (i.e. the sub-graphs likelihood probabilities related to the positive and negative semantic), the reference graphs (positive and negative) are preserved in this loop, and the matching procedure is performed with the same search trees created previously. Indeed, the matching procedure just finds new solution-paths in the search trees, according to the current estimated similarity model parameters. The 2 sorted collections of sub-graphs are then used to update the posterior sub-graph collection. In parallel, the relevance feedback measurement are derived.
    Note that, for each iteration of this loop, the user can decide to erase the memory of the positive or/and negative semantic learning. He can also decide to update the reference subgraphs and thus to exit the loop.
  • 7) When the previous loop is exited, the user provides a new positive reference sub-graph. Here the user can decide to concentrate on only a percentage of the collection of sub-graphs. A matching procedure is then performed with this new subgraph and the current estimated parameters of the similarity model.
    The program goes then to the beginning of the learning loop (step 4)


    **************************************End of the learning loop**************************************

    Note that this program creats text files called "./APostList" containing the relevance feedback measurements and the posterior collection of sub-graphs after each new example provided by the user. This files can then be read by the GUI applet to be visualized.
Parameters:
argv0  [1] Graph file name at format 2 (c.f. Documentation on the "Inference of a graph of dynamic clusters trajectories")
argv0  [2] Text file name containing, on a single line and separated by a white space, the time delay between the different time samples specific to the graph.

Definition at line 65 of file SupLearnPara.cpp.


Generated on Thu Feb 17 11:03:19 2005 for Interactive Learning of Sub-Graphs Semantics by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002