public abstract class AbstractSGDModel<T extends Output<T>> extends Model<T>
Modifier and Type | Class and Description |
---|---|
protected static class |
AbstractSGDModel.PredAndActive
A nominal tuple used to capture the prediction and the number of active features used by the model.
|
Modifier and Type | Field and Description |
---|---|
protected boolean |
addBias |
protected FeedForwardParameters |
modelParameters
The weights for this model.
|
ALL_OUTPUTS, BIAS_FEATURE, featureIDMap, generatesProbabilities, name, outputIDInfo, provenance, provenanceOutput
Modifier | Constructor and Description |
---|---|
protected |
AbstractSGDModel(String name,
ModelProvenance provenance,
ImmutableFeatureMap featureIDMap,
ImmutableOutputInfo<T> outputIDInfo,
FeedForwardParameters weights,
boolean generatesProbabilities,
boolean addBias)
Constructs a linear model trained via SGD.
|
Modifier and Type | Method and Description |
---|---|
FeedForwardParameters |
getModelParameters()
Returns a copy of the model parameters.
|
protected AbstractSGDModel.PredAndActive |
predictSingle(Example<T> example)
Generates the dense vector prediction from the supplied example.
|
copy, copy, generatesProbabilities, getExcuse, getExcuses, getFeatureIDMap, getName, getOutputIDInfo, getProvenance, getTopFeatures, innerPredict, predict, predict, predict, setName, toString, validate
protected FeedForwardParameters modelParameters
protected boolean addBias
protected AbstractSGDModel(String name, ModelProvenance provenance, ImmutableFeatureMap featureIDMap, ImmutableOutputInfo<T> outputIDInfo, FeedForwardParameters weights, boolean generatesProbabilities, boolean addBias)
name
- The model name.provenance
- The model provenance.featureIDMap
- The feature domain.outputIDInfo
- The output domain.weights
- The model weights.generatesProbabilities
- Does this model generate probabilities?addBias
- Should the model add a bias feature to the feature vector?protected AbstractSGDModel.PredAndActive predictSingle(Example<T> example)
example
- The example to use for prediction.public FeedForwardParameters getModelParameters()
Copyright © 2015–2021 Oracle and/or its affiliates. All rights reserved.