Search code examples
data-miningelki

How to use DimensionSelectingLatLngDistanceFunction in ELKI


Does anyone know how I am supposed to use the DimensionSelectingLatLngDistanceFunction in ELKI?

When try to use it I get Constraint: distance.latitudedim >= 0.

but what is -distance.latitudedim exactly? Does it let me specify meters instead of degrees maybe? But how do I do that? When I look in the code I can see it's an integer..


Solution

  • ELKI parameters have a documentation. You can find it in command line help (using -help or -description <classname>), or in the tooltips of the MiniGUI. I have to gree that the MiniGUI could make this easier accessible, but I'm not very good at UI design, and the UI is completely generic, generated programmatically from the available parameters.

    The following is the output of command line ELKI,

    java -jar elki.jar KDDCLIApplication -description
    de.lmu.ifi.dbs.elki.distance.distancefunction.geo.DimensionSelectingLatLngDistanceFunction
    

    which yields the parameter explanation:

    Description for class
    de.lmu.ifi.dbs.elki.distance.distancefunction.geo.DimensionSelectingLatLngDistanceFunction
    DimensionSelectingLatLngDistanceFunction
    -distance.latitudedim <int>
        The dimension containing the latitude.
        Constraint: distance.latitudedim >= 0.
    -distance.longitudedim <int>
        The dimension containing the longitude.
        Constraint: distance.longitudedim >= 0.
    -geo.model <class|object>
        Earth model to use for projection. Default: spherical model.
        Implementing de.lmu.ifi.dbs.elki.math.geodesy.EarthModel
        Known classes (default package de.lmu.ifi.dbs.elki.math.geodesy):
        -> SphericalHaversineEarthModel
        -> SphericalVincentyEarthModel
        -> SphericalCosineEarthModel
        -> WGS84SpheroidEarthModel
        -> GRS80SpheroidEarthModel
        -> WGS72SpheroidEarthModel
        -> GRS67SpheroidEarthModel
        -> Clarke1880SpheroidEarthModel
        -> Clarke1858SpheroidEarthModel
        Default: SphericalVincentyEarthModel
    

    The short explanation is: it's te attribute numbers (starting at 0, integer, and non-negative) containing the latitude and longitude within each vector. So if your CSV file has columns

    shoe-size latitude random-number longitude weight
    

    then you'd use -distance.latitudedim 1 -distance.longitudedim 3.