Random Projection Trees

General
Spatial Trees
RP Trees
Downloads
Publications
Contacts

Getting Started
Installation
Tutorials
Documentation
FAQ

Software Tutorials:
Here is a walkthrough of some basic tutorials for using RPTrees for learning.

Preliminaries

RPTrees for Manifold Learning

  • Obtain i.i.d. samples from a particular manifold and save it in a file in proper format.
    For practice, we provide i.i.d. samples from a 1-dimensional sinusoid (with mild noise) embedded in 3-dimensional space. This sample data is kept in the examples/ directory.
  • $ ls examples/sin3D.data

    More information click here for details on data format

  • Set up the parameters.
    Most important parameters that need to be set are to convey information about the data format. In case of the example data file (examples/sin3D.data), data vector is a 3 dimensional vector of reals. Hence, make sure to have the following lines in src/globals.h
    #define DATA_TYPE_DOUBLE
    #define VECT_LEN 3

    Another important parameter that needs to be set is the maximum tree depth of the learnt RPTree. For the example data file (examples/sin3D.data), it should be enough to have tree depth of 4 (this results in partitioning the space into 2^4 = 16 regions). Maximum tree depth can be set by having the following line in src/learnRPTree.h
    #define MAX_TREE_DEPTH 4

    More information click here for details on parameters

  • Compile the code by issuing make.
    Once all the essential parameters are set, the code can be compiled by issuing the make command. A successful execution of make should produce an executable named rptree in the top level directory structure. Following is what a successful compile may look like:
  • $ make
    gcc -Wall -c matrixlib.c -o matrixlib.o
    gcc -Wall -c globals.c -o globals.o
    gcc -Wall -c learnRPTree.c -o learnRPTree.o
    gcc -Wall -lm learn.c learnRPTree.o matrixlib.o globals.o -o rptree


  • Learning the RPTree.
    Now we are ready to learn the RPTree from the data. Execute the compiled program rptree with appropreate command line arguments. For the example data file (examples/sin3D.data), you can issue the following command:
  • $ ./rptree -l -d examples/sin3D.data -o sin3D.tree

    More information click here for details on RPTree learn


  • Classifying using RPTree.
    We can use the learnt RPTree classify new data to see which region of space do data vectors fall in. Execute the compiled program rptree with appropreate command line arguments. For the example data file (examples/sin3D.data), you can issue the following command:
  • $ ./rptree -c -t sin3D.tree -d examples/sin3D.data -o sin3D.cls

    More information click here for details on RPTree classify


 

 

 

 

 

Last Modified on: Dec 18, 2007