public class WekaPredictor<T> extends ModelPredictor<T,weka.core.Instance>
Modifier and Type | Field and Description |
---|---|
protected weka.classifiers.Classifier |
classifier |
protected weka.clusterers.Clusterer |
clusterer |
protected weka.attributeSelection.PrincipalComponents |
pca |
applicationRootReference, classIndex, filter, header, imageSize, model, modelReporter, propertyReporter, record, structureRequired, targetURI, valuesRequired
Constructor and Description |
---|
WekaPredictor(org.restlet.data.Reference applicationRootReference,
ModelQueryResults model,
ModelURIReporter modelReporter) |
WekaPredictor(org.restlet.data.Reference applicationRootReference,
ModelQueryResults model,
ModelURIReporter modelReporter,
String[] targetURI) |
Modifier and Type | Method and Description |
---|---|
void |
assignResults(IStructureRecord record,
Object value) |
void |
assignTransformedInstance(IStructureRecord record,
weka.core.Instance value,
double confidence) |
weka.classifiers.Classifier |
getClassifier() |
weka.clusterers.Clusterer |
getClusterer() |
String |
getCompoundURL(weka.core.Instance target) |
BufferedImage |
getLegend(int width,
int height)
Evaluation evaluation = new Evaluation( trainDataset );
evaluation.evaluateModel( classifier, testDataset );
for (int i = 0; i < evaluation.predictions(); i++) {
NominalPrediction prediction = (NominalPrediction)
evaluation.predictions().elementAt(i);
double[] distribution = prediction.distribution();
}
|
weka.attributeSelection.PrincipalComponents |
getPca() |
protected boolean |
isSupported(Object predictor) |
Object |
predict(weka.core.Instance target) |
protected weka.core.Instance |
predictionInstance(weka.core.Instance target) |
void |
setClassifier(weka.classifiers.Classifier classifier) |
void |
setClusterer(weka.clusterers.Clusterer clusterer) |
void |
setPca(weka.attributeSelection.PrincipalComponents pca) |
String |
toString() |
createPredictor, createResultReference, extractRecordID, getClassIndex, getHeader, getImage, getImage, getImageSize, getModel, getModelReporter, getPredictor, getPropertyReporter, isStructureRequired, isValuesRequired, open, process, setImageSize, setModelReporter, setPropertyReporter, setStructureRequired, setValuesRequired, writeMessages
close, getConnection, isCloseConnection, isEnabled, setCloseConnection, setConnection
addPropertyChangeListener, addPropertyChangeListener, getID, removePropertyChangeListener, removePropertyChangeListener, setEnabled
protected weka.classifiers.Classifier classifier
protected weka.clusterers.Clusterer clusterer
protected weka.attributeSelection.PrincipalComponents pca
public WekaPredictor(org.restlet.data.Reference applicationRootReference, ModelQueryResults model, ModelURIReporter modelReporter)
public WekaPredictor(org.restlet.data.Reference applicationRootReference, ModelQueryResults model, ModelURIReporter modelReporter, String[] targetURI)
public weka.attributeSelection.PrincipalComponents getPca()
public void setPca(weka.attributeSelection.PrincipalComponents pca)
public weka.classifiers.Classifier getClassifier()
public void setClassifier(weka.classifiers.Classifier classifier)
public weka.clusterers.Clusterer getClusterer()
public void setClusterer(weka.clusterers.Clusterer clusterer)
protected boolean isSupported(Object predictor) throws org.restlet.resource.ResourceException
isSupported
in class ModelPredictor<T,weka.core.Instance>
org.restlet.resource.ResourceException
protected weka.core.Instance predictionInstance(weka.core.Instance target) throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitException
public String getCompoundURL(weka.core.Instance target) throws net.idea.modbcum.i.exceptions.AmbitException
getCompoundURL
in class ModelPredictor<T,weka.core.Instance>
net.idea.modbcum.i.exceptions.AmbitException
public Object predict(weka.core.Instance target) throws net.idea.modbcum.i.exceptions.AmbitException
predict
in class ModelPredictor<T,weka.core.Instance>
net.idea.modbcum.i.exceptions.AmbitException
public void assignResults(IStructureRecord record, Object value) throws net.idea.modbcum.i.exceptions.AmbitException
assignResults
in class ModelPredictor<T,weka.core.Instance>
net.idea.modbcum.i.exceptions.AmbitException
public void assignTransformedInstance(IStructureRecord record, weka.core.Instance value, double confidence) throws net.idea.modbcum.i.exceptions.AmbitException
net.idea.modbcum.i.exceptions.AmbitException
public String toString()
toString
in class ModelPredictor<T,weka.core.Instance>
public BufferedImage getLegend(int width, int height) throws net.idea.modbcum.i.exceptions.AmbitException
getLegend
in interface IStructureDiagramDepiction<BufferedImage>
getLegend
in class ModelPredictor<T,weka.core.Instance>
net.idea.modbcum.i.exceptions.AmbitException
Copyright © 2004–2020 Ideaconsult Ltd.. All rights reserved.