ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
classify
classifier
binary_classifier.h
Go to the documentation of this file.
1
9
#ifndef META_BINARY_CLASSIFIER_H_
10
#define META_BINARY_CLASSIFIER_H_
11
12
#include "
classify/classifier/classifier.h
"
13
14
namespace
meta
15
{
16
namespace
classify
17
{
18
24
class
binary_classifier
:
public
classifier
25
{
26
public
:
38
binary_classifier
(std::shared_ptr<index::forward_index> idx,
39
class_label positive, class_label negative);
40
48
class_label
classify
(doc_id d_id)
final
;
49
54
virtual
double
predict
(doc_id d_id)
const
= 0;
55
59
const
class_label&
positive_label
()
const
;
60
64
const
class_label&
negative_label
()
const
;
65
66
private
:
70
const
class_label
positive_
;
71
75
const
class_label
negative_
;
76
};
77
78
}
79
}
80
#endif
classifier.h
meta
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition:
analyzer.h:24
meta::classify::classifier
A classifier uses a document's feature space to identify which group it belongs to.
Definition:
classifier.h:24
meta::classify::binary_classifier::predict
virtual double predict(doc_id d_id) const =0
meta::classify::binary_classifier::negative_
const class_label negative_
The label to return when an example is classified as "negative".
Definition:
binary_classifier.h:75
meta::classify::binary_classifier::negative_label
const class_label & negative_label() const
Definition:
binary_classifier.cpp:33
meta::classify::binary_classifier::binary_classifier
binary_classifier(std::shared_ptr< index::forward_index > idx, class_label positive, class_label negative)
Creates a new binary classifier using the given index to retrieve documents, treating anything with t...
Definition:
binary_classifier.cpp:13
meta::classify::binary_classifier::classify
class_label classify(doc_id d_id) final
Classifies a document into a specific group, as determined by training data.
Definition:
binary_classifier.cpp:22
meta::classify::binary_classifier::positive_
const class_label positive_
The label that marks positive examples.
Definition:
binary_classifier.h:70
meta::classify::binary_classifier::positive_label
const class_label & positive_label() const
Definition:
binary_classifier.cpp:28
meta::classify::binary_classifier
A classifier which classifies documents as "positive" or "negative".
Definition:
binary_classifier.h:24
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1