Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## de.jstacs.classifier.utils
Class ClassificationVisualizer

    java.lang.Object
      de.jstacs.classifier.utils.ClassificationVisualizer

    public class ClassificationVisualizer

extends Object

This class enables you to visualize some classifier results.

Author:
  Jens Keilwagen

Method Summary
`static ImageResult` | `getScatterplot(AbstractScoreBasedClassifier cl1, AbstractScoreBasedClassifier cl2, Sample class0, Sample 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, Sample class0, Sample 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, Sample class0, Sample 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.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### plotScores

    public static ImageResult plotScores(AbstractScoreBasedClassifier cl,
                                         Sample class0,
                                         Sample class1,
                                         REnvironment e,
                                         int bins,
                                         double density,
                                         String plotOptions)
                                  throws Exception

  This method returns an `ImageResult` containing a plot of the histograms of the scores. Further plotting options can be used to make such results comparable.

  Parameters:
    `cl` - the classifier
    `class0` - the sample for class 0
    `class1` - the sample for class 1
    `e` - the R environment
    `bins` - the number of bins in the plot
    `density` - the density of shading
    `plotOptions` - further plot options, e.g. `xlim=c(-20,20), xlab="score"`, if `null` the default plotting options are chosen
  Returns:
    the plot of the histograms
  Throws:
    `Exception` - if something went wrong
  See Also:
    `ImageResult.ImageResult(String, String, java.awt.image.BufferedImage)`, `REnvironment.plot(String, double, double)`

### plotScores

    public static void plotScores(AbstractScoreBasedClassifier cl,
                                  Sample class0,
                                  Sample class1,
                                  REnvironment e,
                                  int bins,
                                  double density,
                                  String plotOptions,
                                  String fName)
                           throws Exception

  This method creates a pdf containing a plot of the histograms of the scores. Further plotting options can be used to make such results comparable.

  Parameters:
    `cl` - the classifier
    `class0` - the sample for class 0
    `class1` - the sample for class 1
    `e` - the R environment
    `bins` - the number of bins in the plot
    `density` - the density of shading
    `plotOptions` - further plot options, e.g. `xlim=c(-20,20), xlab="score"`, if `null` the default plotting options are chosen
    `fName` - the file name
  Throws:
    `Exception` - if something went wrong
  See Also:
    `REnvironment.plotToPDF(String, double, double, String, boolean)`

### getScatterplot

    public static ImageResult getScatterplot(AbstractScoreBasedClassifier cl1,
                                             AbstractScoreBasedClassifier cl2,
                                             Sample class0,
                                             Sample class1,
                                             REnvironment e,
                                             boolean drawThreshold)
                                      throws Exception

  This method returns an `ImageResult` containing a scatter plot of the scores for the given classifiers `cl1` and `cl2`.

  Parameters:
    `cl1` - the first classifier
    `cl2` - the second classifier
    `class0` - the sample for class 0
    `class1` - the sample for class 1
    `e` - an R environment
    `drawThreshold` - indicates whether to draw the classification threshold or not
  Returns:
    the scatter plot of the scores
  Throws:
    `Exception` - if something went wrong
  See Also:
    `ImageResult.ImageResult(String, String, java.awt.image.BufferedImage)`, `REnvironment.plot(String, double, double)`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD