Sunday, 16 June 2019

Implement the Decimal Scaling Normalization technique. The data for tuples are (in increasing order) 13, 15, 16, 16, 19, 20, 20, 21, 22, 22, 25, 25, 25, 25, 30, 33, 33, 35, 35, 35, 35, 36, 40, 45, 46, 52, 70. Normalize any one of above age values. Data Mining and Business Intelligence GTU 2170715



 Code :

import java.io.*;
import java.util.*;

public class Practical9
{
        public static void main(String args[])
        {
                int n,i,j=1;
                double sum=0,age,norm;
                double temp;
                double[] data=new double[100];

                Scanner sc=new Scanner(System.in);
                System.out.println("Enter The No. Of Data Tuples : ");
                n=Integer.parseInt(sc.nextLine());
                System.out.println("Enter The Data For Age : ");

                for(i=0;i<n;i++)
                {
                        data[i]=Double.parseDouble(sc.nextLine());
                }

                System.out.println("Enter Age Value To Normalize : ");
                age=Double.parseDouble(sc.nextLine());
                temp=Math.pow(10,j);

                while(data[n-1]>temp)
                {
                        j++;
                        temp=Math.pow(10,j);
                }

                norm=age/temp;
                System.out.println("Normalization By Decimal Scaling : "+norm);
        }
}

1 comment:

It's time To increase blogging capability. To have a chance to contribute in digital world. Any Interested People who want to make t...