ELKI找不到类gnu / trove / impl / hash / TObjectHash

时间:2016-01-21 01:27:39

标签: java classloader elki

我有一个数据集,包含大约10000个具有两个特征的样本。我想使用ELKI来运行LSDBC算法并对我的数据集进行聚类。但是,我还没能让ELKI工作。在运行elki-0.7.0.jar并将我想要的设置输入gui之后,无论我选择什么设置,我都会在gui底部的控制台输入中获得大量错误消息(我还没有能够输入我想要的所有设置)。这对我来说表明我错过了一些依赖,错过了一些安装步骤,或者某种程度上没有正确使用该软件。

不幸的是,似乎没有关于ELKI的大量文档,但它也是我能够找到的LSDBC的唯一实现之一。我正在寻找的是一步一步,ELI5,在我的数据集(在WEKA创建的arff文件中)安装和运行该算法的指令,并将结果输出为csv文件;即一个输出文件,指示每个样本的簇分配。我还希望能够对最佳k和alpha值执行网格搜索(也就是说,运行几个k和alpha值的算法并保存每个结果;之后我将确定最佳值)。我使用的是Mac OS X Yosemite。

我觉得这应该是一项相对简单的任务,但我未能取得任何进展。我已经复制了我在下面的错误流

gnu/trove/impl/hash/TObjectHash
java.lang.NoClassDefFoundError: gnu/trove/impl/hash/TObjectHash
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.<init>(NumberVectorLabelParser.java:127)
    at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser$Parameterizer.makeInstance(NumberVectorLabelParser.java:419)
    at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser$Parameterizer.makeInstance(NumberVectorLabelParser.java:355)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:120)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ClassParameter.instantiateClass(ClassParameter.java:234)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter.instantiateClass(ObjectParameter.java:152)
    at de.lmu.ifi.dbs.elki.datasource.AbstractDatabaseConnection$Parameterizer.configParser(AbstractDatabaseConnection.java:184)
    at de.lmu.ifi.dbs.elki.datasource.InputStreamDatabaseConnection$Parameterizer.makeOptions(InputStreamDatabaseConnection.java:136)
    at de.lmu.ifi.dbs.elki.datasource.FileBasedDatabaseConnection$Parameterizer.makeOptions(FileBasedDatabaseConnection.java:123)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ClassParameter.instantiateClass(ClassParameter.java:234)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter.instantiateClass(ObjectParameter.java:152)
    at de.lmu.ifi.dbs.elki.database.StaticArrayDatabase$Parameterizer.makeOptions(StaticArrayDatabase.java:210)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ClassParameter.instantiateClass(ClassParameter.java:234)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter.instantiateClass(ObjectParameter.java:152)
    at de.lmu.ifi.dbs.elki.workflow.InputStep$Parameterizer.makeOptions(InputStep.java:94)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.TrackParameters.tryInstantiate(TrackParameters.java:213)
    at de.lmu.ifi.dbs.elki.KDDTask$Parameterizer.makeOptions(KDDTask.java:156)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.TrackParameters.tryInstantiate(TrackParameters.java:213)
    at de.lmu.ifi.dbs.elki.application.KDDCLIApplication$Parameterizer.makeOptions(KDDCLIApplication.java:79)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.TrackParameters.tryInstantiate(TrackParameters.java:213)
    at de.lmu.ifi.dbs.elki.gui.minigui.MiniGUI.doSetParameters(MiniGUI.java:372)
    at de.lmu.ifi.dbs.elki.gui.minigui.MiniGUI.updateParameterTable(MiniGUI.java:359)
    at de.lmu.ifi.dbs.elki.gui.minigui.MiniGUI$5.tableChanged(MiniGUI.java:277)
    at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:296)
    at javax.swing.table.AbstractTableModel.fireTableCellUpdated(AbstractTableModel.java:275)
    at de.lmu.ifi.dbs.elki.gui.util.ParametersModel.setValueAt(ParametersModel.java:130)
    at javax.swing.JTable.setValueAt(JTable.java:2741)
    at javax.swing.JTable.editingStopped(JTable.java:4723)
    at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:141)
    at javax.swing.AbstractCellEditor.stopCellEditing(AbstractCellEditor.java:85)
    at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:1010)
    at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(BasicTableUI.java:798)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
    at java.awt.Component.processMouseEvent(Component.java:6532)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6300)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4891)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4522)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at [...]
Caused by: java.lang.ClassNotFoundException: gnu.trove.impl.hash.TObjectHash
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:760)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142)
    at java.net.URLClassLoader.defineClass(URLClassLoader.java:467)
    at java.net.URLClassLoader.access$100(URLClassLoader.java:73)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:368)
    at java.net.URLClassLoader$1.run(URLClassLoader.java:362)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:361)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser.<init>(NumberVectorLabelParser.java:127)
    at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser$Parameterizer.makeInstance(NumberVectorLabelParser.java:419)
    at de.lmu.ifi.dbs.elki.datasource.parser.NumberVectorLabelParser$Parameterizer.makeInstance(NumberVectorLabelParser.java:355)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:120)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ClassParameter.instantiateClass(ClassParameter.java:234)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter.instantiateClass(ObjectParameter.java:152)
    at de.lmu.ifi.dbs.elki.datasource.AbstractDatabaseConnection$Parameterizer.configParser(AbstractDatabaseConnection.java:184)
    at de.lmu.ifi.dbs.elki.datasource.InputStreamDatabaseConnection$Parameterizer.makeOptions(InputStreamDatabaseConnection.java:136)
    at de.lmu.ifi.dbs.elki.datasource.FileBasedDatabaseConnection$Parameterizer.makeOptions(FileBasedDatabaseConnection.java:123)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ClassParameter.instantiateClass(ClassParameter.java:234)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter.instantiateClass(ObjectParameter.java:152)
    at de.lmu.ifi.dbs.elki.database.StaticArrayDatabase$Parameterizer.makeOptions(StaticArrayDatabase.java:210)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ClassParameter.instantiateClass(ClassParameter.java:234)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameters.ObjectParameter.instantiateClass(ObjectParameter.java:152)
    at de.lmu.ifi.dbs.elki.workflow.InputStep$Parameterizer.makeOptions(InputStep.java:94)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.TrackParameters.tryInstantiate(TrackParameters.java:213)
    at de.lmu.ifi.dbs.elki.KDDTask$Parameterizer.makeOptions(KDDTask.java:156)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.TrackParameters.tryInstantiate(TrackParameters.java:213)
    at de.lmu.ifi.dbs.elki.application.KDDCLIApplication$Parameterizer.makeOptions(KDDCLIApplication.java:79)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.AbstractParameterizer.make(AbstractParameterizer.java:116)
    at de.lmu.ifi.dbs.elki.utilities.ClassGenericsUtil.tryInstantiate(ClassGenericsUtil.java:252)
    at de.lmu.ifi.dbs.elki.utilities.optionhandling.parameterization.TrackParameters.tryInstantiate(TrackParameters.java:213)
    at de.lmu.ifi.dbs.elki.gui.minigui.MiniGUI.doSetParameters(MiniGUI.java:372)
    at de.lmu.ifi.dbs.elki.gui.minigui.MiniGUI.updateParameterTable(MiniGUI.java:359)
    at de.lmu.ifi.dbs.elki.gui.minigui.MiniGUI$5.tableChanged(MiniGUI.java:277)
    at javax.swing.table.AbstractTableModel.fireTableChanged(AbstractTableModel.java:296)
    at javax.swing.table.AbstractTableModel.fireTableCellUpdated(AbstractTableModel.java:275)
    at de.lmu.ifi.dbs.elki.gui.util.ParametersModel.setValueAt(ParametersModel.java:130)
    at javax.swing.JTable.setValueAt(JTable.java:2741)
    at javax.swing.JTable.editingStopped(JTable.java:4723)
    at javax.swing.AbstractCellEditor.fireEditingStopped(AbstractCellEditor.java:141)
    at javax.swing.AbstractCellEditor.stopCellEditing(AbstractCellEditor.java:85)
    at javax.swing.plaf.basic.BasicTableUI$Handler.mousePressed(BasicTableUI.java:1010)
    at javax.swing.plaf.basic.BasicTableUI$MouseInputHandler.mousePressed(BasicTableUI.java:798)
    at java.awt.AWTEventMulticaster.mousePressed(AWTEventMulticaster.java:280)
    at java.awt.Component.processMouseEvent(Component.java:6532)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3324)
    at java.awt.Component.processEvent(Component.java:6300)
    at java.awt.Container.processEvent(Container.java:2236)
    at java.awt.Component.dispatchEventImpl(Component.java:4891)
    at java.awt.Container.dispatchEventImpl(Container.java:2294)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4888)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4522)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4466)
    at java.awt.Container.dispatchEventImpl(Container.java:2280)
    at java.awt.Window.dispatchEventImpl(Window.java:2750)
    at java.awt.Component.dispatchEvent(Component.java:4713)
    at [...]

2 个答案:

答案 0 :(得分:0)

实际上,JavaDoc和Wiki中有很多文档。

您的错误是非常基本的Java使用,与ELKI无关。

你可以告诉(或google)找不到类名

gnu/trove/impl/hash/TObjectHash
java.lang.NoClassDefFoundError: gnu/trove/impl/hash/TObjectHash

您缺少 GNU Trove Java库(ELKI的依赖项,但不是ELKI的一部分)。也许您没有下载完整(单jar)版本,而只下载了最小的下载(假设您单独管理依赖项,或者已经使用它们,例如使用流行的Maven工具)。 / p>

答案 1 :(得分:0)

新的ELKI 0.7.1版本

  • 包含一个自述文件,告诉您使用elki.batelki.sh启动。
  • 会显示一个更容易理解的警告,告诉您类路径不完整。

尽管如此,ELKI的观众是知道如何阅读堆栈跟踪的开发人员