Package adams.data.conversion
-
Interface Summary Interface Description HeatmapToBufferedImageConversion Indicator interface for conversion that convert heatmaps into BufferedImage objects. -
Class Summary Class Description BufferedImageToHeatmap Turns a class java.awt.image.BufferedImage into a heatmap.
Simply uses the RGB value as heatmap value.ColumnCorrelationToHeatmap Computes the correlation coefficients between the specified range of columns and outputs a heatmap with the calculated values.ColumnCovarianceToHeatmap Computes the covariances between the specified range of columns and outputs a heatmap with the calculated values.EscapeLatexCharacters Turns the selected characters into their LaTeX representation.GPSDistance Computes the distance in meters between two GPS points.HeatmapToArray Turns a heatmap into a Double array.HeatmapToBufferedImage Turns a heatmap into a BufferedImage.HeatmapToBufferedImageExpression Turns a heatmap into a BufferedImage, using the provided expression for generating greyscale values (0-255).
The following grammar is used:
expr_list ::= '=' expr_list expr_part | expr_part ;
expr_part ::= expr ;
expr ::= ( expr )
# data types
| number
| string
| boolean
| date
# constants
| true
| false
| pi
| e
| now()
| today()
# negating numeric value
| -expr
# comparisons
| expr < expr
| expr <= expr
| expr > expr
| expr >= expr
| expr = expr
| expr != expr (or: expr <> expr)
# boolean operations
| ! expr (or: not expr)
| expr & expr (or: expr and expr)
| expr | expr (or: expr or expr)
| if[else] ( expr , expr (if true) , expr (if false) )
| ifmissing ( variable , expr (default value if variable is missing) )
| isNaN ( expr )
# arithmetics
| expr + expr
| expr - expr
| expr * expr
| expr / expr
| expr ^ expr (power of)
| expr % expr (modulo)
;
# numeric functions
| abs ( expr )
| sqrt ( expr )
| cbrt ( expr )
| log ( expr )
| log10 ( expr )
| exp ( expr )
| sin ( expr )
| sinh ( expr )
| cos ( expr )
| cosh ( expr )
| tan ( expr )
| tanh ( expr )
| atan ( expr )
| atan2 ( exprY , exprX )
| hypot ( exprX , exprY )
| signum ( expr )
| rint ( expr )
| floor ( expr )
| pow[er] ( expr , expr )
| ceil ( expr )
| min ( expr1 , expr2 )
| max ( expr1 , expr2 )
| year ( expr )
| month ( expr )
| day ( expr )
| hour ( expr )
| minute ( expr )
| second ( expr )
| weekday ( expr )
| weeknum ( expr )
# string functions
| substr ( expr , start [, end] )
| left ( expr , len )
| mid ( expr , start , len )
| right ( expr , len )
| rept ( expr , count )
| concatenate ( expr1 , expr2 [, expr3-5] )
| lower[case] ( expr )
| upper[case] ( expr )
| trim ( expr )
| matches ( expr , regexp )
| trim ( expr )
| len[gth] ( str )
| find ( search , expr [, pos] )
| replace ( str , pos , len , newstr )
| substitute ( str , find , replace [, occurrences] )
;
Notes:
- Variables are either all upper case letters (e.g., "ABC") or any character apart from "]" enclosed by "[" and "]" (e.g., "[Hello World]").
- 'start' and 'end' for function 'substr' are indices that start at 1.
- Index 'end' for function 'substr' is excluded (like Java's 'String.substring(int,int)' method)
- Line comments start with '#'.
- Semi-colons (';') or commas (',') can be used as separator in the formulas,
e.g., 'pow(2,2)' is equivalent to 'pow(2;2)'
- dates have to be of format 'yyyy-MM-dd' or 'yyyy-MM-dd HH:mm:ss'
- times have to be of format 'HH:mm:ss' or 'yyyy-MM-dd HH:mm:ss'
- the characters in square brackets in function names are optional:
e.g.HeatmapToBufferedImageWithKey Turns a heatmap into a BufferedImage, allows the generation of a key in the image.HeatmapToSpreadSheet Turns a heatmap into a spreadsheet object.HTMLToDOM Turns an HTML String into a org.w3c.dom.Document DOM object.HTMLToText Extracts the text from an HTML string.JsonToObject Maps the JSON string to the specified class using Jackson's Databind functionality (https://github.com/FasterXML/jackson-databind).LocalPathToContainerPath Converts a local path into a container one
MarkdownToHTML Converts Markdown to HTML.MOAInstancesToWEKAInstances Converts MOA instances into WEKA instances.ObjectToJson Turns the object into a JSON string using Jackson's ObjectMapper (https://github.com/FasterXML/jackson-databind).RandomizeArray Randomizes the order of the elements in the array.
The random number generator gets initialized every time with the given seed.RandomizeCollection Randomizes the order of the elements in the collection.
The random number generator gets initialized every time with the given seed.RenderHTMLAsText Renders an HTML string as text.RenjinDoubleArrayVectorToSpreadSheet Turns a double array vector matrix into a spreadsheet.RenjinListVectorToArray Converts an R list into an array.SpectrogramToBufferedImage Generates an image from the incoming spectrogram.SpreadSheetToHeatmap Turns an all-numeric spreadsheet into a heatmap.
Missing values/cells are tolerated and replaced with the specified value for missing values.SpreadSheetToHTML Turns a spreadsheet into an HTML table.SpreadSheetToKML Turns a spreadsheet into a KML (Keyhole Markup Language) XML data structure.
For more information see:
http://en.wikipedia.org/wiki/Keyhole_Markup_Language
TrailToSpreadSheet Turns a adams.data.trail.Trail object into a spreadsheet.WaveToAmplitudes Extracts the amplitudes from a Wave object.WaveToSpectrogram Generates a spectrogram from the incoming Wave container.WaveToWaveContainer Puts a Wave into a WaveContainer.WEKAInstancesToMOAInstances Converts WEKA instances into MOA instances. -
Enum Summary Enum Description EscapeLatexCharacters.Characters The characters to escape.GPSDistance.DistanceCalculationType How to calculate the distance.