Id No Inst Time Status Ag e Se X Ph. Ecog Ph. Karno Pat. Karno Meal - Cal WT - Loss
Id No Inst Time Status Ag e Se X Ph. Ecog Ph. Karno Pat. Karno Meal - Cal WT - Loss
2. Suppose that the data for analysis include the attribute age. The age values
for the data 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
Smooth the data using following methods using a bin depth of 3
(a) smoothing by bin means (3)
(b) smoothing by bin medians (3)
(c) smoothing by bin boundaries (4)
3. In the following real-world data, tuples with missing values for some
attributes are a common occurrence. Fill the missing values with
appropriate method and justify why you have chosen that method. (10 M)
meal
Id ag se ph. ph. pat. .
no Inst time status e x Ecog karno karno Cal wt.loss
1 3 306 2 74 1 1 90 100 1175
2 3 455 2 68 1 0 90 90 1225 15
3 3 1 56 1 0 90 90 15
4 5 210 57 1 1 90 60 1150 11
5 1 883 2 60 1 0 90 0
102
6 12 2 1 1 1 50 80 513 0
7 7 310 2 68 2 2 70 60 384 10
8 11 2 71 2 2 60 80 1
9 1 218 2 53 1 1 70 80 825 16
10 7 166 2 61 2 70 271 34
4. Write a program in R to print a square pattern with # character.
Sample Output:
Print a pattern like square with # character:
Input the number of characters for a side: 4
#
##
###
####