Posts

DW&DM Lab Internal QP

  SET 1: a) Create a DataFrame using the data below. Identify X (independent variables) and y (dependent variable: Purchased). Fill the missing Age value with the mean and missing Salary value with the median. Student Age Salary Purchased S1 20 25000 No S2 22 30000 Yes S3 NaN 28000 No S4 24 NaN Yes S5 21 32000 Yes b) Create a DataFrame using the points below. Apply Agglomerative Clustering and plot a dendrogram. X 18 22 25 27 42 43 SET 2: a) Create a DataFrame using the below data points. Perform simple linear regression on a small dataset to predict a dependent variable (Y) from an independent variable (X). X (Study Hours) Y (Exam Marks) 1 50 2 55 3 60 4 65 5 70 b) Create a DataFrame using below data and perform Bisecting K-Means Clustering on this dataset and form 2 clusters. Point X Y P1 1 1 P2 2 1 P3 4 3 P4 5 4 P5 8 8 SET 3: a) Jaccard similarity and Manhattan distance: Create two binary vectors A = [1, 1, 0, 1, 0, 1] and B = [1, 0, 0, 1, 1, 1]. Compute Jaccard similarity and M...

Machine Learning

  Machine Learning Lab External 1. a) Create a small dataset with at least 10 records and 4 columns: ·          Age (numeric) ·          Height (numeric) ·          Weight (numeric) ·          City (categorical, with possible values: "City A", "City B", "City C")    b) Ensure that some entries in the Age and Weight columns contain missing values. ·          Handle missing data by: o    Replacing missing values in the Age column with the average age . o    Replacing missing values in the Weight column with the median weight .    c) Normalize the Age , Height , and Weight columns using min-max scaling to bring       all values between 0 and 1.    d) Display the original dataset, th...