BIA Lab External Guide - Page 1 Business Intelligence & Analytics Lab (PC751DSU23) Lab External Exam - Complete Guide: 12 Programs, Steps, Code and Viva Prepared from the examiner's point of view: what is asked, what a good answer looks like, what gets marks, and what the viva will probe. How the external examiner marks you - Aim + procedure (about 20%) : write the aim, tool, dataset and steps clearly before you start. - Execution (about 40%) : it must actually run and show output (chart, table, metrics). A running simple solution beats a broken fancy one. - Output and interpretation (about 20%) : always say in one line what the result means for the business (e.g. 'Cluster 2 is high-income, low-spend, so target with offers'). - Viva (about 20%) : concepts behind your own program. Know your algorithm, metric and why you chose them. - Golden rules : use a small clean dataset, print results, save a screenshot of the output, and never say 'I copied this'. Explain every line of your own code. Setup (do this tonight, one time) pip install pandas numpy matplotlib seaborn scikit-learn mlxtend networkx pip install textblob nltk requests beautifulsoup4 lxml wordcloud python -m textblob.download_corpora python -c "import nltk; nltk.download('stopwords'); nltk.download('punkt')" Also install: Tableau Public (free), Weka (weka.sourceforge.io), MS Excel. Experiment overview No Experiment Tool Key output 1 Student retention analysis Excel Pivot + charts + retention % 2 Executive dashboard Tableau Public KPI dashboard 3 Visual analytics Tableau Public 5-6 charts on a story 4 Predictive analytics / data mining Weka (or Python) Accuracy + confusion matrix 5 K-Means customer clustering Python Elbow plot + cluster scatter 6 Apriori frequent itemsets Python (mlxtend) Itemsets + rules 7 Review sentiment (Naive Bayes) Python Accuracy + report 8 Text mining + LDA Python Top words + topics 9 Social network analysis Python (networkx) Centrality table + graph 10 Web scraping + trends Python Frequent terms + topics 11 Scrape comments + sentiment Python Pie/bar chart 12 Web crawling + PageRank/HITS Python Link graph + ranks BIA Lab External Guide - Page 2 Experiment 1: Improving student retention with data-driven analysis Tool: Microsoft Excel (with graphs) Aim: To analyse student data and identify factors (attendance, CGPA, backlogs, fees) that influence retention using Excel formulas, pivot tables and charts. Procedure - Create a sheet with 30-50 rows. Columns: StudentID, Gender, Branch, Attendance%, CGPA, Backlogs, FeeStatus (Paid/Due), Retained (Yes/No). Or download a student dataset from Kaggle. - Clean data: remove duplicates (Data > Remove Duplicates), fill blanks, check with Data Validation. - Add helper column Risk : =IF(OR(D2<75,E2<6,F2>2),"High","Low") - Key formulas: Retention rate =COUNTIF(H:H,"Yes")/COUNTA(H2:H51) ; Avg attendance of retained =AVERAGEIF(H:H,"Yes",D:D) ; same for 'No'. - Insert > PivotTable: Rows = Branch, Columns = Retained, Values = Count of StudentID. Add a second pivot for Risk vs Retained. - Charts: clustered column (branch vs retained), pie (retained vs dropped), scatter (Attendance vs CGPA), line/bar for backlogs vs dropout. - Conditional formatting: highlight Attendance < 75 in red, CGPA < 6 in orange. - Write 3-4 insights: e.g. 'Students below 75% attendance have the highest dropout; fee dues and backlogs are the next factors'. Recommend: early-warning alerts, mentoring, fee support. Expected output: Retention rate %, pivot tables, 3-4 charts and a short insight paragraph. Examiner's tip: Examiners want the insight, not just charts. State the retention rate and the biggest dropout driver clearly. BIA Lab External Guide - Page 3 Experiment 2: Executive dashboard design using Tableau Public Tool: Tableau Public Aim: To design an interactive executive dashboard with KPIs for a business scenario (e.g. retail sales). Procedure - Open Tableau Public > Connect > Microsoft Excel/Text file. Use Sample Superstore (or any sales CSV with Date, Region, Category, Sales, Profit, Quantity). - Sheet 1 - KPI cards: drag Sales to Text, create one sheet each for Total Sales, Total Profit, Profit Ratio ( SUM([Profit])/SUM([Sales]) ). - Sheet 2 - Sales trend: Order Date (Month, continuous) to Columns, Sales to Rows (line chart). - Sheet 3 - Sales by Region: bar chart, Region on Rows, SUM(Sales) on Columns, sort descending. - Sheet 4 - Profit by Category/Sub-Category: bar chart with colour by Profit (diverging). - Sheet 5 - Top 10 customers/products: filter Top 10 by Sales. - Dashboard > New Dashboard > set size to Automatic. Drag KPI sheets on top, trend in middle, bar charts below. Add filters (Region, Year) and 'Use as Filter' on charts. - Add title, tooltips and a short text box with a business headline. File > Save to Tableau Public. Expected output: One-page dashboard with 3 KPIs, 1 trend, 3 comparison charts and working filters. Examiner's tip: An executive dashboard must be readable in 10 seconds: few visuals, clear KPIs, consistent colours, interactive filters. BIA Lab External Guide - Page 4 Experiment 3: Visual analytics for given business tasks using Tableau Public Tool: Tableau Public Aim: To generate multiple visual analytics (comparison, trend, distribution, relationship, composition) for a business dataset. Procedure - Load the dataset (Superstore, HR attrition, or any given CSV). - Comparison : bar chart of Sales by Category. Trend : line chart of monthly Profit. - Distribution : histogram of Sales (Show Me > Histogram) or box plot by Region. - Relationship : scatter plot Sales vs Profit with colour = Category (add trend line from Analytics pane). - Composition : pie/treemap of Sales by Sub-Category. Geography : filled map by State. - Create calculated field if asked, e.g. IF [Profit]<0 THEN 'Loss' ELSE 'Profit' END - Combine 4-6 sheets into a Story or dashboard. Write one insight under each chart. Expected output: 5-6 different chart types, each with a one-line business insight. Examiner's tip: Choose the chart to match the question. Know why a bar was chosen over a pie and a line over a bar. BIA Lab External Guide - Page 5 Experiment 4: Customer experience: predictive analytics and data mining Tool: Weka (alternative: Python / RapidMiner / Power BI) Aim: To predict customer churn / satisfaction with a classification model and evaluate it. Procedure - Dataset: Telco Customer Churn CSV (or Weka built-in files, e.g. weather.nominal.arff). Keep attribute columns plus a Class column (Churn: Yes/No). - Weka Explorer > Preprocess > Open file. Remove ID column (Remove filter). Check missing values; apply ReplaceMissingValues filter if needed. - Classify tab > Choose trees > J48 > Test options: Cross-validation 10 folds (or 70/30 percentage split) > Start. - Read output: Correctly Classified Instances (accuracy), Kappa, Confusion Matrix, Precision/Recall/F-measure. - Right-click result > Visualize tree. Try Naive Bayes and RandomForest, compare accuracy in a small table. - Interpretation: which attributes appear at the top of the tree (contract type, tenure) = key churn drivers. Recommend retention offers for those customers. Program # Python alternative (same idea) import pandas as pd from sklearn.model_selection import train_test_split from sklearn.tree import DecisionTreeClassifier from sklearn.metrics import accuracy_score, confusion_matrix df = pd.read_csv("churn.csv") # last column = Churn X = pd.get_dummies(df.drop("Churn", axis=1)); y = df["Churn"] Xtr, Xte, ytr, yte = train_test_split(X, y, test_size=0.3, random_state=42) m = DecisionTreeClassifier(max_depth=4).fit(Xtr, ytr) p = m.predict(Xte) print("Accuracy:", accuracy_score(yte, p)) print(confusion_matrix(yte, p)) Expected output: Accuracy (e.g. ~78-80%), confusion matrix, decision tree, list of churn drivers. Examiner's tip: Be ready to explain accuracy vs precision vs recall and why 10-fold cross-validation is used. BIA Lab External Guide - Page 6 Experiment 5: Cluster analysis using K-Means Tool: Python (scikit-learn) Aim: To segment customers into groups using K-Means and choose k with the elbow method. Procedure - Use Mall_Customers.csv (Annual Income, Spending Score). If the file is not given, the program below generates sample data. - Select features, standardise them with StandardScaler. - Elbow method: run K-Means for k = 1..10 and plot inertia (WCSS). Pick the bend (usually k = 5 for mall data). - Fit final KMeans, add Cluster column, plot a scatter with centroids, print cluster-wise means. - Interpret each cluster (e.g. High income-High spend = premium target). Program import pandas as pd, matplotlib.pyplot as plt from sklearn.cluster import KMeans from sklearn.preprocessing import StandardScaler from sklearn.metrics import silhouette_score from sklearn.datasets import make_blobs try: df = pd.read_csv("Mall_Customers.csv") X = df[["Annual Income (k$)", "Spending Score (1-100)"]].values except FileNotFoundError: X, _ = make_blobs(n_samples=200, centers=5, cluster_std=1.2, random_state=1) df = pd.DataFrame(X, columns=["Income", "Score"]) Xs = StandardScaler().fit_transform(X) wcss = [KMeans(n_clusters=k, n_init=10, random_state=42).fit(Xs).inertia_ for k in range(1, 11)] plt.plot(range(1, 11), wcss, marker="o"); plt.xlabel("k"); plt.ylabel("WCSS") plt.title("Elbow Method"); plt.show() km = KMeans(n_clusters=5, n_init=10, random_state=42).fit(Xs) df["Cluster"] = km.labels_ print("Silhouette:", silhouette_score(Xs, km.labels_)) print(df.groupby("Cluster").mean(numeric_only=True)) plt.scatter(Xs[:, 0], Xs[:, 1], c=km.labels_, cmap="tab10") plt.scatter(km.cluster_centers_[:, 0], km.cluster_centers_[:, 1], c="black", s=200, marker="X", label="Centroids") plt.legend(); plt.title("Customer Segments"); plt.show() Expected output: Elbow curve, 5 coloured clusters with centroids, cluster mean table, silhouette score. Examiner's tip: Know how K-Means works step by step: pick k, initialise centroids, assign, update, repeat until no change. BIA Lab External Guide - Page 7 Experiment 6: Frequent itemsets using the Apriori algorithm Tool: Python (mlxtend) Aim: To find frequent itemsets and association rules from market-basket transactions. Procedure - Prepare a list of transactions (or read a basket CSV). - One-hot encode with TransactionEncoder. - Run apriori with min_support (e.g. 0.4) and use_colnames=True. - Generate rules with association_rules, metric = confidence (min 0.6). Show support, confidence, lift. - Interpret: 'If a customer buys bread, they also buy butter with 75% confidence; lift > 1 shows a real association.' Program import pandas as pd from mlxtend.preprocessing import TransactionEncoder from mlxtend.frequent_patterns import apriori, association_rules transactions = [ ["bread", "milk"], ["bread", "diaper", "beer", "eggs"], ["milk", "diaper", "beer", "cola"], ["bread", "milk", "diaper", "beer"], ["bread", "milk", "diaper", "cola"]] te = TransactionEncoder() df = pd.DataFrame(te.fit(transactions).transform(transactions), columns=te.columns_) freq = apriori(df, min_support=0.4, use_colnames=True) print("Frequent Itemsets:\n", freq) rules = association_rules(freq, metric="confidence", min_threshold=0.6) print(rules[["antecedents", "consequents", "support", "confidence", "lift"]]) Expected output: Table of frequent 1-,2-,3-itemsets with support; rules table with confidence and lift. Examiner's tip: Be able to compute support and confidence by hand for one rule. Apriori principle: every subset of a frequent itemset must be frequent. BIA Lab External Guide - Page 8 Experiment 7: Sentiment classification of product reviews (Naive Bayes) Tool: Python (scikit-learn) Aim: To classify reviews as positive, negative or neutral using Naive Bayes and evaluate accuracy. Procedure - Dataset: Amazon reviews CSV with columns review and sentiment (derive sentiment from rating: 4-5 positive, 3 neutral, 1-2 negative). Small inline sample is below for safety. - Preprocess: lowercase, remove stopwords via TfidfVectorizer(stop_words='english'). - Split 80/20, train MultinomialNB, predict, print accuracy, classification report, confusion matrix. - Optional pre-trained alternative: TextBlob / VADER polarity. Program import pandas as pd from sklearn.model_selection import train_test_split from sklearn.feature_extraction.text import TfidfVectorizer from sklearn.naive_bayes import MultinomialNB from sklearn.metrics import accuracy_score, classification_report, confusion_matrix # df = pd.read_csv("reviews.csv") # columns: review, sentiment data = [("Excellent product, works great", "positive"), ("Loved it, very good quality", "positive"), ("Amazing battery and fast delivery", "positive"), ("Superb value for money", "positive"), ("Terrible, stopped working in a week", "negative"), ("Very bad quality, waste of money", "negative"), ("Worst purchase, totally disappointed", "negative"), ("Poor packaging and broken item", "negative"), ("It is okay, nothing special", "neutral"), ("Average product, does the job", "neutral"), ("Not bad, not great either", "neutral"), ("Decent for the price, ordinary", "neutral")] * 5 df = pd.DataFrame(data, columns=["review", "sentiment"]) vec = TfidfVectorizer(stop_words="english") X = vec.fit_transform(df["review"]) Xtr, Xte, ytr, yte = train_test_split(X, df["sentiment"], test_size=0.2, random_state=42, stratify=df["sentiment"]) nb = MultinomialNB().fit(Xtr, ytr) pred = nb.predict(Xte) print("Accuracy:", accuracy_score(yte, pred)) print(classification_report(yte, pred)) print(confusion_matrix(yte, pred)) print(nb.predict(vec.transform(["the phone is really great"]))) Expected output: Accuracy score, precision/recall/F1 per class, confusion matrix and a sample prediction. Examiner's tip: Explain Bayes theorem, the 'naive' independence assumption and why TF-IDF is used. Say clearly that inline data is only a demo; real accuracy depends on real data. BIA Lab External Guide - Page 9 Experiment 8: Text mining and topic modelling (LDA) on news articles Tool: Python (scikit-learn) Aim: To find the most frequent terms in news articles and discover hidden topics using LDA. Procedure - Load articles (CSV of news or sklearn's fetch_20newsgroups if internet is allowed). An inline sample is used below. - Clean: lowercase, remove punctuation and stopwords with CountVectorizer(stop_words='english'). - Print the top 10 frequent terms and show a bar chart. - Fit LatentDirichletAllocation (n_components = number of topics) and print top words per topic. - Name each topic (sports, politics, technology) from its words. Program import numpy as np, matplotlib.pyplot as plt from sklearn.feature_extraction.text import CountVectorizer from sklearn.decomposition import LatentDirichletAllocation docs = [ "The cricket team won the match with a brilliant century by the captain", "The football league final saw a late goal and the coach praised the players", "Tennis star wins the championship after a thrilling final set", "The government announced a new budget with tax reforms and election promises", "Parliament passed the bill as the minister defended the policy", "The prime minister met leaders to discuss the election and economy", "The company launched a new smartphone with an advanced AI chip", "Researchers released a new software model for machine learning and data", "Tech startup raises funds to build cloud computing and AI tools"] # from sklearn.datasets import fetch_20newsgroups # docs = fetch_20newsgroups(subset="train", remove=("headers","footers","quotes")).data[:1000] cv = CountVectorizer(stop_words="english", max_df=0.95) X = cv.fit_transform(docs) words = np.array(cv.get_feature_names_out()) freq = np.asarray(X.sum(axis=0)).ravel() top = freq.argsort()[::-1][:10] print("Top terms:", list(zip(words[top], freq[top]))) plt.barh(words[top][::-1], freq[top][::-1]); plt.title("Most frequent terms"); plt.show() lda = LatentDirichletAllocation(n_components=3, random_state=42).fit(X) for i, comp in enumerate(lda.components_): print(f"Topic {i+1}:", [words[j] for j in comp.argsort()[::-1][:6]]) Expected output: Top-10 term list/bar chart and 3 topics, each with 6 keywords. Examiner's tip: Explain LDA: each document is a mixture of topics, each topic is a mixture of words; alpha and beta are Dirichlet priors. BIA Lab External Guide - Page 10 Experiment 9: Social Network Analysis - influential users with centrality Tool: Python (networkx) Aim: To build a graph from follower data and find influential nodes using degree, closeness and betweenness centrality. Procedure - Read edges from CSV (follower, followee) with pd.read_csv, then nx.from_pandas_edgelist. If no dataset is given use the built-in Karate Club graph as below. - Compute degree, closeness and betweenness centrality. - Print a ranked table (top 5 for each) and draw the graph with node size proportional to degree. - Conclude the most influential user and why (e.g. high betweenness = bridge between groups). Program import networkx as nx, pandas as pd, matplotlib.pyplot as plt # df = pd.read_csv("followers.csv") # columns: source, target # G = nx.from_pandas_edgelist(df, "source", "target", create_using=nx.DiGraph()) G = nx.karate_club_graph() deg = nx.degree_centrality(G) clo = nx.closeness_centrality(G) bet = nx.betweenness_centrality(G) res = pd.DataFrame({"Degree": deg, "Closeness": clo, "Betweenness": bet}) print(res.sort_values("Degree", ascending=False).head(5)) print("Most influential (degree):", max(deg, key=deg.get)) print("Best bridge (betweenness):", max(bet, key=bet.get)) pos = nx.spring_layout(G, seed=42) nx.draw(G, pos, with_labels=True, node_size=[v * 3000 for v in deg.values()], node_color="lightgrey", edge_color="grey") plt.title("Social network (size = degree centrality)"); plt.show() Expected output: Centrality table, top influencers and a network plot. Examiner's tip: Define each measure in one sentence: degree = number of connections, closeness = average nearness to all, betweenness = how often a node lies on shortest paths. BIA Lab External Guide - Page 11 Experiment 10: Web scraping and text trend analysis Tool: Python (requests, BeautifulSoup) Aim: To scrape text from web pages and identify frequent terms and topics. Procedure - Pick scrape-friendly sites: quotes.toscrape.com, books.toscrape.com, or a blog/news page (check robots.txt). - requests.get(url), parse with BeautifulSoup, extract text from p, h2 or span.text tags across a few pages. - Clean text, count words with Counter (after removing stopwords), plot top 10. - Optional: apply LDA from Experiment 8 on the scraped texts to show topics. - If the lab has no internet, save a page as .html and parse the local file with BeautifulSoup(open('page.html'), 'lxml'). Program import requests, re from bs4 import BeautifulSoup from collections import Counter import matplotlib.pyplot as plt from sklearn.feature_extraction.text import ENGLISH_STOP_WORDS as STOP urls = [f"https://quotes.toscrape.com/page/{i}/" for i in range(1, 6)] texts = [] for u in urls: r = requests.get(u, timeout=10) soup = BeautifulSoup(r.text, "lxml") texts += [q.get_text() for q in soup.select("span.text")] print("Documents scraped:", len(texts)) words = re.findall(r"[a-z]{3,}", " ".join(texts).lower()) words = [w for w in words if w not in STOP] top = Counter(words).most_common(10) print(top) plt.barh([w for w, _ in top][::-1], [c for _, c in top][::-1]) plt.title("Top terms in scraped pages"); plt.show() Expected output: Number of pages/items scraped, top-10 terms and a bar chart; optional topics. Examiner's tip: Know the difference between scraping and crawling, what robots.txt is, and the HTTP status codes 200, 404 and 403. BIA Lab External Guide - Page 12 Experiment 11: Scrape comments and perform sentiment analysis Tool: Python (requests, BeautifulSoup, TextBlob) Aim: To extract user comments, find sentiment polarity and visualise the sentiment distribution. Procedure - Choose a forum/blog with comments. If none is reachable use quotes.toscrape.com text as comments (still counts as scraped user text). - Scrape comment text, compute TextBlob polarity: > 0.05 positive, < -0.05 negative, otherwise neutral. - Count each class, draw pie chart or bar graph, state overall tone (majority class or mean polarity). Program import requests from bs4 import BeautifulSoup from textblob import TextBlob import matplotlib.pyplot as plt from collections import Counter comments = [] for p in range(1, 6): soup = BeautifulSoup(requests.get(f"https://quotes.toscrape.com/page/{p}/", timeout=10).text, "lxml") comments += [c.get_text() for c in soup.select("span.text")] def label(t): s = TextBlob(t).sentiment.polarity return "Positive" if s > 0.05 else "Negative" if s < -0.05 else "Neutral" labels = [label(c) for c in comments] cnt = Counter(labels); print(cnt) avg = sum(TextBlob(c).sentiment.polarity for c in comments) / len(comments) print("Average polarity:", round(avg, 3), "->", "overall tone:", cnt.most_common(1)[0][0]) plt.pie(cnt.values(), labels=cnt.keys(), autopct="%1.1f%%", colors=["lightgrey", "darkgrey", "silver"]); plt.title("Sentiment distribution") plt.show() Expected output: Counts of positive/negative/neutral comments, average polarity and a pie chart. Examiner's tip: Polarity ranges -1 to +1 and subjectivity 0 to 1. Mention limitations: sarcasm and context are not handled by lexicon methods. BIA Lab External Guide - Page 13 Experiment 12: Web crawling and link analysis (PageRank / HITS) Tool: Python (requests, BeautifulSoup, networkx) Aim: To crawl a website, build its hyperlink graph, count internal vs external links and rank key pages. Procedure - Choose a small site (e.g. https://quotes.toscrape.com or your college site). Limit crawl to 30 pages. - BFS crawl: queue of URLs; for each page extract all a[href] with urljoin, classify as internal (same domain) or external. - Add internal links as directed edges to a networkx DiGraph; keep a counter for external links. - Compute PageRank and HITS (hubs and authorities); print the top 5 pages. - Draw the graph and conclude which page is most important and why (most incoming links from important pages). Program import requests, networkx as nx, matplotlib.pyplot as plt from bs4 import BeautifulSoup from urllib.parse import urljoin, urlparse from collections import deque start = "https://quotes.toscrape.com/" domain = urlparse(start).netloc G, seen, queue, ext = nx.DiGraph(), {start}, deque([start]), 0 while queue and len(seen) <= 30: url = queue.popleft() try: html = requests.get(url, timeout=10).text except Exception: continue for a in BeautifulSoup(html, "lxml").find_all("a", href=True): link = urljoin(url, a["href"]).split("#")[0] if urlparse(link).netloc == domain: G.add_edge(url, link) if link not in seen: seen.add(link); queue.append(link) else: ext += 1 print("Pages:", G.number_of_nodes(), "Internal links:", G.number_of_edges(), "External links:", ext) pr = nx.pagerank(G, alpha=0.85) hubs, auth = nx.hits(G) for name, d in [("PageRank", pr), ("Authority", auth), ("Hub", hubs)]: print(name, sorted(d.items(), key=lambda x: -x[1])[:5]) nx.draw(G, node_size=[v * 8000 for v in pr.values()], node_color="lightgrey", edge_color="grey", arrows=False) plt.title("Website link graph (size = PageRank)"); plt.show() Expected output: Counts of pages, internal and external links, top-5 by PageRank/authority/hub and a link graph. Examiner's tip: Explain PageRank (random surfer, damping 0.85) and the HITS hub/authority idea in two lines each. BIA Lab External Guide - Page 14 Viva Voce Question Bank (with model answers) Answer in two lines: definition, then a business example. Questions are grouped as an external examiner would ask them. General BI and Analytics Q. What is Business Intelligence? A. Technologies and processes that turn raw data into information for better business decisions (reporting, dashboards, OLAP, analytics). Q. Difference between BI and Business Analytics? A. BI is descriptive (what happened). Analytics is also predictive and prescriptive (what will happen, what to do). Q. Types of analytics? A. Descriptive, diagnostic, predictive, prescriptive. Q. What is a data warehouse and ETL? A. A central, subject-oriented, integrated store of historical data. ETL = Extract, Transform, Load. Q. What is OLAP? Name operations. A. Online Analytical Processing for multidimensional analysis: roll-up, drill-down, slice, dice, pivot. Q. What is a KPI? A. Key Performance Indicator, a measurable value showing progress toward a business goal (e.g. profit ratio, churn rate). Q. Supervised vs unsupervised learning? A. Supervised uses labelled data (classification, regression); unsupervised finds patterns without labels (clustering, association). Q. What is data mining? Steps of KDD? A. Discovering patterns in large data. KDD: selection, preprocessing, transformation, mining, interpretation. Q. What is data preprocessing? A. Cleaning, handling missing values, removing duplicates and outliers, normalisation, encoding. Q. OLTP vs OLAP? A. OLTP handles day-to-day transactions (current data); OLAP handles analysis on historical aggregated data. Experiment 1 - Excel (student retention) Q. What is retention rate? A. Percentage of students who continue the programme: retained / total x 100. Q. What is a pivot table? A. An Excel tool to summarise, group and cross-tabulate large data quickly. Q. COUNTIF vs COUNTIFS vs SUMIF? A. COUNTIF counts with one condition; COUNTIFS with several; SUMIF sums values meeting a condition. Q. When do you use VLOOKUP / XLOOKUP? A. To fetch a value from a table by key; XLOOKUP is more flexible and can look left. Q. Why did you choose that chart? A. Column for comparison, pie for share, scatter for relationship, line for trend. Experiments 2 and 3 - Tableau Q. What is Tableau Public and its limitation? A. Free Tableau version where workbooks are saved publicly on the cloud; no private saving. BIA Lab External Guide - Page 15 Q. Dimensions vs measures? A. Dimensions are categorical (blue pills: region, category); measures are numeric (green pills: sales, profit). Q. Discrete vs continuous fields? A. Discrete creates separate headers/labels; continuous creates an axis. Q. What is a dashboard vs a story vs a worksheet? A. Worksheet is a single view; dashboard combines views; story is a sequence of sheets/dashboards. Q. What is a calculated field, a filter, a parameter? A. Custom formula field; a limit on data shown; a user-controlled value that drives calculations or filters. Q. Features of a good executive dashboard? A. Few KPIs, clear layout, consistent colours, interactivity, actionable insight. Experiment 4 - Predictive analytics (Weka) Q. What is classification? Name algorithms. A. Predicting a categorical label. Decision tree, Naive Bayes, KNN, SVM, Random Forest. Q. What is J48? A. Weka's implementation of the C4.5 decision tree; splits using information gain ratio. Q. What is cross-validation? A. Data is split into k folds; each fold is used once as test, giving a more reliable estimate. Q. Accuracy, precision, recall, F1? A. Accuracy = correct/total; precision = TP/(TP+FP); recall = TP/(TP+FN); F1 = harmonic mean of both. Q. What is a confusion matrix? A. Table of actual vs predicted classes showing TP, TN, FP and FN. Q. What is overfitting? A. Model fits training data too closely and performs poorly on new data; reduce by pruning, cross-validation, more data. Experiment 5 - K-Means Q. How does K-Means work? A. Choose k centroids, assign each point to the nearest, recompute centroids, repeat until stable. Q. How do you choose k? A. Elbow method (WCSS) and silhouette score. Q. Why scale the data? A. K-Means uses distance, so large-range features would dominate. Q. Limitations of K-Means? A. Needs k in advance, sensitive to outliers and initialisation, assumes spherical clusters. Q. What is WCSS / inertia? A. Sum of squared distances of points to their cluster centroid. Q. Clustering vs classification? A. Clustering is unsupervised without labels; classification is supervised with labels. Experiment 6 - Apriori Q. Define support, confidence and lift. A. Support = freq(A and B)/N; confidence = support(A and B)/support(A); lift = confidence/support(B); lift > 1 means positive association. Q. What is the Apriori property? A. All non-empty subsets of a frequent itemset must also be frequent (used to prune candidates). BIA Lab External Guide - Page 16 Q. Drawbacks of Apriori? A. Many database scans and large candidate generation; FP-Growth is faster. Q. What is a frequent itemset? A. An itemset whose support is at least the minimum support threshold. Q. Business use of association rules? A. Market-basket analysis, cross-selling, shelf layout, recommendations. Experiment 7 - Sentiment (Naive Bayes) Q. State Bayes theorem. A. P(A|B) = P(B|A) P(A) / P(B). Q. Why is it called naive? A. It assumes features (words) are independent given the class. Q. What is TF-IDF? A. Term frequency times inverse document frequency; gives weight to words frequent in a document but rare across documents. Q. What is Laplace smoothing? A. Adds 1 to counts so unseen words do not make probability zero. Q. Bag-of-words vs TF-IDF? A. Bag-of-words uses raw counts; TF-IDF down-weights common words. Q. What is sentiment analysis? A. Identifying opinion polarity (positive, negative, neutral) from text. Experiment 8 - Text mining and LDA Q. What is text mining? A. Extracting useful patterns and knowledge from unstructured text. Q. What are stopwords, stemming, lemmatization, tokenization? A. Common words removed; reducing words to a root by chopping; reducing to a dictionary form; splitting text into tokens. Q. What is LDA? A. Latent Dirichlet Allocation, a probabilistic model where each document is a mixture of topics and each topic a distribution over words. Q. How do you choose the number of topics? A. Coherence or perplexity scores, or domain knowledge. Q. LDA vs clustering? A. LDA gives soft membership (a document has many topics); K-Means gives hard membership. Experiment 9 - Social Network Analysis Q. What is SNA? A. Study of relationships using nodes (people) and edges (connections). Q. Define degree, closeness and betweenness centrality. A. Number of ties; inverse of average shortest-path distance to all; fraction of shortest paths passing through a node. Q. Directed vs undirected graph? A. Directed edges have direction (Twitter follow); undirected are mutual (Facebook friends). Q. What is eigenvector centrality? A. A node is important if connected to other important nodes. BIA Lab External Guide - Page 17 Q. Who is the most influential and why? A. Quote your output: highest degree = most connected; highest betweenness = key bridge between groups. Experiments 10 and 11 - Scraping Q. What is web scraping? A. Automatically extracting data from web pages. Q. Scraping vs crawling vs API? A. Scraping extracts content; crawling follows links to discover pages; API gives structured data officially. Q. What is robots.txt? A. A file telling bots which parts of a site may or may not be accessed. Q. Role of BeautifulSoup and requests? A. requests downloads HTML; BeautifulSoup parses it and finds tags. Q. What is polarity and subjectivity (TextBlob)? A. Polarity -1 to +1 (negative to positive); subjectivity 0 to 1 (objective to subjective). Q. Limitations of lexicon-based sentiment? A. Cannot handle sarcasm, negation context or domain-specific words well. Experiment 12 - Web crawling and PageRank/HITS Q. What is PageRank? A. Algorithm ranking pages by the quantity and quality of incoming links; modelled as a random surfer with damping factor 0.85. Q. What is HITS? A. Hyperlink-Induced Topic Search: a good hub points to good authorities, a good authority is pointed to by good hubs. Q. PageRank vs HITS? A. PageRank gives one query-independent score; HITS gives two scores (hub, authority) and is query-dependent. Q. What is the damping factor? A. Probability (about 0.85) that the surfer follows a link; the rest is a random jump, avoiding dead ends. Q. Internal vs external links? A. Internal links stay on the same domain; external go to other domains. Q. BFS vs DFS crawling? A. BFS crawls level by level (queue); DFS goes deep first (stack). BFS is preferred for coverage. Last-minute checklist - Keep a folder with all datasets and a tested .py file for each experiment; open them before the exam. - Run each program once tonight and note the output values (accuracy, top terms, cluster count). - If the internet fails, use the local HTML fallback for 10, 11 and 12, and the built-in datasets for 7, 8 and 9. - Whatever dataset the examiner gives, follow the same pipeline: load, clean, analyse, visualise, interpret. - Stay calm, speak slowly, and relate every answer to a business use. Best of luck for tomorrow!