@Reference(authors="Erich Achtert, Ahmed Hettab, Hans-Peter Kriegel, Erich Schubert, Arthur Zimek", title="Spatial Outlier Detection: Data, Algorithms, Visualizations", booktitle="Proc. 12th Int. Symp. Spatial and Temporal Databases (SSTD 2011)", url="https://doi.org/10.1007/978-3-642-22922-0_41", bibkey="DBLP:conf/ssd/AchtertHKSZ11") public class KMLOutputHandler extends java.lang.Object implements ResultHandler
Reference:
 Erich Achtert, Ahmed Hettab, Hans-Peter Kriegel, Erich Schubert, Arthur
 Zimek
 Spatial Outlier Detection: Data, Algorithms, Visualizations
 Proc. 12th Int. Symp. Spatial and Temporal Databases (SSTD 2011)
 
Note: This class - currently - is an ugly hack. This code needs to be modularized to make it more reusable, to support multiple results and different result types.
| Modifier and Type | Class and Description | 
|---|---|
| static class  | KMLOutputHandler.ParameterizerParameterization class | 
| Modifier and Type | Field and Description | 
|---|---|
| private boolean | autoopenAutomatically open at the end | 
| private boolean | compatCompatibility mode. | 
| (package private) java.io.File | filenameOutput file name | 
| private static Logging | LOGLogger class to use. | 
| private static int | NUMSTYLESNumber of styles to use (lower reduces rendering complexity a bit) | 
| (package private) OutlierScaling | scalingScaling function | 
| Constructor and Description | 
|---|
| KMLOutputHandler(java.io.File filename,
                OutlierScaling scaling,
                boolean compat,
                boolean autoopen)Constructor. | 
| Modifier and Type | Method and Description | 
|---|---|
| private DoubleObjPair<Polygon> | buildHullsRecursively(Cluster<Model> clu,
                     Hierarchy<Cluster<Model>> hier,
                     java.util.Map<java.lang.Object,DoubleObjPair<Polygon>> hulls,
                     Relation<? extends NumberVector> coords)Recursively step through the clusters to build the hulls. | 
| static java.awt.Color | getColorForValue(double val)Get color from a simple heatmap. | 
| private java.lang.StringBuilder | makeDescription(Cluster<?> c)Make an HTML description. | 
| private java.lang.StringBuilder | makeDescription(java.util.Collection<Relation<?>> relations,
               DBIDRef id)Make an HTML description. | 
| void | processNewResult(ResultHierarchy hier,
                Result newResult)Process a result. | 
| private void | writeClusteringResult(javax.xml.stream.XMLStreamWriter xmlw,
                     Clustering<Model> clustering,
                     Database database) | 
| private void | writeNewlineOnDebug(javax.xml.stream.XMLStreamWriter out)Print a newline when debugging. | 
| private void | writeOutlierResult(javax.xml.stream.XMLStreamWriter xmlw,
                  OutlierResult outlierResult,
                  Database database) | 
private static final Logging LOG
private static final int NUMSTYLES
java.io.File filename
OutlierScaling scaling
private boolean compat
private boolean autoopen
public KMLOutputHandler(java.io.File filename,
                        OutlierScaling scaling,
                        boolean compat,
                        boolean autoopen)
filename - Output filenamescaling - Scaling functioncompat - Compatibility modeautoopen - Automatically openpublic void processNewResult(ResultHierarchy hier, Result newResult)
ResultProcessorprocessNewResult in interface ResultProcessorhier - The base of the result tree.newResult - Newly added result subtree.private void writeOutlierResult(javax.xml.stream.XMLStreamWriter xmlw,
                                OutlierResult outlierResult,
                                Database database)
                         throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionprivate void writeClusteringResult(javax.xml.stream.XMLStreamWriter xmlw,
                                   Clustering<Model> clustering,
                                   Database database)
                            throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamExceptionprivate DoubleObjPair<Polygon> buildHullsRecursively(Cluster<Model> clu, Hierarchy<Cluster<Model>> hier, java.util.Map<java.lang.Object,DoubleObjPair<Polygon>> hulls, Relation<? extends NumberVector> coords)
clu - Current clusterhier - Clustering hierarchyhulls - Hull mapprivate java.lang.StringBuilder makeDescription(java.util.Collection<Relation<?>> relations, DBIDRef id)
relations - Relationsid - Object IDprivate java.lang.StringBuilder makeDescription(Cluster<?> c)
c - Clusterprivate void writeNewlineOnDebug(javax.xml.stream.XMLStreamWriter out)
                          throws javax.xml.stream.XMLStreamException
out - Output XML streamjavax.xml.stream.XMLStreamExceptionpublic static final java.awt.Color getColorForValue(double val)
val - Score valueCopyright © 2019 ELKI Development Team. License information.