Hi I modified my K mean clustering Algorithm to use the haversian formula for lognitude and latitude instead of euclidean distance . i modified the euclidean distance file in the core folder. here is what i did.
public static double distance(double lat1, double lon1, double lat2, double lon2) { double dLat = Math.toRadians(lat2 - lat1); double dLon = Math.toRadians(lon2 - lon1); lat1 = Math.toRadians(lat1); lat2 = Math.toRadians(lat2);
double a = Math.sin(dLat / 2) * Math.sin(dLat / 2) + Math.sin(dLon / 2) * Math.sin(dLon / 2) * Math.cos(lat1) * Math.cos(lat2);
double c = 2 * Math.asin(Math.sqrt(a));
return R * c;
}
after that i imported opened the weka-src.jar after extracted it in Netbeans and Cleaned and Built the File
It created all the class files in the folder. and i made a weka.jar file using command prompt but then i replaced the original weka.jar file in the weka installation folder and weka doesn't work anymore.
Any idea what's the problem.
i am also trying ANT to create weka.jar ..
Thanks