Category: Data Warehouse & mining

Data Warehouse & mining program in java

k-means Clustering program in java

k-means Clustering program in java

import java.io. * ; import java.util. * ; class cluster { public static void main(String args[]) throws IOException { DataInputStream in =new DataInputStream(System. in ); float m1, m2, q = 0.0f, w = 0.0f;...

hierarchical clustering program in java

hierarchical clustering program in java

import java.io.*; import java.lang.*; class hclustering { public static void main(String args[])throws IOException { int n,temp; String temp1; DataInputStream in=new DataInputStream(System.in); System.out.println("Enter no of elements"); n=Integer.parseInt(in.readLine()); String clust1[]=new String[n]; int clust2[]=new int[n]; System.out.println("Enter elements");...

k-nearest neighbor program in java

k-nearest neighbor program in java

import java.util.Scanner; class KNN { public static void main(String args[]) { Scanner sc=new Scanner(System.in); int n,x1_qi,x2_qi; System.out.print("Enter no of records in training data set : "); n=sc.nextInt(); int x1[] = new int[n]; int x2[]...