Exp 1
Data Exploration and Visualization
Explore datasets using descriptive statistics and visualizations. Understand data distributions, outliers, and patterns.
PythonPandasMatplotlibSeaborn
Procedure:
- Load dataset using
pd.read_csv()
- Compute descriptive statistics:
df.describe()
- Create histograms, box plots, and scatter plots
- Identify missing values and outliers
- Generate correlation heatmap
Exp 2
Data Preprocessing
Apply cleaning, normalization, and transformation techniques to prepare data for mining.
PythonScikit-learnPandas
Procedure:
- Handle missing values: mean/median/KNN imputation
- Apply Min-Max and Z-Score normalization
- Encode categorical variables (One-Hot, Label)
- Perform feature selection using correlation analysis
- Apply PCA for dimensionality reduction
Exp 3
Classification with Decision Trees
Build and evaluate Decision Tree classifiers. Understand Information Gain and pruning.
PythonScikit-learnGraphviz
Procedure:
- Split data into train/test sets:
train_test_split()
- Train DecisionTreeClassifier with different criteria (gini, entropy)
- Visualize the tree using
export_graphviz
- Evaluate: confusion matrix, accuracy, precision, recall
- Experiment with max_depth for pruning
Exp 4
Naive Bayes Classification
Implement Naive Bayes for text classification (spam detection).
PythonScikit-learnNLTK
Procedure:
- Load text dataset (SMS Spam Collection)
- Vectorize text using CountVectorizer / TF-IDF
- Train MultinomialNB classifier
- Evaluate with precision, recall, F1-score
- Compare with BernoulliNB variant
Exp 5
k-Nearest Neighbors Classification
Implement k-NN classifier and study the effect of k and distance metrics.
PythonScikit-learn
Procedure:
- Load dataset and normalize features
- Train KNeighborsClassifier with k=1,3,5,7,9
- Plot accuracy vs k to find optimal k
- Compare Euclidean, Manhattan, Minkowski distances
- Analyze confusion matrix for each k value
Exp 6
K-Means Clustering
Apply K-Means clustering and determine optimal number of clusters.
PythonScikit-learnMatplotlib
Procedure:
- Load and normalize data
- Apply KMeans with k=2 to k=10
- Plot SSE vs k (Elbow Method)
- Calculate Silhouette Coefficient for each k
- Visualize clusters using PCA (2D projection)
Exp 7
Hierarchical Clustering
Perform agglomerative hierarchical clustering and analyze dendrograms.
PythonScipyScikit-learn
Procedure:
- Compute linkage matrix using
scipy.cluster.hierarchy.linkage
- Plot dendrogram:
dendrogram()
- Cut dendrogram at different heights to get k clusters
- Compare single, complete, average linkage
- Evaluate with Silhouette Coefficient
Exp 8
Association Rule Mining (Apriori)
Discover frequent itemsets and generate association rules using the Apriori algorithm.
PythonmlxtendPandas
Procedure:
- Load transaction dataset (Market Basket)
- Encode data using one-hot encoding
- Apply Apriori with min_support threshold
- Generate rules with min_confidence threshold
- Filter rules by lift > 1 and analyze top rules
Exp 9
FP-Growth Algorithm
Implement FP-Growth and compare performance with Apriori.
Pythonmlxtend
Procedure:
- Load and encode transaction data (same as Exp 8)
- Apply FP-Growth:
fpgrowth()
- Generate rules:
association_rules()
- Compare execution time with Apriori
- Compare number of frequent itemsets found