svm_main.cc File Reference

Include dependency graph for svm_main.cc:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void DoSvmNormalize (Dataset *dataset)
 Data Normalization.
void GenerateArtificialDataset (Dataset *dataset)
 Generate an artificial data set.
int LoadData (Dataset *dataset, String datafilename)
 Load data set from data file.
int main (int argc, char *argv[])
 Multiclass SVM classification/ SVM regression - Main function.

Variables

const fx_module_doc svm_main_doc
const fx_entry_doc svm_main_entries_doc []

Detailed Description

Author:
Hua Ouyang

This file contains main routines for performing 0. multiclass SVM classification (one-vs-one method is employed). 1. SVM regression (epsilon-insensitive loss i.e. epsilon-SVR). 2. one-class SVM (TODO)

It provides four modes: "cv": cross validation; "train": model training "train_test": training and then online batch testing; "test": offline batch testing.

Please refer to README for detail description of usage and examples.

See also:
svm.h
smo.h

Definition in file svm_main.cc.


Function Documentation

void DoSvmNormalize ( Dataset dataset  ) 
void GenerateArtificialDataset ( Dataset dataset  ) 

Generate an artificial data set.

Parameters:
 the dataset to be generated

Definition at line 165 of file svm_main.cc.

References fx_param_double(), fx_param_int(), Dataset::OwnMatrix(), and data::Save().

Referenced by LoadData().

int LoadData ( Dataset dataset,
String  datafilename 
)

Load data set from data file.

If data file not exists, generate an artificial data set.

Parameters:
 the dataset
 name of the data file to be loaded

Definition at line 211 of file svm_main.cc.

References DoSvmNormalize(), fx_param_bool(), fx_param_exists(), fx_param_str_req(), GenerateArtificialDataset(), and Dataset::InitFromFile().

Referenced by main().

int main ( int  argc,
char *  argv[] 
)

Variable Documentation

const fx_module_doc svm_main_doc
Initial value:
 {
  svm_main_entries_doc, NULL,
  "These are the implementations for Support Vector Machines (SVM), including Multiclass classification, Regression, and One Class SVM)\n"
}

Definition at line 89 of file svm_main.cc.

Generated on Mon Jan 24 12:04:39 2011 for FASTlib by  doxygen 1.6.3