public class ClassificationVisualizer extends Object
| Modifier and Type | Method and Description |
|---|---|
static ImageResult |
getFancyScatterplot(AbstractScoreBasedClassifier cl1,
AbstractScoreBasedClassifier cl2,
REnvironment e,
DataSet... data)
Scatters the classification scores of two binary classifiers for given data.
|
static ImageResult |
getScatterplot(AbstractScoreBasedClassifier cl1,
AbstractScoreBasedClassifier cl2,
DataSet class0,
DataSet class1,
REnvironment e,
boolean drawThreshold)
This method returns an
ImageResult containing a scatter plot of
the scores for the given classifiers cl1 and
cl2. |
static ImageResult |
plotScores(AbstractScoreBasedClassifier cl,
DataSet class0,
DataSet class1,
REnvironment e,
int bins,
double density,
String plotOptions)
This method returns an
ImageResult containing a plot of the
histograms of the scores. |
static void |
plotScores(AbstractScoreBasedClassifier cl,
DataSet class0,
DataSet class1,
REnvironment e,
int bins,
double density,
String plotOptions,
String fName)
This method creates a pdf containing a plot of the histograms of the
scores.
|
public static ImageResult plotScores(AbstractScoreBasedClassifier cl, DataSet class0, DataSet class1, REnvironment e, int bins, double density, String plotOptions) throws Exception
ImageResult containing a plot of the
histograms of the scores. Further plotting options can be used to make
such results comparable.cl - the classifierclass0 - the sample for class 0class1 - the sample for class 1e - the R environmentbins - the number of bins in the plotdensity - the density of shadingplotOptions - further plot options, e.g.
xlim=c(-20,20), xlab="score", if
null the default plotting options are chosenException - if something went wrongImageResult.ImageResult(String, String,
java.awt.image.BufferedImage),
REnvironment.plot(CharSequence, double, double)public static void plotScores(AbstractScoreBasedClassifier cl, DataSet class0, DataSet class1, REnvironment e, int bins, double density, String plotOptions, String fName) throws Exception
cl - the classifierclass0 - the sample for class 0class1 - the sample for class 1e - the R environmentbins - the number of bins in the plotdensity - the density of shadingplotOptions - further plot options, e.g.
xlim=c(-20,20), xlab="score", if
null the default plotting options are chosenfName - the file nameException - if something went wrongREnvironment.plotToPDF(CharSequence, double, double, String, boolean)public static ImageResult getScatterplot(AbstractScoreBasedClassifier cl1, AbstractScoreBasedClassifier cl2, DataSet class0, DataSet class1, REnvironment e, boolean drawThreshold) throws Exception
ImageResult containing a scatter plot of
the scores for the given classifiers cl1 and
cl2.cl1 - the first classifiercl2 - the second classifierclass0 - the sample for class 0class1 - the sample for class 1e - an R environmentdrawThreshold - indicates whether to draw the classification threshold or notException - if something went wrongImageResult.ImageResult(String, String,
java.awt.image.BufferedImage),
REnvironment.plot(CharSequence, double, double)public static ImageResult getFancyScatterplot(AbstractScoreBasedClassifier cl1, AbstractScoreBasedClassifier cl2, REnvironment e, DataSet... data) throws Exception
cl1 - the first classifiercl2 - the second classifiere - the REnvironmentdata - the dataException - if the classifiers are not binary, the scores cannot be computed correctly or some problems occur in the communication with the REnvironment