java 调用weka算法,如何在java代码中使用weka.smote smapling算法?

博主在尝试独立实现SMOTE过采样算法并结合交叉验证进行数据分析时遇到困难。他们下载了Weka的Java库文件,但缺乏足够的Java编程经验来创建和运行所需的类。尽管找到了一些代码示例,但仍然无法编写简单的Java主函数来运行SMOTE。博客作者寻求帮助,希望有人能指导如何在Java中正确使用SMOTE和交叉验证类。
摘要由CSDN通过智能技术生成

I have a question about the correct way to use the SMOTE sampling algorithm. I have been read a lot about this algorithm. I forced to use SMOTE within my code, so I can't use any tools like KNIME or WEKA. After few days in searching, I can say that there are two implementation of SMOTE, one in R language and other included in weka java library. I have downloaded the weka.dev.jar file and weka.core.jar file and used them in my code. Unfortunately I'm not expert enough in Java. Can anyone help me. I just need to use SMOTE with crossvalidation. and both SMOTE and crossvalidation are java clasess. But I failed to write a simple java class that create objects from these classes. The reaseon is that theses classes need another objects from other classes.

any help will be appreciated

What I have tried:

I have checked codes in this link

Java Code Examples[^]

but I can't figured out how to write a simple java class with just

public static void main() function that can use SMOTE class.

解决方案

If you got your sample code from a different site, then the first place to start is by asking there: finding an unrelated site and asking them to sort out your homework for you isn't a good idea ... we have no idea what the code on the end of that link is and personally, I don't visit random sites on strangers say-so.

We aren't here to do your homework for you: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!

If you meet a specific problem, then please ask about that and we will do our best to help. But we aren't going to do it all for you!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值