This class can be used to compute the "edit distance" between two sequences.
Inheritance:
Public Fields
-
real accuracy
- the total edit distance between two sequences
-
int n_insert
- the number of insertions (weighted by their cost)
-
int n_delete
- the number of deletions (weighted by their cost)
-
int n_subst
- the number of substitutions (weighted by their cost)
-
int n_seq
- the number of sequences measured (used to normalize dist by n_seq)
-
int insert_cost
- the cost of one insertion
-
int delete_cost
- the cost of one deletion
-
int subst_cost
- the cost of one substitution
-
int* obtained
- the obtained sequence
-
int obt_size
- the size of the obtained sequence
-
int* desired
- the desired sequence
-
int des_size
- the size of the desired sequence
-
int** confusion
- the confusion matrix itself
-
int n_confusion
- the number of symbols
-
int* conf_ins
- insertions and deletions
-
bool is_confusion
- do we want a confusion matrix?
Public Methods
-
EditDistance(bool is_confusion_=false)
-
virtual void setCosts(int i_cost, int d_cost, int s_cost)
- sets the different costs
-
virtual void distance(int* obtained, int obt_size, int* desired, int des_size)
- computes the edit distance between obtained and desired
-
virtual void add(EditDistance* d)
- accumulates the distances of the current object and the given object
-
virtual void print(XFile* f)
- prints the edit distance and optionally the sequences
-
virtual void printRatio(XFile* f)
- prints the edit distance ratio (divided by the number of sequnces) and optionally the obtained and desired sequences
Inherited from Object:
Public Fields
-
Allocator* allocator
Public Methods
-
void addOption(const char* name, int size, void* ptr, const char* help="")
-
void addIOption(const char* name, int* ptr, int init_value, const char* help="")
-
void addROption(const char* name, real* ptr, real init_value, const char* help="")
-
void addBOption(const char* name, bool* ptr, bool init_value, const char* help="")
-
void addOOption(const char* name, Object** ptr, Object* init_value, const char* help="")
-
void setOption(const char* name, void* ptr)
-
void setIOption(const char* name, int option)
-
void setROption(const char* name, real option)
-
void setBOption(const char* name, bool option)
-
void setOOption(const char* name, Object* option)
-
virtual void loadXFile(XFile* file)
-
virtual void saveXFile(XFile* file)
-
void load(const char* filename)
-
void save(const char* filename)
-
void* operator new(size_t size, Allocator* allocator_=NULL)
-
void* operator new(size_t size, Allocator* allocator_, void* ptr_)
-
void operator delete(void* ptr)
Documentation
This class can be used to compute the "edit distance" between
two sequences. It computes the number of insertions, deletions and
substitutions. The overall distance is the sum of these numbers
weighted by their cost (which are intergers equal to 1 by default).
- real accuracy
- the total edit distance between two sequences
- int n_insert
- the number of insertions (weighted by their cost)
- int n_delete
- the number of deletions (weighted by their cost)
- int n_subst
- the number of substitutions (weighted by their cost)
- int n_seq
- the number of sequences measured (used to normalize dist by n_seq)
- int insert_cost
- the cost of one insertion
- int delete_cost
- the cost of one deletion
- int subst_cost
- the cost of one substitution
- int* obtained
- the obtained sequence
- int obt_size
- the size of the obtained sequence
- int* desired
- the desired sequence
- int des_size
- the size of the desired sequence
- int** confusion
- the confusion matrix itself
- int n_confusion
- the number of symbols
- int* conf_ins
- insertions and deletions
- bool is_confusion
- do we want a confusion matrix?
- EditDistance(bool is_confusion_=false)
- virtual void setCosts(int i_cost, int d_cost, int s_cost)
- sets the different costs
- virtual void distance(int* obtained, int obt_size, int* desired, int des_size)
- computes the edit distance between obtained and desired
- virtual void add(EditDistance* d)
- accumulates the distances of the current object and the given object
- virtual void print(XFile* f)
- prints the edit distance and optionally the sequences
- virtual void printRatio(XFile* f)
- prints the edit distance ratio (divided by the number of sequnces)
and optionally the obtained and desired sequences
- This class has no child classes.
- Author:
- Samy Bengio (bengio@idiap.ch)
Alphabetic index HTML hierarchy of classes or Java
This page was generated with the help of DOC++.