Main Page | Modules | Data Structures | File List | Globals | Related Pages

ExampleGenerator.h File Reference


Detailed Description

Generate a random (but reproducible) data set.

Randomly, but reproducably, create a series of examples. These examples could then be classified with some known model and used as a synthetic dataset to test a learner. This uses the RandomSetState() functions so that it will produce the same series of examples for the same seed no matter what the rest of your program does with the random number generators.

Go to the source code of this file.

Data Structures

struct  _ExampleGenerator_
 Holds the information needed to reproducibly make a random data set. See ExampleGenerator.h for more detail. More...


Typedefs

typedef _ExampleGenerator_ ExampleGenerator
 Holds the information needed to reproducibly make a random data set. See ExampleGenerator.h for more detail.

typedef _ExampleGenerator_ExampleGeneratorPtr
 Holds the information needed to reproducibly make a random data set. See ExampleGenerator.h for more detail.


Functions

ExampleGeneratorPtr ExampleGeneratorNew (ExampleSpecPtr es, int seed)
 Creates a new example generator.

void ExampleGeneratorFree (ExampleGeneratorPtr eg)
 Frees the memory associated with the example generator.

ExamplePtr ExampleGeneratorGenerate (ExampleGeneratorPtr eg)
 Makes a random example.


Typedef Documentation

typedef struct _ExampleGenerator_ ExampleGenerator
 

Holds the information needed to reproducibly make a random data set. See ExampleGenerator.h for more detail.

typedef struct _ExampleGenerator_ * ExampleGeneratorPtr
 

Holds the information needed to reproducibly make a random data set. See ExampleGenerator.h for more detail.


Function Documentation

void ExampleGeneratorFree ExampleGeneratorPtr  eg  ) 
 

Frees the memory associated with the example generator.

ExamplePtr ExampleGeneratorGenerate ExampleGeneratorPtr  eg  ) 
 

Makes a random example.

Allocates an example, randomly sets the values of its attributes, and returns it. Uses uniform distributions for all of its decisions. For continuous attributes it uniformly generates a value between 0 and 1.0; you might like to scale this value to fit your needs.

You are must free the ExamplePtr when you are finished with it by calling ExampleFree.

ExampleGeneratorPtr ExampleGeneratorNew ExampleSpecPtr  es,
int  seed
 

Creates a new example generator.

The generator will generate examples conforming to es using a seeded random number generator. If the value of seed is -1 this will select a random initial seed (But you'll need to initialize the random number generator on your system for this to work; The function RandomInit() will do the job).


Generated for VFML by doxygen hosted by SourceForge.net Logo