You are on page 1of 4

LAB FORMATIVE-1

Name: ID
Course Section

Load the excel file and answer the following questions

 How many instances are listed in the dataset? How many attributes? What’s the attributes
names? What type of attributes are these? which one is the class?

Instances: 5
Attributes: 7
Type: Nominal
Class : Reg 1 , Reg10 , Reg13
 Apply proper preprocessing tasks and remove the instances from 2 to 4.

 Add a Numeric attribute price at the end and give values.W

double term = f[i].y;

for (int j = 0; j < n; j++)

if (j != i)

term = term*(xi - f[j].x) / (f[i].x - f[j].x);

// Add current term to result

result += term;
 Add a Nominal attribute status set labels ok and not ok then give values.

 creating an array of 4 known data points


Data f[] = {new Data(0, 2), new Data(1, 3),
new Data(2, 12), new Data(5, 147)};

 Replace all missing Nominal attributes with “x” and Numeric attributes with 200.

a data point corresponding to x=3

System.out.print("Value of f(3) is : " +

(int)interpolate(f, 3, 4

 Replace the value of the nominal attribute colour with the following data: white becomes
W and Black becomes B
 Replace the data of status with the following:ok->yes and not ok->no

You might also like