Class MLTrainSVM
java.lang.Object
net.algart.json.PropertyChecker
net.algart.executors.api.ExecutionBlock
net.algart.executors.api.Executor
net.algart.executors.modules.opencv.common.OpenCVExecutor
net.algart.executors.modules.opencv.matrices.ml.AbstractMLOperation
net.algart.executors.modules.opencv.matrices.ml.AbstractMLTrain
net.algart.executors.modules.opencv.matrices.ml.training.MLTrainSVM
- All Implemented Interfaces:
AutoCloseable
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumstatic enumNested classes/interfaces inherited from class net.algart.executors.api.Executor
net.algart.executors.api.Executor.TimingNested classes/interfaces inherited from class net.algart.executors.api.ExecutionBlock
net.algart.executors.api.ExecutionBlock.ExecutionMode -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class net.algart.executors.modules.opencv.matrices.ml.AbstractMLTrain
OUTPUT_ACTUAL_TRAINING_RESPONSES, OUTPUT_IS_CLASSIFIER, OUTPUT_TRAINING_ERROR, OUTPUT_TRAINING_METADATA, OUTPUT_TRAINING_MODEL_FILEFields inherited from class net.algart.executors.modules.opencv.matrices.ml.AbstractMLOperation
INPUT_SAMPLES, INPUT_TRAINING_RESPONSES, MAX_NUMBER_OF_CATEGORICAL_RESPONSES_FOR_CONVERSION_TO_BINARYFields inherited from class net.algart.executors.api.Executor
ENUM_VALUE_OF_NAME_CUSTOM_METHOD, LOG, LOGGABLE_DEBUG, LOGGABLE_INFO, LOGGABLE_TRACE, OUTPUT_EXECUTOR_ID_NAME, OUTPUT_PLATFORM_ID_NAME, OUTPUT_RESOURCE_FOLDER_NAME, STANDARD_VISIBLE_RESULT_PARAMETER_NAMEFields inherited from class net.algart.executors.api.ExecutionBlock
DEFAULT_INPUT_PORT, DEFAULT_OUTPUT_PORT, EXTENDED_MODE, GLOBAL_SHARED_SESSION_ID, SHOW_INFO_ON_STARTUP -
Method Summary
Modifier and TypeMethodDescriptionprotected booleanprotected voiddoTrain(MLTrainer trainer, org.bytedeco.opencv.opencv_ml.TrainData trainData, int sampleLength, int responseLength) doublegetC()doubledoubledoubledoublegetCoef()doubledoubledoubledoubledoubledoubledoubledoublegetGamma()doubledoubledoubleintgetKFold()doublegetNu()doubledoubledoubledoublegetP()doubledoubledoubledoubleintbooleanbooleanbooleanbooleanbooleanbooleanbooleanbooleanprotected MLKindstatic MLTrainSVMstatic MLTrainSVMvoidprocess()setAutoTraining(boolean autoTraining) setBalanced(boolean balanced) setC(double c) setCGridCustom(boolean cGridCustom) setCGridLogStep(double cGridLogStep) setCGridMax(double cGridMax) setCGridMin(double cGridMin) setCoef(double coef) setCoefGridCustom(boolean coefGridCustom) setCoefGridLogStep(double coefGridLogStep) setCoefGridMax(double coefGridMax) setCoefGridMin(double coefGridMin) setDegree(double degree) setDegreeGridCustom(boolean degreeGridCustom) setDegreeGridLogStep(double degreeGridLogStep) setDegreeGridMax(double degreeGridMax) setDegreeGridMin(double degreeGridMin) setGamma(double gamma) setGammaGridCustom(boolean gammaGridCustom) setGammaGridLogStep(double gammaGridLogStep) setGammaGridMax(double gammaGridMax) setGammaGridMin(double gammaGridMin) setKernelType(MLTrainSVM.KernelType kernelType) setKFold(int kFold) setNu(double nu) setNuGridCustom(boolean nuGridCustom) setNuGridLogStep(double nuGridLogStep) setNuGridMax(double nuGridMax) setNuGridMin(double nuGridMin) setP(double p) setPGridCustom(boolean pGridCustom) setPGridLogStep(double pGridLogStep) setPGridMax(double pGridMax) setPGridMin(double pGridMin) setSvmType(MLTrainSVM.SVMType svmType) setTerminationEpsilon(double terminationEpsilon) setTerminationMaxCount(int terminationMaxCount) static StringtoString(org.bytedeco.opencv.opencv_ml.SVM model) Methods inherited from class net.algart.executors.modules.opencv.matrices.ml.AbstractMLTrain
doCalculateError, doCalculateError, doTrain, doTrain, getTrainingFlagByMask, getTrainingFlags, isCalculateError, isConvertCategoricalResponses, isTestPredictTrainedSamples, isTrainingCombinedSamplesAndResponses, metadata, setCalculateError, setConvertCategoricalResponses, setTestPredictTrainedSamples, setTrainingCombinedSamplesAndResponses, setTrainingFlagByMask, setTrainingFlags, setTrainingFlags, train, trainNumbers, trainPixels, varType, writeTrainerMethods inherited from class net.algart.executors.modules.opencv.matrices.ml.AbstractMLOperation
categoricalToMultiBinaryResponses, categoricalToMultiBinaryResponses, getStatModelFile, isRelativizePath, samplesType, selectIndexesOfMaximalMultiResponses, selectIndexesOfMaximalMultiResponses, setRelativizePath, setStatModelFile, statModelFileMethods inherited from class net.algart.executors.modules.opencv.common.OpenCVExecutor
close, isUseGPU, postprocess, putMat, setMat, setUseGPU, useGPUMethods inherited from class net.algart.executors.api.Executor
addServiceTime, allocatedMemory, allOutputContainers, allParameters, checkOutputNecessary, configAllocatedMemory, debugTime, defaultInputPortName, defaultInputPortName, defaultOutputPortName, defaultOutputPortName, defaultVisibleResultsInformation, disableOnChangeParameterAutomatic, disableOnChangeParametersAutomatic, execute, execute, executorPlatform, executorResourceFolder, fillSystemOutputs, fineAllocatedMemory, finishTimingOfExecutingAll, getEndProcessingTimeStamp, getServiceTime, getStartProcessingTimeStamp, infoTime, initialize, isCancellingExecutionRequested, isCancellingFurtherExecutionRequested, isMultithreadingEnvironment, isTimingEnabled, isUsingVisibleResultParameter, isVisiblePort, isVisibleResultDisabled, logDebug, logDebug, loggingEnabled, logInfo, logInfo, logTrace, logTrace, ofLogLevel, onChangeParameter, onChangeParameterAutomatic, parameterControlValueType, parameterJavaType, requestCancellingFurtherExecution, requestContinuingFurtherExecution, reset, resetTiming, setDefaultInputMat, setDefaultInputNumbers, setDefaultInputPort, setDefaultInputScalar, setDefaultOutputMat, setDefaultOutputNumbers, setDefaultOutputPort, setDefaultOutputScalar, setEndProcessingTimeStamp, setMultithreadingEnvironment, setStartProcessingTimeStamp, setTimingEnabled, showStatus, showStatus, skipStandardAutomaticParameters, startTimingOfExecutingAll, status, statusData, toString, useVisibleResultParameter, visibleOutputPortName, visibleResultsInformationMethods inherited from class net.algart.executors.api.ExecutionBlock
addInputData, addInputMat, addInputNumbers, addInputScalar, addOneTimeTaskAfterExecutingAll, addOutputData, addOutputMat, addOutputNumbers, addOutputScalar, addPort, addTaskAfterExecutingAll, addTaskBeforeExecutingAll, afterExecutingAll, allOneTimeTasksAfterExecutingAll, allSerializedSpecificationsArray, allTasksAfterExecutingAll, allTasksBeforeExecutingAll, beforeExecutingAll, checkInputNecessary, clearSession, contextPath, freeAllInputPortData, freeAllOutputPortData, freeAllPortData, getCaller, getContextId, getContextName, getContextPath, getCurrentDirectory, getData, getData, getDoubleScalar, getDoubleScalar, getExecutorId, getInputData, getInputData, getInputData, getInputData, getInputDataContainer, getInputDataContainer, getInputMat, getInputMat, getInputMat, getInputMat, getInputMatContainer, getInputMatContainer, getInputNumbers, getInputNumbers, getInputNumbers, getInputNumbers, getInputNumbersContainer, getInputNumbersContainer, getInputPort, getInputScalar, getInputScalar, getInputScalar, getInputScalar, getInputScalarContainer, getInputScalarContainer, getIntScalar, getIntScalar, getLongScalar, getLongScalar, getMat, getMat, getNumbers, getNumbers, getOutputPort, getOwnerId, getPlatformId, getPort, getRequiredInputPort, getRequiredOutputPort, getRootCaller, getScalar, getScalar, getSessionId, getSpecification, getStringScalar, getStringScalar, globalLoaders, hasDefaultInputPort, hasDefaultOutputPort, hasInputPort, hasOutputPort, initializeExecutionSystem, inputPorts, inputPortsMap, interrupt, isAllOutputsNecessary, isClosed, isInputNecessary, isInterrupted, isInterruptionRequested, isOutputNecessary, isReadOnlyInput, isVisibleResultNecessary, needToRepeat, newExecutor, newExecutor, outputPorts, outputPortsMap, parameters, putDoubleScalar, putDoubleScalar, putIntScalar, putIntScalar, putJsonScalar, putJsonScalar, putLongScalar, putLongScalar, putMat, putMat, putNumbers, putNumbers, putNumbers, putNumbers, putScalar, putScalar, putStringScalar, putStringScalar, recommendedCategory, recommendedName, removeInputPort, removeOneTimeTaskAfterExecutingAll, removeOutputData, removeOutputPort, removeTaskAfterExecutingAll, removeTaskBeforeExecutingAll, replacePort, requestDefaultOutput, requestOutput, setAllOutputsNecessary, setBooleanParameter, setCaller, setContextId, setContextId, setContextName, setContextPath, setCurrentDirectory, setDoubleParameter, setInterruptionRequested, setIntParameter, setLongParameter, setOutputScalar, setOutputScalar, setOutputScalar, setOutputScalar, setOutputScalar, setOutputScalar, setOutputScalarIfNecessary, setOwnerId, setParameter, setParameters, setSession, setSessionId, setShared, setSpecification, setStringParameter, setVisibleResultNecessary, translateCurrentDirectoryMethods inherited from class net.algart.json.PropertyChecker
doubleOrDefault, doubleOrNegativeInfinity, doubleOrNull, doubleOrPositiveInfinity, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, inRange, inRange, inRange, inRange, inRange, inRange, intOrDefault, intOrNull, longOrDefault, longOrNull, nonEmpty, nonEmpty, nonEmptyTrimmed, nonEmptyTrimmed, nonLessThan, nonLessThan, nonLessThan, nonLessThan, nonLessThan, nonLessThan, nonNegative, nonNegative, nonNegative, nonNegative, nonNegative, nonNegative, nonNull, nonNull, positive, positive, positive, positive, positive, positive, propertyName
-
Field Details
-
OUTPUT_C
- See Also:
-
OUTPUT_GAMMA
- See Also:
-
OUTPUT_P
- See Also:
-
OUTPUT_NU
- See Also:
-
OUTPUT_COEF
- See Also:
-
OUTPUT_DEGREE
- See Also:
-
-
Method Details
-
newTrainNumbers
-
newTrainPixels
-
getSvmType
-
setSvmType
-
getKernelType
-
setKernelType
-
getC
public double getC() -
setC
-
getGamma
public double getGamma() -
setGamma
-
getP
public double getP() -
setP
-
getNu
public double getNu() -
setNu
-
getCoef
public double getCoef() -
setCoef
-
getDegree
public double getDegree() -
setDegree
-
getTerminationMaxCount
public int getTerminationMaxCount() -
setTerminationMaxCount
-
getTerminationEpsilon
public double getTerminationEpsilon() -
setTerminationEpsilon
-
isAutoTraining
public boolean isAutoTraining() -
setAutoTraining
-
getKFold
public int getKFold() -
setKFold
-
isCGridCustom
public boolean isCGridCustom() -
setCGridCustom
-
getCGridMin
public double getCGridMin() -
setCGridMin
-
getCGridMax
public double getCGridMax() -
setCGridMax
-
getCGridLogStep
public double getCGridLogStep() -
setCGridLogStep
-
isGammaGridCustom
public boolean isGammaGridCustom() -
setGammaGridCustom
-
getGammaGridMin
public double getGammaGridMin() -
setGammaGridMin
-
getGammaGridMax
public double getGammaGridMax() -
setGammaGridMax
-
getGammaGridLogStep
public double getGammaGridLogStep() -
setGammaGridLogStep
-
isPGridCustom
public boolean isPGridCustom() -
setPGridCustom
-
getPGridMin
public double getPGridMin() -
setPGridMin
-
getPGridMax
public double getPGridMax() -
setPGridMax
-
getPGridLogStep
public double getPGridLogStep() -
setPGridLogStep
-
isNuGridCustom
public boolean isNuGridCustom() -
setNuGridCustom
-
getNuGridMin
public double getNuGridMin() -
setNuGridMin
-
getNuGridMax
public double getNuGridMax() -
setNuGridMax
-
getNuGridLogStep
public double getNuGridLogStep() -
setNuGridLogStep
-
isCoefGridCustom
public boolean isCoefGridCustom() -
setCoefGridCustom
-
getCoefGridMin
public double getCoefGridMin() -
setCoefGridMin
-
getCoefGridMax
public double getCoefGridMax() -
setCoefGridMax
-
getCoefGridLogStep
public double getCoefGridLogStep() -
setCoefGridLogStep
-
isDegreeGridCustom
public boolean isDegreeGridCustom() -
setDegreeGridCustom
-
getDegreeGridMin
public double getDegreeGridMin() -
setDegreeGridMin
-
getDegreeGridMax
public double getDegreeGridMax() -
setDegreeGridMax
-
getDegreeGridLogStep
public double getDegreeGridLogStep() -
setDegreeGridLogStep
-
isBalanced
public boolean isBalanced() -
setBalanced
-
process
public void process()- Specified by:
processin classnet.algart.executors.api.Executor
-
toString
-
modelKind
- Specified by:
modelKindin classAbstractMLTrain
-
categoricalResponses
protected boolean categoricalResponses()- Specified by:
categoricalResponsesin classAbstractMLTrain
-
doTrain
protected void doTrain(MLTrainer trainer, org.bytedeco.opencv.opencv_ml.TrainData trainData, int sampleLength, int responseLength) - Overrides:
doTrainin classAbstractMLTrain
-