0% found this document useful (0 votes)
14 views4 pages

Data Analytics Assignment Questions

The document outlines a series of data analytics assignment questions covering various techniques such as Naive Bayes classification, K-means clustering, Gini index calculation, decision tree construction, hierarchical clustering, neural networks, and linear regression. Each question requires the application of specific algorithms or methods to analyze datasets and draw conclusions. The tasks involve both theoretical explanations and practical computations to demonstrate understanding of data analytics concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
14 views4 pages

Data Analytics Assignment Questions

The document outlines a series of data analytics assignment questions covering various techniques such as Naive Bayes classification, K-means clustering, Gini index calculation, decision tree construction, hierarchical clustering, neural networks, and linear regression. Each question requires the application of specific algorithms or methods to analyze datasets and draw conclusions. The tasks involve both theoretical explanations and practical computations to demonstrate understanding of data analytics concepts.
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

‭Data Analytics: Assignment Questions‬

‭1.‬‭A‬‭vehicle‬‭manufacturing‬‭company‬‭is‬‭analyzing‬‭its‬‭stolen‬‭vehicle‬‭dataset‬‭to‬‭predict‬‭whether‬‭a‬‭new‬‭vehicle‬
‭is‬ ‭likely‬ ‭to‬ ‭be‬ ‭stolen‬ ‭based‬ ‭on‬ ‭certain‬ ‭attributes.‬ ‭The‬ ‭following‬ ‭table‬ ‭presents‬ ‭historical‬ ‭data‬ ‭about‬
‭vehicles,‬ ‭including‬ ‭their‬ ‭color‬ ‭,‬ ‭type,‬ ‭origin,‬ ‭and‬ ‭whether‬ ‭they‬ ‭were‬ ‭stolen.‬ ‭Using‬ ‭Naive‬ ‭Bayes‬
‭classification,‬‭classify the new data {Color: Red, Type: SUV, Origin:Domestic}.‬

‭Color‬ ‭Type‬ ‭Origin‬ ‭ tole‬


S
‭n‬

‭Red‬ ‭Sports‬ ‭Domestic‬ ‭Yes‬

‭Red‬ ‭Sports‬ ‭Domestic‬ ‭No‬

‭Red‬ ‭Sports‬ ‭Domestic‬ ‭Yes‬

‭Yellow‬ ‭Sports‬ ‭Domestic‬ ‭No‬

‭Yellow‬ ‭Sports‬ ‭Imported‬ ‭Yes‬

‭Yellow‬ ‭SUV‬ ‭Imported‬ ‭No‬

‭Yellow‬ ‭SUV‬ ‭Imported‬ ‭Yes‬

‭Yellow‬ ‭SUV‬ ‭Domestic‬ ‭No‬

‭Red‬ ‭SUV‬ ‭Imported‬ ‭No‬

‭Red‬ ‭Sports‬ ‭Imported‬ ‭Yes‬

‭2.‬‭Consider the dataset of 10 data points in a two-dimensional space, as represented below:‬

‭Point‬ ‭X- coordinate‬ ‭ -‬


Y
‭coordinate‬

‭P1‬ ‭1‬ ‭4‬

‭P2‬ ‭5‬ ‭1‬

‭P3‬ ‭5‬ ‭2‬

‭P4‬ ‭5‬ ‭4‬

‭P5‬ ‭10‬ ‭4‬

‭P6‬ ‭25‬ ‭4‬

‭P7‬ ‭25‬ ‭6‬

‭P8‬ ‭25‬ ‭7‬

‭P9‬ ‭25‬ ‭8‬

‭P10‬ ‭29‬ ‭7‬

‭Apply K-means to cluster the data assuming K=2. Use Manhattan distance.‬
‭3.‬‭Comment on following‬
‭a) “Sampling algorithm (variation of Apriori) uses NB( ) function to generate optimal association rules,‬
‭Justify.‬
‭b) “Confidence and Support may not be sufficient in few cases to generate optimal rules” Additional‬
‭parameter may be required, Explain‬
‭c) “CLARA and CLARANS are variations of K-Means/PAM” Discuss.‬
‭d) “Consider C4.5, Why do we use gain ratio in place of simple gain measure?” Justify‬

‭ .‬‭Consider the following dataset, where we want to decide whether the customer is likely to buy a computer or‬
4
‭not for 14 records:‬

‭Age‬ ‭Income‬ ‭Studen‬ ‭Credit‬ ‭Buys‬


‭t‬ ‭ ating‬
R ‭Computer‬

‭Youth‬ ‭High‬ ‭No‬ ‭Fair‬ ‭No‬

‭Youth‬ ‭High‬ ‭No‬ ‭Excellent‬ ‭No‬

‭Middle-aged‬ ‭High‬ ‭No‬ ‭Fair‬ ‭Yes‬

‭Senior‬ ‭Medium‬ ‭No‬ ‭Fair‬ ‭Yes‬

‭Senior‬ ‭Low‬ ‭Yes‬ ‭Fair‬ ‭Yes‬

‭Senior‬ ‭Low‬ ‭Yes‬ ‭Excellent‬ ‭No‬

‭Middle-aged‬ ‭Low‬ ‭Yes‬ ‭Excellent‬ ‭Yes‬

‭Youth‬ ‭Medium‬ ‭No‬ ‭Fair‬ ‭No‬

‭Youth‬ ‭Low‬ ‭Yes‬ ‭Fair‬ ‭Yes‬

‭Senior‬ ‭Medium‬ ‭Yes‬ ‭Fair‬ ‭Yes‬

‭Youth‬ ‭Medium‬ ‭Yes‬ ‭Excellent‬ ‭Yes‬


‭Middle-a‬ ‭Medium‬ ‭No‬ ‭Excellent‬ ‭Yes‬
‭ged‬ ‭High‬ ‭Yes‬ ‭Fair‬ ‭Yes‬
‭Middle-a‬
‭ged‬

‭Senior Medium No Excellent No‬

‭●‬‭Calculate the Gini index (CART) for the given dataset considering the target variable‬
‭buys_computer.‬

‭●‬ ‭Among‬ ‭the‬ ‭attributes‬ ‭age,‬ ‭income,‬ ‭student,‬ ‭and‬ ‭credit_rating,‬ ‭calculate‬ ‭the‬ ‭Gini‬ ‭index‬ ‭for‬ ‭each‬
‭possible‬ ‭split‬ ‭and‬ ‭select‬ ‭the‬ ‭best‬ ‭attribute‬ ‭for‬ ‭the‬ ‭root‬ ‭node‬ ‭of‬ ‭the‬ ‭decision‬ ‭[Link]‬ ‭all‬ ‭the‬
‭splits you considered and their corresponding Gini [Link] your selection of the root split.‬
‭●‬‭Construct‬‭the‬‭full‬‭decision‬‭tree‬‭by‬‭first‬‭selecting‬‭the‬‭best‬‭root‬‭split‬‭based‬‭on‬‭the‬‭Gini‬‭index,‬‭then‬‭continue‬
‭recursively‬‭splitting‬‭the‬‭data‬‭at‬‭each‬‭node‬‭until‬‭each‬‭leaf‬‭node‬‭contains‬‭only‬‭a‬‭single‬‭class‬‭(either‬‭"Yes"‬
‭or‬‭"No")‬‭.‬‭At‬‭each‬‭stage,‬‭list‬‭all‬‭the‬‭possible‬‭splits‬‭considered‬‭along‬‭with‬‭their‬‭respective‬‭Gini‬‭indices‬‭and‬
a‭ ssign‬ ‭the‬ ‭corresponding‬ ‭class‬ ‭("Yes"‬ ‭or‬ ‭"No")‬ ‭to‬ ‭each‬ ‭leaf‬ ‭node‬ ‭based‬ ‭on‬ ‭the‬ ‭majority‬ ‭class‬ ‭of‬ ‭the‬
‭records in that leaf‬‭.‬
‭●‬‭Use the final tree to classify the record‬‭(youth, low, no, excellent).‬

‭ .‬ ‭Perform‬ ‭hierarchical‬ ‭clustering‬ ‭using‬ ‭the‬ ‭agglomerative‬ ‭approach‬ ‭with‬‭the‬‭Complete‬‭and‬‭Average‬‭Linkage‬


5
‭method‬‭for‬‭the‬‭given‬‭distance‬‭matrix‬‭of‬‭five‬‭data‬‭points‬‭(A,‬‭B,‬‭C,‬‭D,‬‭E).‬‭Compute‬‭all‬‭intermediate‬‭steps,‬‭showing‬
‭the formation of clusters at each stage, and construct a clear and labelled dendrogram to represent the clustering‬
‭process.‬

‭A‬ ‭B‬ ‭C‬ ‭D‬ ‭E‬

‭A‬ ‭0‬ ‭1‬ ‭2‬ ‭5‬ ‭3‬

‭B‬ ‭1‬ ‭0‬ ‭2‬ ‭3‬ ‭4‬

‭C‬ ‭2‬ ‭2‬ ‭0‬ ‭3‬ ‭6‬

‭D‬ ‭5‬ ‭3‬ ‭3‬ ‭0‬ ‭6‬

‭E‬ ‭3‬ ‭4‬ ‭6‬ ‭6‬ ‭0‬

‭6.‬‭Consider a simple feedforward neural network with‬‭the following parameters:‬

(‭ Input:‬ ‭x1=0.05‬ ‭and‬‭x2=0.10),‬‭(Weights:‬‭w1=‬‭0.15,‬‭w2=0.20,‬‭w3=0.25,‬‭w4=0.30,‬‭w5=0.40,‬‭w6=0.45,‬‭w7=0.50,‬


‭and‬ ‭w8=0.55),‬ ‭(Biases:‬ ‭b1=0.35‬ ‭and‬ ‭b2=0.60),‬ ‭and‬ ‭(Target‬‭Values:‬‭T1=0.01‬‭and‬‭T2=0.99).‬‭Perform‬‭a‬‭forward‬
‭pass‬‭through‬‭the‬‭network‬‭using‬‭the‬‭sigmoid‬‭activation‬‭function‬‭,‬‭followed‬‭by‬‭a‬‭single‬‭backward‬‭pass‬‭using‬‭the‬
‭backpropagation‬ ‭algorithm‬ ‭to‬ ‭update‬ ‭the‬ ‭weights‬ ‭and‬ ‭biases,‬ ‭and‬ ‭then‬ ‭draw‬ ‭the‬ ‭neural‬ ‭network‬ ‭architecture‬
‭with the updated weights after the backward pass.‬
‭7.‬

‭8.‬

‭9.‬‭Find linear regression equation for the following‬‭two sets of data:‬


‭X‬ ‭2‬ ‭4‬ ‭6‬ ‭8‬
‭Y‬ ‭3‬ ‭7‬ ‭5‬ ‭10‬

‭ 0.‬‭Given the points A(3, 7), B(4, 6), C(5, 5), D(6, 4), E(7, 3), F(6, 2), G(7, 2) and H(8, 4), Find the core‬
1
‭points and outliers using DBSCAN. Take Eps = 2.5 and MinPts = 3.‬

You might also like