Click here to Skip to main content
15,886,046 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
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
<pre lang="java">
public static void main() function that can use SMOTE class.
Posted
Updated 23-Feb-18 23:04pm

1 solution

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!
 
Share this answer
 
Comments
HusseinAl-haj 24-Feb-18 6:15am    
@OriginalGriff please, I asked for help not for advise
OriginalGriff 24-Feb-18 6:20am    
And as I said, you need to start with the site you got the code from.
They will know their code and its prerequisites a whole load better than we will.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900