如何使用java获取weka中最近的邻居

编程入门 行业动态 更新时间:2024-10-15 12:35:26
本文介绍了如何使用java获取weka中最近的邻居的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我一直在尝试使用与weka机器学习库一起使用的Ibk最近邻算法。

I've been trying to use the Ibk nearest neighbor algorithm that goes together with the weka machine learning library.

我知道如何对实例进行分类,但我想要实现协同过滤功能,所以我需要实际获取最接近感兴趣对象的实际对象列表。

I know how to classify instances, but I want to implement the collaborative filtering feature so I need to actually get the list of actual objects that are nearest to the object of interest.

我将如何在weka中实际执行此操作它的Java API?

How would I actually do so in weka using its java API?

推荐答案

这个怎么样

weka.core.neighboursearch.LinearNNSearch knn = new LinearNNSearch( trainingInstances); //do other stuff Instances nearestInstances= knn.kNearestNeighbours(target, 3)

以下是 API文档你可以参考。

更多推荐

如何使用java获取weka中最近的邻居

本文发布于:2023-10-24 20:21:10,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1524912.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:如何使用   邻居   java   weka

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!