Class NearestNeighborLearningAlgorithm
- java.lang.Object
-
- ai.libs.jaicore.basic.algorithm.AAlgorithm<TimeSeriesDataset2,C>
-
- ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSCLearningAlgorithm<java.lang.Integer,NearestNeighborClassifier>
-
- ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.neighbors.NearestNeighborLearningAlgorithm
-
- All Implemented Interfaces:
java.lang.Iterable<org.api4.java.algorithm.events.IAlgorithmEvent>,java.util.concurrent.Callable<NearestNeighborClassifier>,java.util.Iterator<org.api4.java.algorithm.events.IAlgorithmEvent>,org.api4.java.algorithm.IAlgorithm<TimeSeriesDataset2,NearestNeighborClassifier>,org.api4.java.common.control.ICancelable,org.api4.java.common.control.ILoggingCustomizable
public class NearestNeighborLearningAlgorithm extends ASimplifiedTSCLearningAlgorithm<java.lang.Integer,NearestNeighborClassifier>
Training algorithm for the nearest neighbors classifier. This algorithm just delegates the value matrix, timestamps and targets to the classifier.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNearestNeighborLearningAlgorithm(ai.libs.jaicore.basic.IOwnerBasedAlgorithmConfig config, NearestNeighborClassifier classifier, TimeSeriesDataset2 input)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NearestNeighborClassifiercall()org.api4.java.algorithm.events.IAlgorithmEventnextWithException()-
Methods inherited from class ai.libs.jaicore.ml.classification.singlelabel.timeseries.learner.ASimplifiedTSCLearningAlgorithm
cancel, getClassifier, hasNext, iterator, next, registerListener
-
Methods inherited from class ai.libs.jaicore.basic.algorithm.AAlgorithm
activate, announceTimeoutDetected, avoidReinterruptionOnShutdownOnCurrentThread, checkAndConductTermination, checkTermination, computeTimeoutAware, getActivationTime, getConfig, getId, getInput, getLoggerName, getNumCPUs, getRemainingTimeToDeadline, getState, getTimeout, getTimeoutPrecautionOffset, hasThreadBeenInterruptedDuringShutdown, interruptThreadAsPartOfShutdown, isCanceled, isShutdownInitialized, isStopCriterionSatisfied, isTimeouted, post, registerActiveThread, resolveShutdownInterruptOnCurrentThread, setConfig, setDeadline, setLoggerName, setMaxNumThreads, setNumCPUs, setState, setTimeout, setTimeout, setTimeoutPrecautionOffset, shutdown, terminate, unregisterActiveThread, unregisterThreadAndShutdown
-
-
-
-
Constructor Detail
-
NearestNeighborLearningAlgorithm
protected NearestNeighborLearningAlgorithm(ai.libs.jaicore.basic.IOwnerBasedAlgorithmConfig config, NearestNeighborClassifier classifier, TimeSeriesDataset2 input)
-
-
Method Detail
-
call
public NearestNeighborClassifier call() throws org.api4.java.algorithm.exceptions.AlgorithmException
- Throws:
org.api4.java.algorithm.exceptions.AlgorithmException
-
nextWithException
public org.api4.java.algorithm.events.IAlgorithmEvent nextWithException()
Description copied from class:ASimplifiedTSCLearningAlgorithm- Specified by:
nextWithExceptionin interfaceorg.api4.java.algorithm.IAlgorithm<TimeSeriesDataset2,NearestNeighborClassifier>- Overrides:
nextWithExceptionin classASimplifiedTSCLearningAlgorithm<java.lang.Integer,NearestNeighborClassifier>
-
-