|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
weka.gui.beans.Classifier
public class Classifier
Bean that wraps around weka.classifiers
JPanel,
BeanCommon,
Visible,
WekaWrapper,
Serializable,
UserRequestAcceptor,
TrainingSetListener,
TestSetListener,
EnvironmentHandler,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.BaselineResizeBehavior |
| Field Summary | |
|---|---|
static String |
FILE_EXTENSION
the extension for serialized models (binary Java serialization) |
| Fields inherited from class javax.swing.JComponent |
|---|
TOOL_TIP_TEXT_KEY, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
Classifier()
Creates a new Classifier instance. |
|
| Method Summary | |
|---|---|
void |
acceptInstance(InstanceEvent e)
Accepts an instance for incremental processing. |
void |
acceptTestSet(TestSetEvent e)
Accepts a test set for a batch trained classifier |
void |
acceptTrainingSet(TrainingSetEvent e)
Accepts a training set and builds batch classifier |
void |
addBatchClassifierListener(BatchClassifierListener cl)
Add a batch classifier listener |
void |
addConfigurationListener(ConfigurationListener cl)
We don't have to keep track of configuration listeners (see the documentation for ConfigurationListener/ConfigurationEvent). |
void |
addGraphListener(GraphListener cl)
Add a graph listener |
void |
addIncrementalClassifierListener(IncrementalClassifierListener cl)
Add an incremental classifier listener |
void |
addTextListener(TextListener cl)
Add a text listener |
boolean |
connectionAllowed(EventSetDescriptor esd)
Returns true if, at this time, the object will accept a connection according to the supplied EventSetDescriptor |
boolean |
connectionAllowed(String eventName)
Returns true if, at this time, the object will accept a connection with respect to the named event |
void |
connectionNotification(String eventName,
Object source)
Notify this object that it has been registered as a listener with a source with respect to the named event |
void |
disconnectionNotification(String eventName,
Object source)
Notify this object that it has been deregistered as a listener with a source with respect to the supplied event name |
Enumeration |
enumerateRequests()
Return an enumeration of requests that can be made by the user |
boolean |
eventGeneratable(EventSetDescriptor esd)
Returns true, if at the current time, the event described by the supplied event descriptor could be generated. |
boolean |
eventGeneratable(String eventName)
Returns true, if at the current time, the named event could be generated. |
boolean |
getBlockOnLastFold()
Gets whether we are blocking on the last fold of the last run rather than rejecting any further data until all processing has been completed. |
Classifier |
getClassifier()
Get the currently trained classifier. |
Classifier |
getClassifierTemplate()
Return the classifier template currently in use. |
String |
getCustomName()
Get the custom (descriptive) name for this bean (if one has been set) |
int |
getExecutionSlots()
Get the number of execution slots (threads) used to train models. |
boolean |
getResetIncrementalClassifier()
Get whether to reset (by calling buildClassifier()) an incremental classifier, and thus discarding any previously learned model, before processing the first instance in the incoming stream. |
boolean |
getUpdateIncrementalClassifier()
Get whether an incremental classifier will be updated on the incoming instance stream. |
BeanVisual |
getVisual()
Gets the visual appearance of this wrapper bean |
Object |
getWrappedAlgorithm()
Returns the wrapped classifier |
String |
globalInfo()
Global info (if it exists) for the wrapped classifier |
boolean |
hasIncomingBatchInstances()
Returns true if this classifier has an incoming connection that is a batch set of instances |
boolean |
hasIncomingStreamInstances()
Returns true if this classifier has an incoming connection that is an instance stream |
boolean |
isBusy()
Returns true if. |
void |
loadModel()
|
void |
performRequest(String request)
Perform a particular request |
void |
removeBatchClassifierListener(BatchClassifierListener cl)
Remove a batch classifier listener |
void |
removeConfigurationListener(ConfigurationListener cl)
We don't have to keep track of configuration listeners (see the documentation for ConfigurationListener/ConfigurationEvent). |
void |
removeGraphListener(GraphListener cl)
Remove a graph listener |
void |
removeIncrementalClassifierListener(IncrementalClassifierListener cl)
Remove an incremental classifier listener |
void |
removeTextListener(TextListener cl)
Remove a text listener |
void |
saveModel()
|
void |
setBlockOnLastFold(boolean block)
Set whether to block on receiving the last fold of the last run rather than rejecting any further data until all processing is complete. |
void |
setClassifierTemplate(Classifier c)
Set the template classifier for this wrapper |
void |
setCustomName(String name)
Set a custom (descriptive) name for this bean |
void |
setEnvironment(Environment env)
Set environment variables to pass on to the classifier (if if is an EnvironmentHandler) |
void |
setExecutionSlots(int slots)
Set the number of execution slots (threads) to use to train models with. |
void |
setLog(Logger logger)
Set a logger |
void |
setResetIncrementalClassifier(boolean reset)
Set whether to reset (by calling buildClassifier()) an incremental classifier, and thus discarding any previously learned model, before processing the first instance in the incoming stream. |
void |
setUpdateIncrementalClassifier(boolean update)
Set whether an incremental classifier will be updated on the incoming instance stream. |
void |
setVisual(BeanVisual newVisual)
Sets the visual appearance of this wrapper bean |
void |
setWrappedAlgorithm(Object algorithm)
Sets the algorithm (classifier) for this bean |
void |
stop()
Stop any classifier action |
void |
useDefaultVisual()
Use the default visual appearance for this bean |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String FILE_EXTENSION
| Constructor Detail |
|---|
public Classifier()
Classifier instance.
| Method Detail |
|---|
public String globalInfo()
public void setCustomName(String name)
setCustomName in interface BeanCommonname - the name to usepublic String getCustomName()
getCustomName in interface BeanCommonpublic int getExecutionSlots()
public void setExecutionSlots(int slots)
slots - the number of execution slots to use.public void setBlockOnLastFold(boolean block)
block - true if we should block on the
last fold of the last run.public boolean getBlockOnLastFold()
public void setClassifierTemplate(Classifier c)
c - a weka.classifiers.Classifier valuepublic Classifier getClassifierTemplate()
public boolean hasIncomingStreamInstances()
public boolean hasIncomingBatchInstances()
boolean valuepublic Classifier getClassifier()
weka.classifiers.Classifier valuepublic void setWrappedAlgorithm(Object algorithm)
setWrappedAlgorithm in interface WekaWrapperalgorithm - an Object value
IllegalArgumentException - if an error occurspublic Object getWrappedAlgorithm()
getWrappedAlgorithm in interface WekaWrapperObject valuepublic void setResetIncrementalClassifier(boolean reset)
reset - true if the incremental classifier should be reset
before processing the first instance in the incoming data streampublic boolean getResetIncrementalClassifier()
reset - true if the incremental classifier should be reset
before processing the first instance in the incoming data streampublic boolean getUpdateIncrementalClassifier()
public void setUpdateIncrementalClassifier(boolean update)
update - true if an incremental classifier is to be updated.public void acceptInstance(InstanceEvent e)
acceptInstance in interface InstanceListenere - an InstanceEvent valuepublic void acceptTrainingSet(TrainingSetEvent e)
acceptTrainingSet in interface TrainingSetListenere - a TrainingSetEvent valuepublic void acceptTestSet(TestSetEvent e)
acceptTestSet in interface TestSetListenere - a TestSetEvent valuepublic void setVisual(BeanVisual newVisual)
setVisual in interface VisiblenewVisual - a BeanVisual valuepublic BeanVisual getVisual()
getVisual in interface VisibleBeanVisual valuepublic void useDefaultVisual()
useDefaultVisual in interface Visiblepublic void addBatchClassifierListener(BatchClassifierListener cl)
cl - a BatchClassifierListener valuepublic void removeBatchClassifierListener(BatchClassifierListener cl)
cl - a BatchClassifierListener valuepublic void addGraphListener(GraphListener cl)
cl - a GraphListener valuepublic void removeGraphListener(GraphListener cl)
cl - a GraphListener valuepublic void addTextListener(TextListener cl)
cl - a TextListener valuepublic void removeTextListener(TextListener cl)
cl - a TextListener valuepublic void addConfigurationListener(ConfigurationListener cl)
addConfigurationListener in interface ConfigurationProducercl - a ConfigurationListener.public void removeConfigurationListener(ConfigurationListener cl)
removeConfigurationListener in interface ConfigurationProducercl - a ConfigurationListener.public void addIncrementalClassifierListener(IncrementalClassifierListener cl)
cl - an IncrementalClassifierListener valuepublic void removeIncrementalClassifierListener(IncrementalClassifierListener cl)
cl - an IncrementalClassifierListener valuepublic boolean connectionAllowed(String eventName)
connectionAllowed in interface BeanCommoneventName - the event
public boolean connectionAllowed(EventSetDescriptor esd)
connectionAllowed in interface BeanCommonesd - the EventSetDescriptor
public void connectionNotification(String eventName,
Object source)
connectionNotification in interface BeanCommoneventName - the eventsource - the source with which this object has been registered as
a listener
public void disconnectionNotification(String eventName,
Object source)
disconnectionNotification in interface BeanCommoneventName - the eventsource - the source with which this object has been registered as
a listenerpublic void stop()
stop in interface BeanCommonpublic void loadModel()
public void saveModel()
public void setLog(Logger logger)
setLog in interface BeanCommonlogger - a Logger valuepublic Enumeration enumerateRequests()
enumerateRequests in interface UserRequestAcceptorEnumeration valuepublic void performRequest(String request)
performRequest in interface UserRequestAcceptorrequest - the request to perform
IllegalArgumentException - if an error occurspublic boolean eventGeneratable(EventSetDescriptor esd)
esd - an EventSetDescriptor value
boolean valuepublic boolean eventGeneratable(String eventName)
eventGeneratable in interface EventConstraintseventName - the name of the event in question
public boolean isBusy()
isBusy in interface BeanCommonpublic void setEnvironment(Environment env)
setEnvironment in interface EnvironmentHandlerenv - the environment variables to
use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||