public class EasyPredictModelWrapper
extends java.lang.Object
implements java.io.Serializable
Modifier and Type | Class and Description |
---|---|
static class |
EasyPredictModelWrapper.Config
Configuration builder for instantiating a Wrapper.
|
Constructor and Description |
---|
EasyPredictModelWrapper(EasyPredictModelWrapper.Config config)
Create a wrapper for a generated model.
|
EasyPredictModelWrapper(GenModel model)
Create a wrapper for a generated model.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getHeader()
Some autoencoder thing, I'm not sure what this does.
|
ModelCategory |
getModelCategory()
Get the category (type) of model.
|
java.lang.String[] |
getResponseDomainValues()
Get the array of levels for the response column.
|
long |
getTotalUnknownCategoricalLevelsSeen()
Get the total number unknown categorical levels seen.
|
java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.concurrent.atomic.AtomicLong> |
getUnknownCategoricalLevelsSeenPerColumn()
Get unknown categorical level counts.
|
AbstractPrediction |
predict(RowData data) |
AbstractPrediction |
predict(RowData data,
ModelCategory mc)
Make a prediction on a new data point.
|
AutoEncoderModelPrediction |
predictAutoEncoder(RowData data)
Make a prediction on a new data point using an AutoEncoder model.
|
BinomialModelPrediction |
predictBinomial(RowData data)
Make a prediction on a new data point using a Binomial model.
|
ClusteringModelPrediction |
predictClustering(RowData data)
Make a prediction on a new data point using a Clustering model.
|
DimReductionModelPrediction |
predictDimReduction(RowData data)
Make a prediction on a new data point using a Dimension Reduction model (PCA, GLRM)
|
KLimeModelPrediction |
predictKLime(RowData data)
Make a prediction on a new data point using a k-LIME model.
|
MultinomialModelPrediction |
predictMultinomial(RowData data)
Make a prediction on a new data point using a Multinomial model.
|
RegressionModelPrediction |
predictRegression(RowData data)
Make a prediction on a new data point using a Regression model.
|
Word2VecPrediction |
predictWord2Vec(RowData data)
Lookup word embeddings for a given word (or set of words).
|
SortedClassProbability[] |
sortByDescendingClassProbability(BinomialModelPrediction p)
A helper function to return an array of binomial class probabilities for a prediction in sorted order.
|
SortedClassProbability[] |
sortByDescendingClassProbability(MultinomialModelPrediction p)
A helper function to return an array of multinomial class probabilities for a prediction in sorted order.
|
public EasyPredictModelWrapper(EasyPredictModelWrapper.Config config)
config
- The wrapper configurationpublic EasyPredictModelWrapper(GenModel model)
model
- The generated modelpublic long getTotalUnknownCategoricalLevelsSeen()
public java.util.concurrent.ConcurrentHashMap<java.lang.String,java.util.concurrent.atomic.AtomicLong> getUnknownCategoricalLevelsSeenPerColumn()
public AbstractPrediction predict(RowData data, ModelCategory mc) throws PredictException
data
- A new data point.PredictException
public AbstractPrediction predict(RowData data) throws PredictException
PredictException
public AutoEncoderModelPrediction predictAutoEncoder(RowData data) throws PredictException
data
- A new data point.PredictException
public DimReductionModelPrediction predictDimReduction(RowData data) throws PredictException
data
- A new data point.PredictException
public Word2VecPrediction predictWord2Vec(RowData data) throws PredictException
data
- RawData structure, every key with a String value will be translated to an embeddingPredictException
- if model is not a WordEmbedding modelpublic BinomialModelPrediction predictBinomial(RowData data) throws PredictException
data
- A new data point.PredictException
public MultinomialModelPrediction predictMultinomial(RowData data) throws PredictException
data
- A new data point.PredictException
public SortedClassProbability[] sortByDescendingClassProbability(BinomialModelPrediction p)
p
- The prediction.public SortedClassProbability[] sortByDescendingClassProbability(MultinomialModelPrediction p)
p
- The prediction.public ClusteringModelPrediction predictClustering(RowData data) throws PredictException
data
- A new data point.PredictException
public RegressionModelPrediction predictRegression(RowData data) throws PredictException
data
- A new data point.PredictException
public KLimeModelPrediction predictKLime(RowData data) throws PredictException
data
- A new data point.PredictException
public ModelCategory getModelCategory()
public java.lang.String[] getResponseDomainValues()
public java.lang.String getHeader()