Class LibSVMClassificationModel
java.lang.Object
org.tribuo.Model<Label>
org.tribuo.common.libsvm.LibSVMModel<Label>
org.tribuo.classification.libsvm.LibSVMClassificationModel
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.Provenancable<org.tribuo.provenance.ModelProvenance>,Serializable,org.tribuo.ONNXExportable,org.tribuo.protos.ProtoSerializable<org.tribuo.protos.core.ModelProto>
public class LibSVMClassificationModel
extends LibSVMModel<Label>
implements org.tribuo.ONNXExportable
A classification model that uses an underlying LibSVM model to make the
predictions.
See:
Chang CC, Lin CJ. "LIBSVM: a library for Support Vector Machines" ACM transactions on intelligent systems and technology (TIST), 2011.for the nu-svc algorithm:
Schölkopf B, Smola A, Williamson R, Bartlett P L. "New support vector algorithms" Neural Computation, 2000, 1207-1245.and for the original algorithm:
Cortes C, Vapnik V. "Support-Vector Networks" Machine Learning, 1995.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intProtobuf serialization version.Fields inherited from class org.tribuo.common.libsvm.LibSVMModel
modelsFields inherited from class org.tribuo.Model
ALL_OUTPUTS, BIAS_FEATURE, featureIDMap, generatesProbabilities, name, outputIDInfo, provenance, provenanceOutputFields inherited from interface org.tribuo.ONNXExportable
PROVENANCE_METADATA_FIELD, SERIALIZERFields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER -
Method Summary
Modifier and TypeMethodDescriptionprotected LibSVMClassificationModelstatic LibSVMClassificationModeldeserializeFromProto(int version, String className, com.google.protobuf.Any message) Deserialization factory.ai.onnx.proto.OnnxMl.ModelProtoexportONNXModel(String domain, long modelVersion) intReturns the number of support vectors.org.tribuo.Prediction<Label> org.tribuo.protos.core.ModelProtoorg.tribuo.util.onnx.ONNXNodewriteONNXGraph(org.tribuo.util.onnx.ONNXRef<?> input) Methods inherited from class org.tribuo.common.libsvm.LibSVMModel
copyModel, deserializeModel, deserializeParameters, getExcuse, getInnerModels, getModel, getTopFeatures, modelEquals, serializeModel, serializeParametersMethods inherited from class org.tribuo.Model
castModel, copy, createDataCarrier, deserialize, deserializeFromFile, deserializeFromStream, generatesProbabilities, getExcuses, getFeatureIDMap, getName, getOutputIDInfo, getProvenance, innerPredict, predict, predict, serializeToFile, serializeToStream, setName, toString, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.tribuo.ONNXExportable
saveONNXModel, serializeProvenance
-
Field Details
-
CURRENT_VERSION
-
-
Method Details
-
deserializeFromProto
public static LibSVMClassificationModel deserializeFromProto(int version, String className, com.google.protobuf.Any message) throws com.google.protobuf.InvalidProtocolBufferException Deserialization factory.- Parameters:
version- The serialized object version.className- The class name.message- The serialized data.- Returns:
- The deserialized object.
- Throws:
com.google.protobuf.InvalidProtocolBufferException- If the protobuf could not be parsed from themessage.
-
getNumberOfSupportVectors
Returns the number of support vectors.- Returns:
- The number of support vectors.
-
predict
-
copy
protected LibSVMClassificationModel copy(String newName, org.tribuo.provenance.ModelProvenance newProvenance) - Specified by:
copyin classorg.tribuo.Model<Label>
-
exportONNXModel
- Specified by:
exportONNXModelin interfaceorg.tribuo.ONNXExportable
-
writeONNXGraph
- Specified by:
writeONNXGraphin interfaceorg.tribuo.ONNXExportable
-
serialize
-