Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.ibm.able.beans.knn
Class JasNaiveBayesDistributedAgent

    java.lang.Object
      com.ibm.able.AbleObject
          com.ibm.able.AbleDefaultAgent
              com.ibm.able.AbleRemoteDefaultAgent
                  com.ibm.able.platform.AblePlatformDefaultAgent
                      com.ibm.able.beans.knn.JasNaiveBayesDistributedAgent

All Implemented Interfaces:
  AbleAgent, AbleBean, AbleBeanContainer, AbleBeanRemoteContainer, AbleDataBufferManager, AbleEventListener, AbleEventListenerManager, AbleEventListenerRemoteManager, AbleEventQueueManager, AbleEventQueueProcessor, AbleEventQueueRemoteManager, AblePlatformAgent, AblePropertyChangeManager, AbleRemoteAgent, AbleRemoteBean, AbleRemoteEventListener, AbleSerializable, AbleUserDefinedFunctionManager, AbleUserDefinedFunctionRemoteManager, java.util.EventListener, JasNaiveBayesDistributedAgentIF, javax.agent.service.transport.MessageListener, java.beans.PropertyChangeListener, java.rmi.Remote, java.io.Serializable

public class JasNaiveBayesDistributedAgent
extends AblePlatformDefaultAgent
implements JasNaiveBayesDistributedAgentIF, java.io.Serializable

This class defines a test for the AbleJasDefaultAgent object.

See Also:
  Serialized Form

Field Summary
`static java.lang.String` | `defaultName` Value assigned to name by default.

Fields inherited from class com.ibm.able.platform.AblePlatformDefaultAgent
`agentLastUpdate, agentMovable, agentStatus, agentSummary, agentToAutoRegister, agentToBindToRmi, agentType, agentVendor, agentVersion, myAgentInboxes, myAgentLoggingService, myCapabilities, myCapabilityOrder, myCustomCapabilityAutonomyLevels, myHighCapabilityAutonomyLevels, myJasAbleLocator, myJasAgentAttributes, myJasAgentDescription, myJasAgentDirectoryService, myJasAgentName, myJasAgentNamingService, myJasDefaultLocator, myJasMessageTransportService, myJasServiceRoot, myJasTransportSystem, myJasVerifiableDirectoryService, myJasVerifiableNamingService, myKeyPair, myLowCapabilityAutonomyLevels, myMediumCapabilityAutonomyLevels, myPrincipal, myReceiveMessageMethod, myRequestKey, mySecSppt, myTrustLevel, myVerifiableAgentName`

Fields inherited from class com.ibm.able.AbleRemoteDefaultAgent
`agentAddr, agentHost, agentName, myRemoteStub`

Fields inherited from class com.ibm.able.AbleDefaultAgent
`activeDataSource, eventConnections, myBeans, numEpochs, processList, processListOK, userDefinedFunctions`

Fields inherited from class com.ibm.able.AbleObject
`changed, chgSupport, comment, dataFlowEnabled, destBufferConnections, eventQueue, fileName, inputBuffer, listeners, logger, name, outputBuffer, parent, properties, propertyConnectionMgr, sourceBufferConnections, state, stateChgSupport, trace`

Constructor Summary
`JasNaiveBayesDistributedAgent()` Constructor for AbleNaiveBayesClassifierAgent
`JasNaiveBayesDistributedAgent(java.lang.String theName)` Constructor for AbleKnnClassifierAgent

Method Summary
`protected void` | `debugTrace(java.lang.String theMessage)` Log a trace message.
`int` | `getBufferSize()` Get the buffer size
`AbleNaiveBayesDistributed` | `getNaiveBayesBean()` Get the NaiveBayes bean
`AbleFilter` | `getNaiveBayesFil1()` Get the filter 1 bean
`AbleFilter` | `getNaiveBayesFil2()` Get the filter 2 bean
`AbleImport` | `getNaiveBayesImp1()` Get the import 1 bean
`int` | `getNumAttributes()` Get the number of attributes
`int` | `getNumClasses()` Get the number of classes
`long` | `getNumRecords()` Get the number of records
`java.lang.String` | `getTrainDataFileName()` Get the name of the training data file
`void` | `handleAbleEvent(AbleEvent theAbleEvent)` Handle an Able event.
`void` | `init()` Generate a naive bayes Classifier agent bean.
`void` | `reset()` Reset each bean created when the agent was initialized.
`void` | `sendTo(javax.agent.Locator theDestinationLocator, javax.agent.AgentName theDestinationAgentName, java.lang.Object theMessage)` Main method for testing
`void` | `setBufferSize(int size)` Set the buffer size
`protected void` | `setDefaults()` Set default values for parameters
`void` | `setTrainDataFileName(java.lang.String aFileName)` Set the name of the training data file

Methods inherited from class com.ibm.able.platform.AblePlatformDefaultAgent
`_init, _init, _quitAll, _reset, _resumeAll, _suspendAll, addAgentInbox, addJasAgentAttribute, authenticateAndAuthorizeCaller, authorizeCapabilityChangeRequest, broadcastTransportMessage, createAgentSituationReport, createLocatorAndBindToMethod, getAboutDataBean, getAgentAutonomyLevel, getAgentDescription, getAgentInboxes, getAgentLastUpdate, getAgentLoggingService, getAgentStatus, getAgentSummary, getAgentType, getAgentVendor, getAgentVersion, getAndSetAgentDescription, getAndSetAgentNames, getAndSetTransportServices, getAndValidateServiceRoot, getCapabilities, getCapability, getCapabilityAutonomyLevels, getCapabilityOrder, getCapabilityPresets, getCapabilitySummaryByAgentAutonomyLevel, getCapabilitySummaryByCapabilityAutonomyLevels, getCustomizerDataBean, getCustomizerInfo, getJasAgentAttributes, getJasAgentName, getNewAgentDescription, getPlatformAgentName, getPrincipal, getTransportMessageContent, getTransportMessageContent2, handleAnsweredRequest, init, initAgentCapabilities, initCommonCode, initializeAgent, initializeAgent, isAgentMovable, isAgentToAutoRegister, isAgentToBindToRmi, loadAgentDescriptionWithAbleAttributes, loadAgentDescriptionWithAbleLocator, loadAgentDescriptionWithAgentName, loadAgentDescriptionWithBaseLocators, loadAgentDescriptionWithPublicKey, loadAgentDescriptionWithUserAttributes, logAgentSituationReport, logException, logHistory, lookUpAgent, lookUpAgent, main, makeCapabilityAutonomyLevelsSummary, maybeDeregisterWithAgentDirectoryService, maybeRebindToRmi, maybeRegisterWithAgentDirectoryService, maybeUnbindFromRmi, preInit, preInit, process, processAnsweredRequest, quitAgent, quitAll, receiveMessage, removeAgentInbox, removeAgentInboxes, removeAgentSituationReports, removeJasAgentAttribute, resetAgent, resumeAgent, resumeAll, sendTransportMessage, sendTransportMessage, setAgentAutonomyLevel, setAgentMovable, setAgentNameUniqueID, setAgentSummary, setAgentToAutoRegister, setAgentToBindToRmi, setAgentType, setAgentVendor, setAgentVersion, setCapabilityAutonomyLevel, setCapabilityAutonomyLevels, setCustomizerDataBean, setPrincipal, setRequestKey, setRestartedFromPersistence, suspendAgent, suspendAll, toString, updateAgentSituationReport, updateDescriptionWithAgentDirectoryService, validateAnsweredRequest, verifyCapabilities, verifyKey`

Methods inherited from class com.ibm.able.AbleRemoteDefaultAgent
`getAgentAddr, getAgentHost, getAgentName, rmiRebind, rmiUnbind`

Methods inherited from class com.ibm.able.AbleDefaultAgent
`addBean, addBeans, addEventConnection, addUserDefinedFunction, buildProcessList, clsNm, containsBean, containsBean, containsUserDefinedFunction, generateUniqueName, getBean, getBeans, getDataSource, getEventConnections, getNumEpochs, getProcessList, getUserDefinedFunction, getUserDefinedFunctions, initAllBeans, invokeUserDefinedFunction, isActiveDataSource, process, propertyChange, quitEnabledEventProcessing, removeAllBeans, removeAllConnections, removeAllEventConnections, removeBean, removeBean, removeBeans, removeEventConnection, removeUserDefinedFunction, resetAllBeans, setActiveDataSource, setDataFlowEnabled, setProcessList, setUserDefinedFunctions`

Methods inherited from class com.ibm.able.AbleObject
`addAbleEventListener, addDestBufferConnection, addPropertyChangeListener, addPropertyConnection, addSourceBufferConnection, addStateChangeListener, dataChanged, firePropertyChange, flushAbleEventQueue, getAbleEventListeners, getAbleEventProcessingEnabled, getAbleEventQueueSize, getComment, getDestBufferConnections, getFileName, getInputBuffer, getInputBuffer, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getLogger, getName, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getParent, getProperties, getProperty, getPropertyChangeListeners, getPropertyConnectionManager, getSleepTime, getSourceBufferConnections, getState, getTraceLogger, hasInputBuffer, hasOutputBuffer, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isChanged, isConnectable, isDataFlowEnabled, isTimerEventProcessingEnabled, notifyAbleEventListeners, processAbleEvent, processBufferConnections, processNoEventProcessingEnabledSituation, processTimerEvent, removeAbleEventListener, removeAllAbleEventListeners, removeAllBufferConnections, removeAllPropertyConnections, removeDestBufferConnection, removeProperty, removePropertyChangeListener, removePropertyConnection, removeSourceBufferConnection, removeStateChangeListener, restartEnabledEventProcessing, restoreFromFile, restoreFromFile, restoreFromSerializedFile, restoreFromStream, resumeEnabledEventProcessing, saveToFile, saveToFile, setAbleEventProcessingEnabled, setChanged, setComment, setFileName, setInputBuffer, setInputBuffer, setLogger, setName, setOutputBuffer, setOutputBuffer, setParent, setProperties, setProperty, setSleepTime, setState, setTimerEventProcessingEnabled, setTraceLogger, sourceConnectionsOK, startEnabledEventProcessing, suspendEnabledEventProcessing`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Methods inherited from interface com.ibm.able.platform.AblePlatformAgent
`getAboutDataBean, getAgentAutonomyLevel, getAgentDescription, getAgentLastUpdate, getAgentStatus, getAgentSummary, getAgentType, getAgentVendor, getAgentVersion, getCapabilities, getCapability, getCapabilityAutonomyLevels, getCapabilityOrder, getCapabilityPresets, getCapabilitySummaryByAgentAutonomyLevel, getCapabilitySummaryByCapabilityAutonomyLevels, getComment, getCustomizerDataBean, getCustomizerInfo, getJasAgentAttributes, getJasAgentName, getPlatformAgentName, handleAnsweredRequest, initializeAgent, initializeAgent, isAgentMovable, isAgentToAutoRegister, isAgentToBindToRmi, preInit, preInit, quitAgent, resetAgent, resumeAgent, setAgentAutonomyLevel, setCapabilityAutonomyLevel, setCapabilityAutonomyLevels, setCustomizerDataBean, suspendAgent`

Methods inherited from interface com.ibm.able.AbleRemoteAgent
`addEventConnection, getAgentAddr, getAgentHost, getAgentName, getDataSource, isActiveDataSource, removeEventConnection, setActiveDataSource`

Methods inherited from interface com.ibm.able.AbleRemoteBean
`getName, getProperties, getProperty, getState, init, process, process, quitAll, removeProperty, resumeAll, setProperties, setProperty, suspendAll`

Methods inherited from interface com.ibm.able.AbleEventListenerRemoteManager
`addAbleEventListener, notifyAbleEventListeners, removeAbleEventListener`

Methods inherited from interface com.ibm.able.AbleEventQueueRemoteManager
`flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isTimerEventProcessingEnabled, quitEnabledEventProcessing, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing`

Methods inherited from interface com.ibm.able.AbleBeanRemoteContainer
`addBean, containsBean, containsBean, getBean, getBeans, removeAllBeans, removeBean, removeBean`

Methods inherited from interface com.ibm.able.AbleUserDefinedFunctionRemoteManager
`addUserDefinedFunction, containsUserDefinedFunction, getUserDefinedFunction, getUserDefinedFunctions, invokeUserDefinedFunction, removeUserDefinedFunction, setUserDefinedFunctions`

Methods inherited from interface javax.agent.service.transport.MessageListener
`equals, hashCode`

Methods inherited from interface com.ibm.able.AbleBean
`getComment, getLogger, getName, getParent, getProperties, getProperty, getState, getTraceLogger, isChanged, removeProperty, setChanged, setComment, setLogger, setName, setParent, setProperties, setProperty, setState, setTraceLogger`

Methods inherited from interface com.ibm.able.AbleDataBufferManager
`addDestBufferConnection, addSourceBufferConnection, getDestBufferConnections, getInputBuffer, getInputBuffer, getInputBufferAsString, getInputBufferAsStringArray, getInputBufferContents, getOutputBuffer, getOutputBuffer, getOutputBufferAsString, getOutputBufferAsStringArray, getOutputBufferContents, getSourceBufferConnections, hasInputBuffer, hasOutputBuffer, isConnectable, isDataFlowEnabled, processBufferConnections, removeAllBufferConnections, removeDestBufferConnection, removeSourceBufferConnection, setInputBuffer, setInputBuffer, setOutputBuffer, setOutputBuffer`

Methods inherited from interface com.ibm.able.AbleEventListenerManager
`addAbleEventListener, dataChanged, getAbleEventListeners, notifyAbleEventListeners, removeAbleEventListener`

Methods inherited from interface com.ibm.able.AbleEventQueueManager
`flushAbleEventQueue, getAbleEventProcessingEnabled, getAbleEventQueueSize, getSleepTime, isAbleEventPostingEnabled, isAbleEventProcessingEnabled, isTimerEventProcessingEnabled, restartEnabledEventProcessing, resumeEnabledEventProcessing, setAbleEventProcessingEnabled, setSleepTime, setTimerEventProcessingEnabled, startEnabledEventProcessing, suspendEnabledEventProcessing`

Methods inherited from interface com.ibm.able.AbleEventQueueProcessor
`processAbleEvent, processNoEventProcessingEnabledSituation, processTimerEvent`

Methods inherited from interface com.ibm.able.AblePropertyChangeManager
`addPropertyChangeListener, addPropertyConnection, getPropertyChangeListeners, getPropertyConnectionManager, removeAllPropertyConnections, removePropertyChangeListener, removePropertyConnection`

Methods inherited from interface com.ibm.able.AbleSerializable
`getFileName, restoreFromFile, restoreFromFile, saveToFile, saveToFile, setFileName`

Methods inherited from interface com.ibm.able.AbleBeanContainer
`getName`

Field Detail

### defaultName

    public static final java.lang.String defaultName

  Value assigned to name by default.

  See Also:
    Constant Field Values

Constructor Detail

### JasNaiveBayesDistributedAgent

    public JasNaiveBayesDistributedAgent()
                                  throws java.rmi.RemoteException,
                                         AbleException

  Constructor for AbleNaiveBayesClassifierAgent

### JasNaiveBayesDistributedAgent

    public JasNaiveBayesDistributedAgent(java.lang.String theName)
                                  throws java.rmi.RemoteException,
                                         AbleException

  Constructor for AbleKnnClassifierAgent

Method Detail

### setDefaults

    protected void setDefaults()
                        throws AbleException

  Set default values for parameters

  Throws:
    `AbleException`

### init

    public void init()
              throws AbleException

  Generate a naive bayes Classifier agent bean. If the training data file is not set, no action is taken. If the test data file is not set, the test import and filter beans are not generated. The following attributes must be set before initialization:
  1. trainDataFileName
  2. testDataFileName
  The value for 'm' may also be set before initialization.

  Specified by:
    `init` in interface `AbleRemoteBean`
  Overrides:
    `init` in class `AblePlatformDefaultAgent`
  Throws:
    `AbleException` - On any error.

### reset

    public void reset()
               throws AbleException

  Reset each bean created when the agent was initialized. Restore processing options to default values.

  Specified by:
    `reset` in interface `AbleRemoteBean`
  Overrides:
    `reset` in class `AblePlatformDefaultAgent`
  Throws:
    `AbleException` - On any error.

### handleAbleEvent

    public void handleAbleEvent(AbleEvent theAbleEvent)
                         throws AbleException

  Handle an Able event.

  In this implementation, special processing occurs for EOF on the active data source. All other events are passed up to the superclass (AbleObject) for processing.

  Specified by:
    `handleAbleEvent` in interface `AbleRemoteEventListener`
  Overrides:
    `handleAbleEvent` in class `AbleDefaultAgent`
  Parameters:
    `theAbleEvent` - The event to handle.

  Throws:
    `AbleException` - If an error occurs.

### setTrainDataFileName

    public void setTrainDataFileName(java.lang.String aFileName)
                              throws AbleException

  Set the name of the training data file

  Throws:
    `AbleException`

### getTrainDataFileName

    public java.lang.String getTrainDataFileName()

  Get the name of the training data file

### setBufferSize

    public void setBufferSize(int size)

  Set the buffer size

### getBufferSize

    public int getBufferSize()

  Get the buffer size

### getNaiveBayesBean

    public AbleNaiveBayesDistributed getNaiveBayesBean()

  Get the NaiveBayes bean

### getNaiveBayesImp1

    public AbleImport getNaiveBayesImp1()

  Get the import 1 bean

### getNaiveBayesFil1

    public AbleFilter getNaiveBayesFil1()

  Get the filter 1 bean

### getNaiveBayesFil2

    public AbleFilter getNaiveBayesFil2()

  Get the filter 2 bean

### getNumRecords

    public long getNumRecords()

  Get the number of records

### getNumClasses

    public int getNumClasses()

  Get the number of classes

### getNumAttributes

    public int getNumAttributes()

  Get the number of attributes

### sendTo

    public void sendTo(javax.agent.Locator theDestinationLocator,
                       javax.agent.AgentName theDestinationAgentName,
                       java.lang.Object theMessage)
                throws AbleException

  Main method for testing

  Specified by:
    `sendTo` in interface `JasNaiveBayesDistributedAgentIF`
  Throws:
    `AbleException`

### debugTrace

    protected void debugTrace(java.lang.String theMessage)

  Log a trace message.

  Overrides:
    `debugTrace` in class `AbleDefaultAgent`
  Parameters:
    `theMessage` - A String containing text to be traced.

Overview | Package | Class | Use | Tree | Serialized | Deprecated | Index | Help
| ABLE 2.3.0 07/13/2005 14:21:00
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

(C) Copyright IBM Corporation 1999, 2005