Class KernelSVMModel
java.lang.Object
org.tribuo.Model<Label>
org.tribuo.classification.sgd.kernel.KernelSVMModel
- All Implemented Interfaces:
com.oracle.labs.mlrg.olcut.provenance.Provenancable<org.tribuo.provenance.ModelProvenance>,Serializable,org.tribuo.protos.ProtoSerializable<org.tribuo.protos.core.ModelProto>
The inference time version of a kernel model trained using Pegasos.
See:
Shalev-Shwartz S, Singer Y, Srebro N, Cotter A "Pegasos: Primal Estimated Sub-Gradient Solver for SVM" Mathematical Programming, 2011.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intProtobuf serialization version.Fields inherited from class org.tribuo.Model
ALL_OUTPUTS, BIAS_FEATURE, featureIDMap, generatesProbabilities, name, outputIDInfo, provenance, provenanceOutputFields inherited from interface org.tribuo.protos.ProtoSerializable
DESERIALIZATION_METHOD_NAME, PROVENANCE_SERIALIZER -
Method Summary
Modifier and TypeMethodDescriptionprotected KernelSVMModelstatic KernelSVMModeldeserializeFromProto(int version, String className, com.google.protobuf.Any message) Deserialization factory.intReturns the number of support vectors used.getTopFeatures(int n) org.tribuo.Prediction<Label> org.tribuo.protos.core.ModelProtoMethods 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, validate
-
Field Details
-
CURRENT_VERSION
-
-
Method Details
-
deserializeFromProto
public static KernelSVMModel 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 used.- Returns:
- The number of support vectors.
-
predict
-
getTopFeatures
-
getExcuse
-
serialize
-
copy
- Specified by:
copyin classorg.tribuo.Model<Label>
-