-1

My aim is to use a machine learning library so that I can cluster points (Lat/Long) and (x, y). I want to use an API that allows me to easily switch between different clustering algorithms.

I started using Java-ML http://java-ml.sourceforge.net/content/clustering-basics and I'm able to get the tutorials working but I dont see how I can create an instance that geographic points. Do I have to extend net.sf.javaml.core.AbstractInstance to get this to work? There are only two instance types that can be created 'SparseInstance' and 'DenseInstance'.

I then found Elki and someone who has used it to cluster geo data Running DBSCAN in ELKI but I dont want to use a gui I just want to run the algorithms from a java class.

Any advice/ references is much appreciated.

Community
  • 1
  • 1
MTA
  • 739
  • 2
  • 9
  • 29
  • 1
    Where is your question? Just use ELKI from Java then. Nobody *forces* you to use the UI. It's just easier. – Has QUIT--Anony-Mousse Oct 23 '15 at 23:03
  • @Anony-Mousse is there an easy to understand Elki tutorial teaching how to use Elki without the gui? – MTA Oct 24 '15 at 10:57
  • 1
    There are tutorials and howtos on their wiki. But beware it grows fast and changes. Code examples that worked with 0.5 may not work with 0.6 anymore. But if you want to have the newest functionality you have to live with change... so far, I've been happy with every update. – Has QUIT--Anony-Mousse Oct 24 '15 at 11:12

2 Answers2

1

ELKI has documentation. Please look at the JavaDoc and the Wiki.

In particular:

do tell you how to use it from Java, and how to apply it to geographic data.

If you notice outdated parts of the documentation, you are welcome to send an email and help updating it to the latest version.

Erich Schubert
  • 8,575
  • 2
  • 26
  • 42
0

You could look at the unit tests in the ELKI source tree, e.g. at

http://elki.dbs.ifi.lmu.de/browser/elki/elki/src/test/java/de/lmu/ifi/dbs/elki/distance/distancefunction/SpatialPrimitiveDistanceFunctionTest.java

or

http://elki.dbs.ifi.lmu.de/browser/elki/elki/src/test/java/de/lmu/ifi/dbs/elki/algorithm/clustering/optics/TestOPTICSListResults.java

I can't tell what exactly you need to accomplish. In any case, maybe you'll find some suitable code examples in other subdirectores of the "src/test" dirtree. These could serve as a starting point.

Note that beyond tutorials I haven't used ELKI much either. Just saying that "Looking at the Unit Tests in Order to Understand Code" is a general strategy.

knb
  • 9,138
  • 4
  • 58
  • 85