L
LLLOS.ai
Learn
L

Chapter 2 — Ai Project Cycle

Class 10 · Artificial Intelligence

Overview

Introduction: The AI Project Cycle chapter introduces students to the step-by-step process of planning and executing an AI project. It frames AI as a solution method for real-world problems by combining problem definition, data, models, evaluation and deployment in an iterative workflow. Importance: Understanding the AI project cycle develops practical, project-based skills that are central to applying AI responsibly. It teaches computational thinking, teamwork, documentation and awareness of ethical, legal and social implications (privacy, bias, fairness and transparency). These skills prepare students to design, evaluate and communicate AI solutions rather than just use pre-built tools. Key themes: The chapter covers (1) problem formulation and goal-setting, (2) data collection and preparation, (3) model selection and training, (4) testing, evaluation and validation, (5) deployment and monitoring, (6) documentation, reproducibility and reporting, and (7) ethics, safety and human-in-the-loop considerations. Emphasis is placed on iteration: refining problem statements, improving data quality, and tuning models based on evaluation results. What the student will learn: Students…

Learning Objectives

  • Define the stages of the AI project cycle
  • Explain how to identify and frame an AI problem from a given real-world scenario
  • Identify appropriate data sources and methods for data collection and annotation
  • Apply data preprocessing techniques such as cleaning, normalization, and feature extraction
  • Analyze dataset quality and justify approaches for handling missing values and outliers
  • Select suitable features and algorithms based on the problem type and constraints
  • Train and validate models using training/validation splits and cross-validation
  • Evaluate model performance using metrics (accuracy, precision, recall, F1-score, RMSE) and a confusion matrix

Topics in this chapter

19 topics · tap a topic title to jump straight to it.

🤖1

Introduction to AI Project Cycle

💡 KEY CONCEPT SUMMARY

Introduction to AI Project Cycle

Key Point: Train/Test split suggestion (not a strict formula): Common ratios – 80:20 or 70:30 (training:dataTesting).

What is an AI Project Cycle?
The AI Project Cycle is a step-by-step process used to build an AI system that solves a real problem. It helps teams move from an idea to a working AI application and keeps improving it over time.

  1. Define the problem
    Decide the goal: what question should the AI answer or what task should it perform? Example goals: classify images, predict a value, or recommend items.
  2. Collect data
    Gather examples that show inputs and (sometimes) correct outputs. Data can be images, text, numbers, or sensor readings.
  3. Prepare and clean data
    Fix errors, remove duplicates, handle missing values, label data if needed, and convert data into a consistent format (e.g., resize images, normalize numbers).
  4. Choose model & features
    Pick a suitable algorithm (simple rules, decision trees, k-NN, or neural networks) and decide which input attributes (features) to use.
  5. Train the model
    Use the training data to let the model learn patterns. Training adjusts internal settings so the model performs the desired task.
  6. Evaluate the model
    Test the model on new (test or validation) data to measure how well it works. Use metrics like accuracy, precision, recall, and error rate to judge performance.
  7. Deploy
    Put the trained model into use (an app, website, or device) so real users can benefit from it.
  8. Monitor & maintain
    Watch how the model performs in the real world. Collect feedback and new data, then retrain or update the model when performance drops or requirements change.

Key ideas to remember

  • Data quality is often more important than model complexity.
  • Always split data into training and test sets (common splits: 80:20 or 70:30).
  • Evaluate with appropriate metrics depending on the problem (e.g., accuracy for balanced classes, precision/recall for imbalance).
  • Consider ethics, privacy, and bias at each stage (who provides data, how labels are made, and how results affect people).
  • The cycle is iterative: evaluation and monitoring usually lead you back to collecting or preparing more data or choosing a better model.
📌 Examples
  • Smart attendance: Use face images to mark student attendance — collect photos, label them with names, train a face recognition model, test and deploy in school.
  • Plant disease detector: Farmers take leaf photos; the model classifies healthy vs diseased. Steps: collect leaf images, label diseases, train, evaluate accuracy, release as a mobile app.
  • Spam detection in email: Collect labeled emails (spam/not spam), extract text features, train a classifier, evaluate precision and recall, then deploy in an inbox filter.
  • Library recommendation system: Use students' borrowing history to suggest books. Collect usage data, build a recommendation model, evaluate with user feedback, and update periodically.
  • Traffic sign recognition for a toy car: Gather images of signs, annotate labels, train a classifier, measure test accuracy, and run the model on the car to control behavior.
🧮 Formulas
  1. \[Train/Test split suggestion (not a strict formula): Common ratios – 80:20 or 70:30 (training:dataTesting).\]
  2. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  3. \[Error rate = (FP + FN) / (TP + TN + FP + FN) = 1 - Accuracy\]
  4. \[Precision = TP / (TP + FP) (How many predicted positives are correct)\]
  5. \[Recall (Sensitivity) = TP / (TP + FN) (How many actual positives were found)\]
  6. \[F1 score = 2 * (Precision * Recall) / (Precision + Recall) (Harmonic mean of precision & recall)\]
🤖2

Problem Identification and Definition

💡 KEY CONCEPT SUMMARY

Problem Identification and Definition

Key Point: Objective (general): find model parameters θ that minimise loss: θ* = argmin_θ L(y, f_θ(x)) where L is a loss function, x are inputs and y are true outputs.

What it means
Problem Identification and Definition is the first and most important step in an AI project. It means clearly understanding the real-world issue you want to solve, converting it into a well-defined AI task, and setting measurable success criteria. A well-defined problem guides data collection, model choice, evaluation and deployment.

Key steps

  • Understand context: Talk to stakeholders, study the environment and root causes.
  • State the goal: Turn the need into a clear AI goal (e.g., classify, predict, recommend, cluster).
  • Make it SMART: Specific, Measurable, Achievable, Relevant, Time-bound.
  • Define success metrics: Choose how you will measure performance (accuracy, precision, recall, time saved, cost reduced).
  • Specify inputs and outputs: What data is available and what will the model output?
  • List constraints and assumptions: Data quality, privacy, compute limits, time and budget.
  • Decide baseline and target: Current performance (baseline) and desired improvement (target).
  • Identify risks: Bias, ethical issues, data drift, stakeholder acceptance.

Why it matters
If the problem is vague, the team may build the wrong model or collect the wrong data. A clear problem definition saves time, reduces cost and increases the chance of a useful solution.

Problem statement template (simple)
Given INPUT (type of data) we want to PREDICT / CLASSIFY / RECOMMEND OUTPUT so that BUSINESS/USER GOAL is achieved by TIME, measured by METRIC reaching TARGET.

Example of a clear statement:
"Given images of plant leaves (input), classify whether the plant has Disease A, B or is healthy (output), so that farmers can receive an alert within 2 hours and reduce crop loss by 20% (goal). Success measured by classification accuracy >= 90% on held-out farm data (metric & target)."

📌 Examples
  • School attendance alerts: Problem - Reduce unexplained absenteeism. AI task - Predict which students are likely to be absent next week. Input - past attendance, grades, SMS notices. Success metric - precision of predicted absentees | Target - top 10% flagged students contain at least 70% actual absentees.
  • Traffic congestion forecasting: Problem - Reduce peak-hour jams on a city road. AI task - Predict traffic volume 1 hour ahead. Input - historical traffic counts, weather, events. Success metric - RMSE of predicted volume | Target - reduce peak-time travel delay by 15% compared to current routing.
  • Medical triage support: Problem - Faster prioritisation of emergency patients. AI task - Classify incoming cases into priority levels. Input - symptoms, vitals, triage notes. Success metric - recall for critical cases (sensitivity) | Target - recall >= 95% for critical cases.
  • Waste collection optimisation: Problem - Reduce missed pickups and cost. AI task - Predict bin-full status and optimise routes. Input - sensor data, historical pickup logs. Success metric - reduction in route distance and missed pickups | Target - 20% cost reduction.
  • E-commerce product recommendation: Problem - Increase purchase rate. AI task - Recommend top-5 products likely to be bought. Input - user history, item features. Success metric - click-through rate (CTR) and conversion rate | Target - 10% increase in conversion from recommendations.
🧮 Formulas
  1. \[Objective (general): find model parameters θ that minimise loss: θ* = argmin_θ L(y\]
    \[f_θ(x)) where L is a loss function\]
    \[x are inputs and y are true outputs.\]
  2. \[Accuracy = (TP + TN) / (TP + TN + FP + FN) (useful for overall correctness)\]
  3. \[Precision = TP / (TP + FP) (how many predicted positives were correct)\]
  4. \[Recall (Sensitivity) = TP / (TP + FN) (how many actual positives were found)\]
  5. \[F1 score = 2 * (Precision * Recall) / (Precision + Recall) (balance of precision & recall)\]
  6. \[Error rate = 1 - Accuracy\]
🤖3

Project Planning and Scoping

💡 KEY CONCEPT SUMMARY

Project Planning and Scoping

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN) -- overall correctness of predictions

What it is: Project Planning and Scoping is the first phase of the AI project cycle where you define what the project will (and will not) do, set goals, identify resources, plan tasks, and decide how success will be measured. Good planning ensures the project is feasible, ethical, and delivers value.

Key components:

  • Objective: Clear statement of the problem and the desired outcome (what the AI system should achieve).
  • Scope: In-scope vs out-of-scope items to limit project boundaries and avoid scope creep.
  • Success metrics: Quantitative and qualitative criteria to judge the model (accuracy, precision, user satisfaction, business KPIs).
  • Stakeholders: Users, sponsors, data owners, developers, and anyone affected by the system.
  • Data & resources: Data availability, quality, labeling needs, compute, team skills and budget.
  • Timeline & milestones: Work breakdown, milestones for data collection, model building, testing and deployment.
  • Risks & constraints: Privacy, bias, legal, technical limitations, and mitigation plans.
  • Acceptance criteria and deliverables: What will be delivered and how it will be accepted.

Practical steps to plan and scope an AI project:

  1. Define the problem in one sentence and its impact on users or business.
  2. List measurable success metrics (eg. target accuracy, response time, reduction in manual work).
  3. Specify in-scope and out-of-scope features.
  4. Assess data: sources, volume, labels, quality, privacy concerns.
  5. Create a timeline with milestones: Data collection, Preprocessing, Model selection, Evaluation, Pilot, Deployment.
  6. Identify team roles and compute/resource needs.
  7. Identify risks (data bias, lack of labels) and mitigation steps.
  8. Define acceptance tests and monitoring plan after deployment.

Ethics and safety: During scoping, evaluate privacy (consent, anonymization), fairness (avoid discriminatory outcomes), transparency (explainability) and legal compliance.

Well-scoped planning keeps the project focused, reduces wasted effort, and raises the chance of delivering useful, responsible AI.

📌 Examples
  • School attendance automation: Objective - automatically mark attendance using student ID QR codes. In-scope - QR scanning and attendance logging; Out-of-scope - face recognition. Success metric - 99% scan success rate; Risks - lost/inaccurate QR codes, student privacy; Milestones - QR generator, scanner app, backend logging, pilot in one class.
  • Crop disease detection app: Objective - classify leaf images into healthy or diseased categories. In-scope - mobile image capture and classification; Out-of-scope - pesticide recommendation. Success metric - 90% F1-score on test data; Data needs - labeled images from local farms; Risks - variations in lighting, similar symptoms between diseases.
  • Chatbot for school helpdesk: Objective - answer common student queries about timetable, fees and events. In-scope - FAQ-based conversational responses; Out-of-scope - administrative approvals. Success metric - 80% correct answer rate and average response time < 5 seconds; Milestones - intent list, training examples, integration with school website.
  • Student performance predictor: Objective - predict students at risk of failing to enable early interventions. In-scope - prediction using attendance, assignment scores and participation; Out-of-scope - grading decisions. Success metric - recall of at-risk students >= 85%; Ethical consideration - avoid bias against groups and ensure human-in-the-loop for interventions.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN) -- overall correctness of predictions\]
  2. \[Precision = TP / (TP + FP) -- proportion of positive predictions that are correct\]
  3. \[Recall = TP / (TP + FN) -- proportion of actual positives correctly identified\]
  4. \[F1-score = 2 * (Precision * Recall) / (Precision + Recall) -- harmonic mean of precision and recall\]
  5. \[PERT expected time = (O + 4M + P) / 6 -- estimate for task duration where O=optimistic\]
    \[M=most likely\]
    \[P=pessimistic\]
  6. \[ROI = (Benefit − Cost) / Cost -- simple measure to evaluate value of project\]
📊4

Data Requirements and Collection

💡 KEY CONCEPT SUMMARY

Data Requirements and Collection

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN) where TP=true positives, TN=true negatives, FP=false positives, FN=false negatives

Data Requirements and Collection is the step in the AI project cycle where you decide what data you need and then gather it. Good data is essential for building reliable AI models. This step answers questions such as: What inputs and outputs are required? How much data is needed? What formats and labels are necessary? Where will the data come from? How will you ensure the data is representative, accurate and ethical?

Key aspects

  • Define objective and outputs: Identify the problem and the model's output (classification, regression, detection).
  • Types and formats of data: Tabular (CSV), images, audio, text, time-series, JSON.
  • Quantity and quality: Enough examples per class; clean, correctly labeled, and representative samples.
  • Features and labels: Decide which attributes (features) the model needs and the labels (ground truth) for supervised learning.
  • Collection methods: Manual entry, sensors, logs, surveys, public datasets, APIs, web scraping, crowdsourcing/annotation.
  • Sampling strategies: Random sampling, stratified sampling (to keep class proportions), and handling imbalance.
  • Preprocessing considerations: Handling missing values, normalization/scaling, encoding categorical variables, and augmentation (for images/audio).
  • Data splitting: Decide training/validation/test splits (common: 70/30, 80/20 or 60/20/20 with validation).
  • Ethics and privacy: Get consent, anonymize personal data, follow laws and avoid biased or harmful data.
  • Documentation: Record metadata (source, date, collection method, label instructions) and version datasets.

Common problems to watch for

  • Class imbalance (one label heavily more frequent than others).
  • Missing or noisy labels.
  • Non-representative sampling leading to bias.
  • Insufficient examples for complex tasks.

Checklist before collecting

  • Clear problem statement and required outputs.
  • List of features and label schema (with examples).
  • Target dataset size or sampling plan.
  • Collection sources and tools (camera, microphone, API, survey).
  • Annotation process and quality control plan.
  • Privacy/consent and storage plan.

Collecting the right data, in the right amount and quality, and documenting it carefully, is often the most important factor determining whether an AI project succeeds.

📌 Examples
  • Spam detection (email): Collect thousands of emails labeled 'spam' or 'not spam'. Features: words/token counts, sender, subject. Need balanced and up-to-date examples to handle new spam types.
  • Image classification (fruit): Collect photos of apples, bananas, oranges in varied lighting and angles. Label each image with the correct fruit. Augment data by flipping and rotating images to increase variety.
  • Loan default prediction (tabular): Gather borrower records with features like age, income, credit score, loan amount and label 'default' or 'no default'. Use stratified sampling to keep default proportion.
  • Voice assistant (speech): Record many audio samples of users saying phrases and transcribe them. Include different accents, ages, and environments to make model robust.
  • Traffic forecasting (time-series): Collect sensor and GPS data over time (vehicle counts, speed). Ensure timestamps are synchronized and cover different days/times for representativeness.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN) where TP=true positives\]
    \[TN=true negatives\]
    \[FP=false positives\]
    \[FN=false negatives\]
  2. \[Precision = TP / (TP + FP)\]
  3. \[Recall (Sensitivity) = TP / (TP + FN)\]
  4. \[F1 score = 2 * (Precision * Recall) / (Precision + Recall)\]
  5. \[Min-max scaling (normalization): x' = (x - min) / (max - min) (scales values to [0,1])\]
  6. \[Z-score (standardization): z = (x - μ) / σ where μ is mean and σ is standard deviation\]
📊5

Data Preparation and Cleaning

💡 KEY CONCEPT SUMMARY

Data Preparation and Cleaning

Key Point: Mean (average): μ = (1/n) * Σ x_i

What is Data Preparation and Cleaning?
Data preparation and cleaning is the process of making raw data ready for analysis or for training an AI model. It includes finding and fixing errors, handling missing values, removing duplicates, converting formats, transforming features, and selecting useful attributes. Clean data leads to better, more reliable AI models and correct conclusions.

Why it matters: Real-world data is often messy: it can have missing entries, inconsistent formats, duplicates, outliers, or irrelevant columns. If these issues are not fixed, models may learn wrong patterns, produce biased results, or perform poorly.

Common steps in Data Preparation and Cleaning

  • Understand the data: Inspect columns, types (numeric, categorical, date), sample values, and summary statistics (count, mean, min, max).
  • Handle missing values: Options include removing rows/columns with many missing values, imputing with mean/median/mode, or using a special value like "unknown" for categorical data.
  • Remove duplicates: Drop repeated rows that arise from repeated entries or merges.
  • Correct inconsistent formats: Standardize date formats, lowercase/strip text, unify units (e.g., kg vs g).
  • Detect and handle outliers: Use statistical tests or plots; decide whether to remove, cap (clip), or transform outliers.
  • Encode categorical variables: Convert categories to numbers using label encoding or one-hot encoding so models can use them.
  • Scale and normalize features: Make numeric features comparable (e.g., min–max scaling or z-score standardization) so algorithms behave better.
  • Feature selection: Keep only useful columns; remove irrelevant or highly correlated features to simplify the model.
  • Split the data: Divide into training and test sets (and validation set if needed) after cleaning to evaluate model performance fairly.

Tools and commands: For Class 10 level, tools like MS Excel, Google Sheets, or beginner Python with pandas (dropna(), fillna(), drop_duplicates(), astype(), mean(), std()) are commonly used.

Good practices: Always keep a copy of raw data, document cleaning steps, and perform cleaning before splitting into train/test (except where you need to avoid data leakage). Visual checks and summary statistics help verify that cleaning had the desired effect.

📌 Examples
  • Student marks dataset: Some students have missing marks for a subject. Options: remove those rows if few, or impute missing marks using class average (mean) or median. Convert gender values like 'M'/'Male' to a single label and remove duplicate student IDs.
  • Bank loan applications: Clean inconsistent income formats ("50k" vs "50000"), fill missing credit score with median, convert categorical loan purpose into one-hot columns, and remove records with identical application IDs (duplicates).
  • Sales data: Dates in multiple formats ("01-02-2024" vs "2024/02/01") are standardized; negative sales values (typos) are treated as outliers and corrected or removed; missing product categories are labeled 'Unknown'.
  • Healthcare patient records: Missing blood pressure readings can be imputed carefully (using median by age group), outlier physiological values investigated before removal, and patient identifiers removed for privacy (anonymization).
🧮 Formulas
  1. \[Mean (average): μ = (1/n) * Σ x_i\]
  2. \[Median: middle value after sorting\]
    \[for even n\]
    \[median = (x_{n/2} + x_{n/2 + 1}) / 2\]
  3. \[Mode: most frequent value (useful for categorical imputation)\]
  4. \[Standard deviation (population): σ = sqrt((1/n) * Σ (x_i - μ)^2)\]
  5. \[Min–Max normalization: x' = (x - min(x)) / (max(x) - min(x)) — scales values to [0,1]\]
  6. \[Z-score (standardization): z = (x - μ) / σ — centers data to mean 0 and standard deviation 1\]
📊6

Data Labeling and Annotation

💡 KEY CONCEPT SUMMARY

Data Labeling and Annotation

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN) — overall correctness of labels vs predictions

What it is: Data labeling and annotation is the process of adding meaningful tags or marks to raw data (images, text, audio, video) so a computer can learn from it. Labeled data becomes the ground truth used to train and test AI models.

Why it matters in the AI project cycle: In the AI Project Cycle, after data collection comes preparation, where labeling converts raw data into a form the model can learn from. Good labels directly affect model accuracy and fairness.

Types of annotation:

  • Classification labels (e.g., cat vs dog)
  • Bounding boxes and polygons for object detection
  • Segmentation masks for pixel-level understanding
  • Keypoints for pose estimation (e.g., joints on a human body)
  • Text labels: sentiment, named entities, intent
  • Audio transcription and speaker labels

How it is done (steps):

  • Define a clear labeling schema and guidelines (what each label means).
  • Choose tools or platforms (annotation software, crowdsourcing portals).
  • Train annotators and run a pilot labeling round.
  • Perform labeling (manual, automated, or semi-automated methods).
  • Quality control: review labels, calculate agreement, and resolve disagreements.
  • Use labeled data to train, validate, and test models; iterate as needed.

Quality and challenges: Common issues include inconsistent labels, ambiguous cases, bias in labels, and class imbalance. Quality control strategies include multiple annotators per item, clear instructions with examples, spot checks, and measuring inter-annotator agreement.

Practical tips: Start small with a clear guideline, use a validation set for continuous checks, automate easy tasks, and keep a balanced dataset for different classes.

📌 Examples
  • Self-driving cars: Engineers label images with bounding boxes around pedestrians, vehicles, traffic signs and lane markings so the car can detect and react to road elements.
  • Sentiment analysis for reviews: Each customer review is labeled as positive, negative, or neutral so a model can learn to predict sentiment of new reviews.
  • Medical imaging: Radiologists annotate regions of interest (tumors, fractures) on X-rays or MRIs to train diagnostic models.
  • Speech-to-text: Audio files are transcribed and labeled with speaker turns so an ASR (automatic speech recognition) model can learn to convert speech to text.
  • E-commerce product tagging: Product images and descriptions are labeled with categories and attributes (color, size, material) to improve search and recommendations.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN) — overall correctness of labels vs predictions\]
  2. \[Precision = TP / (TP + FP) — of items predicted positive\]
    \[fraction that are correct\]
  3. \[Recall = TP / (TP + FN) — of actual positive items\]
    \[fraction correctly identified\]
  4. \[F1 score = 2 * (Precision * Recall) / (Precision + Recall) — harmonic mean of precision and recall\]
  5. \[Cohen's Kappa = (Po - Pe) / (1 - Pe) — Po: observed agreement\]
    \[Pe: expected agreement by chance\]
    \[measures inter-annotator agreement\]
  6. \[Labeling throughput = (Number of items labeled) / (Total labeling time) — measures productivity (e.g.\]
    \[labels/hour)\]
📊7

Exploratory Data Analysis (EDA)

💡 KEY CONCEPT SUMMARY

Exploratory Data Analysis (EDA)

Key Point: Mean (average): mean = (Σ xi) / n

What is EDA? Exploratory Data Analysis (EDA) is the initial step in the AI project cycle where we inspect and summarize a dataset to understand its main characteristics, detect patterns, spot anomalies, test assumptions and check data quality before building models.

Why EDA? EDA helps you know what the data contains, whether it needs cleaning, which features are useful, and which visualizations or transformations will be required for modelling.

Typical EDA steps

  • Data collection & quick look: read the data, view first/last rows, check dimensions (rows × columns).
  • Data cleaning: handle missing values, correct types, remove duplicates, fix obvious errors.
  • Summary statistics: compute mean, median, mode, range, quartiles, variance, standard deviation, counts and percentages.
  • Distribution analysis: check how each numeric variable is distributed (skewness, symmetry, multimodality).
  • Relationship analysis: examine correlations and relationships between pairs or groups of variables.
  • Outlier detection: find unusual values that may be errors or special cases.
  • Feature transformation & engineering: create new useful variables or normalize/scale if needed.
  • Documentation & conclusions: note findings, possible problems, and next steps for modelling.

Common EDA tasks and tips

  • Always start with data types (numeric, categorical, date) — choose visualizations accordingly.
  • For missing values: if few, consider removing rows; if many, consider imputation (mean/median/mode or domain-based).
  • For outliers: investigate cause (measurement error vs true extreme); decide to keep, transform (e.g., log), or remove.
  • Use correlation but be careful: correlation ≠ causation. Look at scatter plots to validate numeric relationships.
  • Document surprising findings (data entry issues, skewed distributions) to inform model choice and evaluation.
📌 Examples
  • School marks dataset: Use EDA to find average marks per subject, subjects where many students scored low, distribution of marks (histogram), and if students who study more hours get better marks (scatter plot & correlation).
  • Weather data (daily temperature, rainfall): Use EDA to see seasonal trends (line chart), distribution of daily temperatures (boxplot), and detect faulty sensors showing impossible values.
  • Retail sales data: Summarize daily/weekly sales, find top-selling products (bar chart), spot sales spikes or drops (time series), and check relation between discounts and sales volume (scatter plot).
  • Health checkup records: Check distributions of BMI, blood pressure; detect missing values in important tests; use correlation heatmap to check relations between age, cholesterol and blood pressure.
🧮 Formulas
  1. \[Mean (average): mean = (Σ xi) / n\]
  2. \[Median: middle value when data sorted (for even n\]
    \[median = average of the two middle values)\]
  3. \[Mode: most frequent value(s) in the dataset\]
  4. \[Range: range = max(x) - min(x)\]
  5. \[Variance (population): var = (Σ (xi - mean)^2) / n\]
  6. \[Standard deviation: sd = sqrt(variance)\]
🤖8

Feature Engineering

💡 KEY CONCEPT SUMMARY

Feature Engineering

Key Point: Min-max scaling: x' = (x - min) / (max - min) — rescales x to range [0,1].

What is Feature Engineering?
Feature engineering is the process of selecting, creating, and transforming input variables (features) from raw data so that machine learning models can learn patterns more effectively. In the AI Project Cycle it falls inside the Data Preparation and Modelling phases: good features often make the difference between a weak and a strong model.

Why it matters: Raw data is often noisy, incomplete or not in a form suitable for algorithms. Feature engineering improves model accuracy, reduces training time, and helps models generalize better to new data.

Main steps in Feature Engineering

  • Understand the data: Study types of variables (numeric, categorical, text, date/time), distributions and relations to the target.
  • Clean the data: Handle missing values, correct errors, and treat outliers.
  • Transform features: Scale numeric values, encode categorical variables, convert text to numeric representation.
  • Create new features: Derive useful features (e.g., ratios, counts, date parts) from existing ones.
  • Select features: Remove irrelevant or redundant features using statistics or model-based methods.
  • Reduce dimensionality (if needed): Techniques like PCA to compress information while keeping most variance.
  • Validate and iterate: Test feature changes with cross-validation and refine based on performance.

Common operations explained

  • Missing values: Replace with mean/median/mode, or flag them with a new binary feature.
  • Encoding categorical data: One-hot encoding (create 0/1 columns), label encoding, or target encoding.
  • Scaling: Min-max scaling or standardization so features with different units become comparable.
  • Feature creation: Combine features (e.g., price_per_sqft = price / area), extract date parts (year, month, weekday), or compute interaction terms.
  • Text features: Count vectors, TF-IDF, or word embeddings to turn text into numbers.

Tips for Class 10 projects: Use simple, explainable features. Visualize relationships first. Keep track of every change so you can explain why a feature improved the model.

📌 Examples
  • Student performance prediction: From raw data (study_hours, attendance, past_marks) create features like average_weekly_study = study_hours / weeks, and encode 'extra_classes' (yes/no) as 1/0. Scale numeric features so models treat them fairly.
  • House price prediction: Create price_per_sqft = price / area, extract location as one-hot encoded features (or group locations by average price), and handle missing 'bathroom' values by median imputation.
  • Spam detection: Convert email text to TF-IDF vectors, create features like number_of_links, number_of_exclamation_marks, and a binary feature 'has_attachment'.
  • Health risk screening: From height and weight compute BMI = weight(kg) / (height(m))^2, and bucket BMI into categories (underweight/normal/overweight) as a categorical feature.
  • Sales forecasting: From a date column extract month and weekday to capture seasonality, and create lag features like sales_last_week or rolling average of past 4 weeks.
🧮 Formulas
  1. \[Min-max scaling: x' = (x - min) / (max - min) — rescales x to range [0,1].\]
  2. \[Standardization (Z-score): z = (x - μ) / σ — centers data to mean 0 and variance 1 (μ = mean, σ = standard deviation).\]
  3. \[Mean imputation: x_imputed = (Σ observed x_i) / n_observed — replace missing values with the mean of observed values.\]
  4. \[Pearson correlation (for feature selection): r = cov(X,Y) / (σ_X · σ_Y)\]
    \[where cov(X,Y) = (1/(n-1)) Σ (X_i - μ_X)(Y_i - μ_Y)\]
    \[Values near ±1 show strong linear association.\]
  5. \[TF-IDF (text feature): TF-IDF(t,d) = TF(t,d) * log(N / DF(t))\]
    \[where TF is term frequency in document d\]
    \[DF(t) is number of documents containing term t\]
    \[and N is total documents.\]
  6. \[Entropy (information content): H = -Σ p_i log2(p_i)\]
    \[used in Information Gain for feature importance\]
    \[Information Gain = H(parent) - Σ (weighted H(children)).\]
🗳️9

Model Selection

💡 KEY CONCEPT SUMMARY

Model Selection

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN)

What is Model Selection?
Model selection is the process of choosing the best machine learning model (and its settings) for a given problem and dataset. The goal is to pick a model that generalizes well — i.e., makes accurate predictions on new, unseen data — while meeting constraints like speed and interpretability.

Key steps in model selection

  • Understand the problem: classification vs regression, supervised vs unsupervised, real-time or batch predictions.
  • Prepare data: clean, transform, select features and split into training/validation/test sets.
  • Choose candidate models: simple (linear regression, Naive Bayes), complex (decision trees, SVM, neural networks), ensemble methods (random forest, boosting).
  • Train and validate: use validation methods (hold-out, k-fold cross-validation) to estimate performance.
  • Compare with metrics: accuracy, precision, recall, F1, mean squared error, etc., depending on problem type.
  • Tune hyperparameters: grid search, random search, or automated search to improve performance.
  • Check for overfitting/underfitting: use training vs validation performance and regularization techniques if needed.
  • Final evaluation and deployment: test on a separate test set, consider interpretability, computation cost, and maintenance.

Common trade-offs

  • Bias vs Variance: simpler models have higher bias (underfitting) and low variance; complex models have low bias but can have high variance (overfitting).
  • Accuracy vs Interpretability: deep models may be more accurate but less interpretable than linear models or decision trees.
  • Performance vs Cost: consider training/inference time, memory, and data availability.

Practical tips

  • Always keep a final test set that is not used during model selection or hyperparameter tuning.
  • Use cross-validation for robust estimates when data is limited.
  • Prefer simpler models if they meet accuracy needs—fewer surprises in deployment.
  • Visualize errors (residuals, confusion matrix) to understand where models fail.
📌 Examples
  • Spam detection: Compare Naive Bayes (fast, interpretable) vs SVM or logistic regression; use precision and recall because false positives/negatives have different costs.
  • House price prediction: Try linear regression, decision tree, and random forest. Use Mean Squared Error (MSE) and R², and check residual plots to spot underfitting or heteroscedasticity.
  • Medical diagnosis: Favor interpretable models (logistic regression, decision trees) if clinicians need explanations, but balance with accuracy—use ROC-AUC and sensitivity (recall) to reduce missed diagnoses.
  • Product recommendation: Compare collaborative filtering vs content-based vs hybrid models; consider online latency and ability to update with new users/items.
  • Self-driving perception module: Use deep neural networks for accuracy but ensure real-time inference constraints and test under varied conditions to avoid overfitting to one environment.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  2. \[Precision = TP / (TP + FP)\]
  3. \[Recall (Sensitivity) = TP / (TP + FN)\]
  4. \[F1 score = 2 * (Precision * Recall) / (Precision + Recall)\]
  5. \[Mean Squared Error (MSE) = (1/n) * Σ(y_i - ŷ_i)^2\]
  6. \[Mean Absolute Error (MAE) = (1/n) * Σ|y_i - ŷ_i|\]
🤖10

Training and Validation

💡 KEY CONCEPT SUMMARY

Training and Validation

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN)

Training: Training is the process of teaching a machine learning model to learn patterns from labeled data. During training the model adjusts its internal parameters (for example weights in a neural network) to minimize a loss function that measures how far the model's predictions are from the true labels. Training is performed on the training set, a portion of the available dataset.

Validation: Validation is the process of checking how well the trained model generalizes to new, unseen data while the development cycle is still ongoing. The validation set (separate from the training set) is used to monitor model performance, tune hyperparameters (for example learning rate, number of layers, regularization strength), and decide when to stop training (early stopping). The final evaluation is usually done on a separate test set.

Why split data? Splitting data into training, validation and test sets prevents overfitting (model memorizing training data) and helps estimate real-world performance. A common split is 70% training, 15% validation, 15% test, but values vary by dataset size. When data is small, k-fold cross-validation is used to make efficient use of data.

Common practices and techniques:

  • Monitor loss and metrics on both training and validation sets across epochs.
  • Use early stopping when validation loss stops improving to avoid overfitting.
  • Use k-fold cross-validation to get robust estimates of performance and to tune hyperparameters.
  • Apply regularization (L1/L2, dropout) or data augmentation to reduce overfitting.
  • Compare models using validation metrics and select the best for final testing.

Overfitting vs Underfitting: Overfitting occurs when training performance is much better than validation performance (model too complex). Underfitting occurs when both training and validation performance are poor (model too simple). The goal is a balance—good performance on both sets.

Validation strategies include hold-out validation, k-fold cross-validation, stratified splits for imbalanced classes, and nested cross-validation for hyperparameter tuning with unbiased model selection.

📌 Examples
  • Email spam filter: Use a large labeled dataset of emails. Train the classifier on the training set, tune hyperparameters and check validation accuracy on the validation set. If validation performance drops while training accuracy increases, apply regularization or early stopping to reduce overfitting.
  • Handwriting recognition (digit classifier): Split labeled images into training and validation sets. Monitor validation loss and accuracy across epochs. Use data augmentation on the training set (rotations, shifts) to improve generalization tested on the validation set.
  • Medical diagnosis model: Because data is limited and class imbalance can be serious, use stratified k-fold cross-validation to validate model performance robustly. Evaluate metrics like precision and recall on validation folds to avoid models that miss positive cases.
  • Movie recommendation system: Train on historical user-item interactions. Use a validation set that holds out recent interactions (time-based split) to simulate real-world recommendations and tune hyperparameters to maximize validation metrics like mean average precision.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  2. \[Precision = TP / (TP + FP)\]
  3. \[Recall (Sensitivity) = TP / (TP + FN)\]
  4. \[F1-score = 2 * (Precision * Recall) / (Precision + Recall)\]
  5. \[Mean Squared Error (MSE) = (1/n) * Σ (y_i - ŷ_i)^2\]
  6. \[Binary Cross-Entropy Loss = - (1/n) * Σ [y_i * log(p_i) + (1 - y_i) * log(1 - p_i)]\]
🤖11

Evaluation and Metrics

💡 KEY CONCEPT SUMMARY

Evaluation and Metrics

Key Point: Confusion matrix values: TP (true positive), TN (true negative), FP (false positive), FN (false negative).

What is Evaluation and Metrics? Evaluation and metrics are the methods we use to measure how well an AI model performs on the problem it was built to solve. During the AI project cycle, after training a model, we evaluate it using appropriate metrics to decide if it is accurate, reliable, and suitable for deployment. Proper evaluation helps detect errors, bias, overfitting/underfitting, and guides model improvement.

Two main types of tasks and their metrics

  • Classification (predicting categories): use confusion matrix, accuracy, precision, recall (sensitivity), F1-score, specificity, ROC curve and AUC, precision–recall curve. These are important when outputs are discrete labels (e.g., spam vs not spam).
  • Regression (predicting continuous values): use Mean Absolute Error (MAE), Mean Squared Error (MSE), Root Mean Squared Error (RMSE), and R-squared (coefficient of determination). These measure how close predicted numbers are to actual values (e.g., predicting house prices).

Confusion matrix (classification): a 2x2 table for binary problems showing counts of True Positives (TP), True Negatives (TN), False Positives (FP) and False Negatives (FN). Many metrics are calculated from these four values.

Why choose metrics carefully? Accuracy alone can be misleading when classes are imbalanced (one class much more frequent). For example, if 99% of emails are non-spam, a model that always predicts "not spam" gets 99% accuracy but is useless. In such cases precision, recall, and F1-score are more informative. For regression problems, look at RMSE and MAE to understand typical prediction errors; R-squared shows explained variance.

Model selection and validation: Use train/test split and cross-validation to estimate generalization performance. Plot learning curves (training vs validation error) to detect overfitting (low training error, high validation error) or underfitting (high error on both).

Thresholds and operating point: For classifiers that give probabilities, choosing a decision threshold affects precision and recall. ROC and precision–recall curves help pick thresholds depending on whether false positives or false negatives are more costly.

Summary: Evaluation and metrics turn raw model outputs into actionable numbers that tell you how well the model meets project goals. Choose metrics that match the problem, consider class balance and costs of mistakes, and validate using held-out data and cross-validation.

📌 Examples
  • Spam detection (classification): Confusion matrix shows TP = correctly detected spam, FP = legitimate mail marked spam. Use precision (how many flagged mails are actually spam) and recall (how many spam mails were detected).
  • Medical diagnosis (classification): For a disease test, high recall (sensitivity) is crucial to reduce missed cases; specificity matters to avoid false alarms. Use ROC/AUC to compare tests.
  • House-price prediction (regression): Use MAE or RMSE to report average prediction error in currency units; use R-squared to report how much price variability the model explains.
  • Loan approval (classification with imbalance): When default is rare, accuracy is misleading. Prefer precision and recall or F1. Use cross-validation to ensure stability across folds.
  • Weather forecasting (regression): Use MSE/RMSE to quantify forecasting error in temperature, and examine residual plots to check systematic biases.
🧮 Formulas
  1. \[Confusion matrix values: TP (true positive)\]
    \[TN (true negative)\]
    \[FP (false positive)\]
    \[FN (false negative).\]
  2. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  3. \[Precision = TP / (TP + FP) // proportion of positive predictions that are correct\]
  4. \[Recall (Sensitivity) = TP / (TP + FN) // proportion of actual positives correctly identified\]
  5. \[F1-score = 2 * (Precision * Recall) / (Precision + Recall) // harmonic mean of precision & recall\]
  6. \[Specificity = TN / (TN + FP) // true negative rate\]
🤖12

Hyperparameter Tuning

💡 KEY CONCEPT SUMMARY

Hyperparameter Tuning

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN)

What is Hyperparameter Tuning? Hyperparameter tuning is the process of selecting the best hyperparameters for a machine learning model. Hyperparameters are settings that control the learning process and model structure (for example: learning rate, number of trees, tree depth, k in k-NN, regularization strength). They are not learned from training data — they must be set before training.

Why it matters: Good hyperparameter choices improve model accuracy, reduce overfitting/underfitting, and speed up training. Poor choices can make a model underfit, overfit, or be slow and unstable.

Typical workflow (AI Project Cycle stage):

  • Choose which hyperparameters to tune and define ranges or candidate values.
  • Pick an evaluation metric (accuracy, F1, RMSE, etc.) and a validation method (hold-out, k-fold cross-validation).
  • Choose a search strategy (grid search, random search, Bayesian optimization, manual, or automated AutoML).
  • Run experiments, record validation scores, and select the best hyperparameter set.
  • Retrain on combined training+validation (or use the best set) and evaluate on a final test set.

Common search methods:

  • Grid search: try every combination from discrete grids — exhaustive but costly.
  • Random search: sample random combinations — often more efficient when only some hyperparameters matter.
  • Bayesian optimization: build a surrogate model of the score and choose promising hyperparameters — efficient for expensive evaluations.
  • Early stopping and adaptive scheduling: stop poor runs early to save time.

Practical tips:

  • Search on a log scale for scale-sensitive hyperparameters (learning rate, regularization).
  • Use coarse search first, then refine around best regions.
  • Use fewer cross-validation folds or fewer epochs for fast exploratory searches.
  • Always evaluate the final chosen model on a held-out test set.
📌 Examples
  • Handwritten digit recognition with a neural network: tune learning rate, batch size, number of epochs and number of hidden neurons to maximize test accuracy.
  • Random Forest for credit scoring: tune number of trees (n_estimators), max tree depth, and min_samples_split to balance bias and variance for better predictions.
  • k-NN for recommendation or classification: choose k (number of neighbors) and distance metric (Euclidean or Manhattan) to improve accuracy.
  • Linear regression with regularization for house prices: tune regularization strength (lambda) for ridge regression to reduce overfitting.
  • SVM for spam detection: tune C (regularization) and kernel parameters (e.g., gamma) to improve separation of classes.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  2. \[Precision = TP / (TP + FP)\]
    \[Recall = TP / (TP + FN)\]
    \[F1 = 2 * (Precision * Recall) / (Precision + Recall)\]
  3. \[L2-regularized loss (example): J(w) = (1/n) * sum_{i=1..n} Loss(y_i\]
    \[f(x_i\]
    \[w)) + λ * ||w||^2\]
  4. \[Gradient descent weight update (shows learning-rate role): w := w - η * ∇_w Loss\]
    \[where η is the learning rate\]
  5. \[Total grid combinations = ∏_{i=1..m} |S_i| — product of number of candidate values for each of m hyperparameters\]
  6. \[k-fold cross-validation mean score = (1/k) * sum_{j=1..k} score_j\]
⚖️13

Deployment and Integration

💡 KEY CONCEPT SUMMARY

Deployment and Integration

Key Point: Accuracy = (True Positives + True Negatives) / Total predictions

Deployment and Integration is the stage in the AI project cycle where a trained model is moved from a development environment into a real-world application so users can benefit from it. Deployment means making the model available to make predictions (for example via an API, embedded device, or web service). Integration means connecting that deployed model with the rest of the system (user interface, databases, business logic) so the model's outputs are used in workflows.

Key activities:

  • Packaging and serving: Prepare the model for production (export weights, include preprocessing code) and host it using a model server, container (e.g., Docker), or cloud service.
  • APIs and interfaces: Expose prediction endpoints (REST/GraphQL) or embed the model into an app so other parts of the system can call it.
  • Testing: Run unit tests, integration tests and end-to-end tests to ensure correct behaviour with real inputs, and perform user acceptance testing.
  • Monitoring and logging: Continuously track model performance (accuracy, latency, error rates), data drift, and resource use; log inputs and outputs for debugging and auditing.
  • Deployment strategies: Use strategies like Canary releases, Blue/Green deployment or A/B testing to safely roll out updates and compare versions.
  • Maintenance and updates: Retrain or fine-tune models when performance drops (due to new data or concept drift), and provide rollback plans if issues occur.
  • Security & privacy: Ensure data protection, authentication for prediction APIs, and compliance with policies (e.g., anonymisation where required).

Why it matters for Class 10 projects: Without proper deployment and integration, a good model remains a lab experiment. Correct deployment ensures students' AI projects actually work for users, are reliable, and can be safely updated.

📌 Examples
  • School attendance model: A face-recognition model (trained offline) is deployed as a web service and integrated with the school’s management system so attendance is updated automatically when students pass through a gate camera.
  • Chatbot on school website: An NLP model deployed behind an API and integrated into the website so visitors ask questions and get instant answers; logs are used to improve replies.
  • Smart grading: A model that predicts scores or flags answers for review is integrated into an online learning platform, allowing teachers to see suggestions and accept or correct them.
  • Spam filter in email client: A trained classifier deployed on a mail server filters incoming messages; integration ensures filtered messages move to the spam folder automatically.
  • Traffic light control (city demo): A model predicting traffic flow is deployed on an edge device and integrated with traffic signal controllers to adjust timings in real time.
🧮 Formulas
  1. \[Accuracy = (True Positives + True Negatives) / Total predictions\]
  2. \[Precision = True Positives / (True Positives + False Positives)\]
  3. \[Recall (Sensitivity) = True Positives / (True Positives + False Negatives)\]
  4. \[F1-score = 2 * (Precision * Recall) / (Precision + Recall)\]
  5. \[Error rate = 1 - Accuracy = Wrong predictions / Total predictions\]
  6. \[Throughput = Number of requests served / Time (e.g.\]
    \[requests per second)\]
⚖️14

Monitoring, Maintenance and Iteration

💡 KEY CONCEPT SUMMARY

Monitoring, Maintenance and Iteration

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN)

Overview
Monitoring, Maintenance and Iteration are the final and ongoing stages in an AI project cycle. After a model is deployed, you must continuously watch how it performs in the real world (monitoring), keep the system healthy and up-to-date (maintenance), and repeatedly improve the model and data based on what you learn (iteration).

Monitoring — What and Why?

  • Purpose: Detect when a model’s real-world performance falls below expectations so you can act quickly.
  • What to monitor:
    • Performance metrics (accuracy, precision, recall, F1, etc.).
    • Prediction distributions and data drift (changes in incoming data features).
    • Model drift (drop in model performance over time).
    • Operational metrics: latency (response time), throughput (requests/sec), error rates, resource use (CPU/GPU, memory).
    • Business KPIs: conversion rate, false positives cost, customer satisfaction.
  • Tools: dashboards, alerts (thresholds), logging, A/B tests.

Maintenance — How?

  • Data maintenance: fix bugs in data pipelines, label new examples, remove bad data, balance classes if needed.
  • Model maintenance: retrain with new data, tune hyperparameters, update features, prune or replace models.
  • System maintenance: apply software patches, update dependencies, ensure backups and rollback plans.
  • Automation: use CI/CD and MLOps practices to automate testing, retraining, deployment, and monitoring.

Iteration — The Loop

  • Cycle: Monitor → Diagnose (identify cause) → Collect/fix data or change model → Train & evaluate → Deploy → Monitor.
  • Goal: Improve accuracy, fairness, robustness and reduce operational costs. Each iteration should be small, measurable and tested (A/B or shadow testing) before full rollout.

Simple workflow example:

  1. Deploy a spam classifier and monitor its precision and false positive rate.
  2. If false positives rise, inspect new emails for unseen patterns (data drift).
  3. Collect and label representative new samples, retrain the model, validate on test set and A/B test.
  4. Deploy the improved model and continue monitoring.

Best practices & tips

  • Set clear thresholds/alerts for metrics so small degradations are caught early.
  • Keep a baseline (initial model performance) to compare over time.
  • Log inputs and predictions (with privacy safeguards) to allow debugging and retraining.
  • Use gradual rollouts and A/B testing to avoid large regressions in production.
📌 Examples
  • Email spam filter: Monitor increase in false positives. If many legitimate emails are flagged, collect those examples, relabel and retrain the model, then redeploy after testing.
  • Recommendation system (e‑commerce): Monitor click-through rate (CTR). If CTR drops, check for changes in user behavior (data drift), update product metadata and retrain with recent interactions.
  • Fraud detection: Monitor precision and recall. When new fraud patterns appear, label new fraud cases, retrain, and update rules/models to reduce missed frauds.
  • Predictive maintenance in factories: Monitor sensor-data distributions and prediction lead time. If sensor readings shift due to new machinery, retrain models with updated sensor data.
  • Self‑driving car perception model: Monitor object-detection accuracy and latency. After collecting new road-condition images (rain, snow), augment data and iterate model improvements before deploying updates.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  2. \[Precision = TP / (TP + FP)\]
  3. \[Recall (Sensitivity) = TP / (TP + FN)\]
  4. \[F1 Score = 2 * (Precision * Recall) / (Precision + Recall)\]
  5. \[Error Rate = (FP + FN) / (TP + TN + FP + FN) = 1 - Accuracy\]
  6. \[Performance Decay = Baseline_Metric - Current_Metric (used to quantify how much performance dropped since deployment)\]
🌬️15

Ethics, Fairness and Bias

💡 KEY CONCEPT SUMMARY

Ethics, Fairness and Bias

Key Point: Confusion matrix components: TP = true positives, FP = false positives, TN = true negatives, FN = false negatives

What is meant by Ethics, Fairness and Bias in AI?

Ethics in AI refers to the moral principles that guide how AI systems are designed, developed and used so they do not harm people and respect rights such as privacy, transparency and accountability. Fairness means that an AI system treats different groups (for example defined by gender, race, age or disability) in a way that is just and non-discriminatory. Bias is any tendency of the system to systematically favour or disfavor certain groups or outcomes.

Why it matters (short): Biased or unfair AI can cause real harm—denying loans, misdiagnosing patients, or unfairly screening job applicants. Ethics ensures responsibility; fairness and bias analysis helps detect and reduce harm.

Common sources of bias

  • Data bias: Historical data may reflect past discrimination (sampling bias, measurement error, label bias).
  • Algorithmic bias: Choice of model, objective function or training process can amplify biases.
  • Human bias: Biased feature selection, labeling or evaluation criteria.
  • Deployment/context bias: Model used in a context different from the one it was trained for.

Types of fairness concepts (intuitive):

  • Statistical parity: Different groups should receive positive predictions at similar rates.
  • Equalized odds / Equal opportunity: Error rates (true positive or false positive rates) should be similar across groups.
  • Predictive parity (calibration): Predictions of the same score should have similar real outcomes across groups.

Typical workflow to address bias (AI project cycle): 1) Define fairness goals with stakeholders. 2) Explore data and measure group differences. 3) Apply mitigation (pre-, in-, or post-processing). 4) Evaluate using fairness metrics and trade-offs. 5) Monitor after deployment.

Mitigation strategies (brief):

  • Pre-processing: rebalance data (oversampling/undersampling), remove sensitive features, or transform features to reduce correlation with sensitive attributes.
  • In-processing: incorporate fairness constraints or regularizers in model training.
  • Post-processing: adjust predictions or decision thresholds for different groups to satisfy fairness criteria.

Ethical principles and practices: transparency (explainable decisions), accountability (who is responsible), privacy (protect personal data), consent (use data responsibly), continual monitoring and stakeholder involvement.

Trade-offs: Perfect fairness and perfect accuracy may conflict; choices must be made transparently and in consultation with affected people.

📌 Examples
  • Loan approval: A lending model trained on historical loans may reject more applicants from certain neighbourhoods because past data contained biased lending decisions.
  • Hiring / resume screening: An automated resume sorter may prefer candidates with characteristics correlated with a majority group (e.g., certain universities), disadvantaging equally qualified minority applicants.
  • Facial recognition: Systems often have higher error rates for women and people with darker skin tones because training datasets under-represent these groups.
  • Healthcare risk scores: A model predicting health risk may under-estimate risk for a disadvantaged group if historical access to care was unequal, leading to undertreatment.
  • Predictive policing: Crime-prediction tools trained on arrest records can over-police neighbourhoods that were historically over-surveilled, reinforcing bias.
🧮 Formulas
  1. \[Confusion matrix components: TP = true positives\]
    \[FP = false positives\]
    \[TN = true negatives\]
    \[FN = false negatives\]
  2. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  3. \[Precision = TP / (TP + FP)\]
  4. \[Recall (True Positive Rate\]
    \[TPR) = TP / (TP + FN)\]
  5. \[False Positive Rate (FPR) = FP / (FP + TN)\]
  6. \[Statistical parity difference = P(pred = positive | A = unprivileged) - P(pred = positive | A = privileged)\]
⚖️16

Privacy, Security and Legal Considerations

💡 KEY CONCEPT SUMMARY

Privacy, Security and Legal Considerations

Key Point: Precision = TP / (TP + FP) — used to measure false positive behavior of a classifier.

Overview: Privacy, security and legal considerations ensure that an AI project protects individuals' personal data, is resilient to misuse or attacks, and follows laws and ethical norms. These considerations must be applied throughout the AI Project Cycle: planning, data collection, cleaning, model building, evaluation and deployment.

Key principles

  • Data minimization — collect only what is necessary for the purpose.
  • Purpose limitation & consent — use data only for declared purposes and obtain informed consent where required.
  • Anonymization & pseudonymization — remove direct identifiers or replace them to reduce re-identification risk.
  • Confidentiality, Integrity & Availability (CIA) — ensure data is accessed only by authorized people (confidentiality), not tampered with (integrity), and available when needed (availability).
  • Accountability & transparency — keep records of data sources, model choices and decisions; provide explanations to affected users where possible.
  • Bias & fairness — check models for unfair outcomes and mitigate them.
  • Least privilege — give users and systems the minimum permissions needed.

Practical security measures

  • Access control & authentication — passwords, multi-factor authentication, role-based access.
  • Encryption — encrypt data at rest and in transit (TLS for transmission, AES for storage).
  • Secure storage & backups — use secure servers, regular backups, and tested restore procedures.
  • Logging & auditing — keep logs of data access and model updates to detect misuse and support audits.
  • Vulnerability testing — run security tests (penetration testing) and model robustness checks (adversarial examples, membership inference tests).
  • Incident response — prepare a plan to contain breaches, notify affected people and authorities as required.

Legal & ethical requirements

Follow relevant laws and guidelines: data protection regulations (for example, GDPR in the EU; national laws such as the IT Act and applicable personal data protection laws), copyright and intellectual property rules for data and code, sector-specific rules (health, education). For minors, get parental consent when required and follow age-specific protections.

Model documentation & transparency

Provide simple documentation such as data sheets and model cards describing data sources, preprocessing steps, performance metrics, known limitations, and intended uses. This supports accountability and helps users understand risks.

Classroom / student project checklist

  • Ask permission before collecting any personal data; prefer synthetic or public datasets.
  • Remove names/photos or blur faces; store data on secure drives only.
  • Apply basic encryption and strong passwords; never publish raw personal data.
  • Test models for obvious bias; explain to evaluators how the model makes decisions.
  • Document where data came from, consent obtained, and how long data will be kept.

Takeaway: Privacy, security and legal considerations are not an afterthought — they are integrated actions and documentation steps across the AI project cycle that protect people, reduce risk, and ensure lawful, fair and trustworthy AI.

📌 Examples
  • School face-recognition attendance system: must obtain consent, blur or store minimal facial features, encrypt stored images, and provide an opt-out for students/parents.
  • Health-app predicting conditions from symptoms: requires stronger protections (secure servers, restricted access), explicit informed consent, and compliance with health-data laws.
  • Smartphone voice assistant: records can contain private speech — companies must secure recordings, limit retention, and give users controls to delete voice history.
  • Targeted advertising using browsing data: collectors should minimize data, offer choices to users, and avoid using sensitive categories (religion, health) without consent.
  • Model inversion attack risk: an attacker queries a deployed model to infer if a specific person’s record was in the training data — mitigations include differential privacy and access limits.
🧮 Formulas
  1. \[Precision = TP / (TP + FP) — used to measure false positive behavior of a classifier.\]
  2. \[Recall = TP / (TP + FN) — used to measure false negatives\]
    \[important for safety-critical tasks.\]
  3. \[F1 score = 2 * (Precision * Recall) / (Precision + Recall) — harmonic mean balancing precision and recall.\]
  4. \[Differential privacy guarantee: for all outputs S and neighboring datasets D and D'\]
    \[Pr[M(D) ∈ S] ≤ e^ε * Pr[M(D') ∈ S] — ε (epsilon) controls privacy loss.\]
  5. \[Laplace mechanism noise scale: add noise ~ Laplace(Δf / ε) where Δf is function sensitivity and ε is privacy parameter.\]
  6. \[Simple encryption notation: C = E_k(P) and P = D_k(C) where E is encryption with key k\]
    \[D is decryption\]
    \[P is plaintext and C is ciphertext.\]
🤖17

Documentation, Reporting and Visualization

💡 KEY CONCEPT SUMMARY

Documentation, Reporting and Visualization

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN)

What it is: Documentation, Reporting and Visualization is the phase in the AI project cycle where you record what was done, present model results to stakeholders, and use visuals to make findings clear and actionable. Good documentation ensures reproducibility, helps debugging, supports maintenance, and provides transparency. Reporting communicates results to different audiences (technical and non‑technical). Visualization converts data and metrics into intuitive charts and diagrams so decisions can be made quickly.

Key components:

  • Project documentation: project goals, scope, datasets, data dictionary, preprocessing steps, feature engineering, experiments, model architectures, hyperparameters, training procedures, evaluation metrics, limitations and ethical considerations.
  • Experiment tracking & versioning: code versions, dataset versions, model checkpoints, random seeds, environment details (libraries, OS). Tools: Git, DVC, MLflow, TensorBoard.
  • Reporting: executive summary for managers, detailed technical report for engineers, deployment and monitoring plan for DevOps. Include key findings, performance tradeoffs, failure modes and recommended next steps.
  • Visualization: charts and dashboards to show model performance, data distributions, training behavior, feature importance and predicted vs actual results. Tools: Matplotlib/Seaborn, Plotly, Tableau, Power BI.

Best practices:

  • Keep an organized structure: README, data description, experiments folder, results, and notebooks.
  • Write clear, concise executive summaries with the headline result (e.g., accuracy, business impact).
  • Tailor reports to the audience: high level KPIs for stakeholders and full reproducible logs for developers.
  • Use reproducible artifacts: scripts/notebooks, environment files (requirements.txt or environment.yml), and seed values.
  • Include uncertainty and limitations: confidence intervals, known biases, and situations where the model may fail.
  • Use appropriate visuals: choose the chart that matches the message (trend = line chart, comparison = bar chart, composition = pie or stacked bar, distribution = histogram/boxplot).

Why it matters: Clear documentation prevents loss of knowledge, enables safe deployment, supports audits and ethical reviews, and lets teams iterate faster. Effective visualization accelerates comprehension and drives correct decisions from model outputs.

📌 Examples
  • Medical diagnosis: A technical report documents data sources (patient records), preprocessing (handling missing labs), model experiments, and evaluation metrics (precision, recall). A dashboard shows ROC curve, confusion matrix heatmap and feature importance so doctors can see where the model is confident or makes mistakes.
  • School attendance prediction: Documentation records data fields (attendance history, demographics), model used, and thresholds. A report for school administrators gives expected reduction in absenteeism if interventions are deployed. Visuals include time series of predicted vs actual attendance and a bar chart of risk categories.
  • Customer sentiment analysis: The project repo contains dataset samples, preprocessing steps (tokenization, stopwords), model checkpoints and evaluation. A business report summarizes percent positive/negative and highlights common negative phrases; visualizations include word clouds and stacked bar charts by product category.
  • Traffic monitoring in a city: Documentation lists sensors, data frequency and preprocessing. The monitoring dashboard displays live heat maps of congestion, trend lines for peak hours, and a Sankey diagram to show major traffic flows for planners.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  2. \[Precision = TP / (TP + FP)\]
  3. \[Recall (Sensitivity) = TP / (TP + FN)\]
  4. \[F1-score = 2 * (Precision * Recall) / (Precision + Recall)\]
  5. \[Error Rate = (FP + FN) / Total\]
  6. \[Confusion matrix layout (2x2 for binary): [[TP\]
    \[FP],[FN\]
    \[TN]]\]
🧬18

Collaboration, Version Control and Reproducibility

🌿 BIOLOGICAL / NATURE CONCEPT

Collaboration, Version Control and Reproducibility

Key Point: Semantic versioning: MAJOR.MINOR.PATCH (e.g., 2.1.0 where breaking changes increment MAJOR, new features increment MINOR, fixes increment PATCH).

Overview: Collaboration, version control and reproducibility are three closely related practices that make AI projects reliable, understandable and maintainable. Collaboration lets teams work together; version control tracks changes; reproducibility ensures results can be repeated by others.

Collaboration: Working together means dividing tasks (data collection, model, evaluation, report) and sharing work frequently. Good collaboration uses shared storage (GitHub, GitLab), clear roles, conventions (naming, folders) and communication (issues, comments).

Version control (concepts): Version control systems (VCS) like Git let you record the history of files and code. Key ideas:

  • Commit: Save a snapshot with a message describing changes.
  • Branch: Create independent lines of work (feature, bugfix) without disturbing main code.
  • Merge: Combine changes from one branch into another. Conflicts must be resolved.
  • Push/Pull: Send changes to a remote repository or fetch others' changes.
  • Tag/Release: Mark specific commits as versions for easy reference (v1.0.0).

Reproducibility: Reproducibility means someone (or you later) can run the same code on the same data and environment and get the same results. It's essential for verifying experiments and building on prior work.

Why it matters: Without reproducibility you cannot confirm claims, debug results reliably, or reuse models safely. In education, it ensures marks and evaluation are fair; in industry it avoids costly mistakes.

Practical practices to enable reproducibility:

  • Record exact code and commit IDs; include a README explaining how to run the project.
  • Pin dependencies (requirements.txt, environment.yml) and include environment details (Python version, OS).
  • Use containers (Docker) or environment managers to package the environment.
  • Fix random seeds for pseudo-random operations so runs are deterministic when intended.
  • Save data versions and provide checksums (hashes) so dataset integrity can be checked.
  • Log model hyperparameters, training checkpoints and evaluation metrics.
  • Use notebooks with outputs saved or tools like Binder/Colab for interactive reproduction.

Typical workflow combining all three: Start a repo, create branches for features, commit often with informative messages, push to remote, open pull requests for reviews, add clear instructions and environment files, tag a release when a reproducible result is reached, archive data and provide checksums.

📌 Examples
  • Students developing an AI project: each student works on a branch (data-prep, model, report), commits changes, opens pull requests for review, and the teacher checks the final merge and tagged release.
  • Research paper reproduction: authors publish code, data links, a requirements.txt, and a Dockerfile. Reviewers run the Docker image to reproduce reported results exactly.
  • Kaggle competition entry: competitor saves model checkpoints, seeds, and a notebook with clear steps so others can rerun the inference and validate scores.
  • Using Google Docs and GitHub together: draft report collaboratively in Docs; store code, data manifests and experiment logs in GitHub with commits and issues to track tasks.
  • Industry deployment: engineers tag a stable model release (v2.1.0), include a changelog and Docker image, so operations can redeploy the exact tested artifact.
🧮 Formulas
  1. \[Semantic versioning: MAJOR.MINOR.PATCH (e.g., 2.1.0 where breaking changes increment MAJOR\]
    \[new features increment MINOR\]
    \[fixes increment PATCH).\]
  2. \[Reproducibility condition (informal): same_code + same_data + same_environment + same_random_seed => same_results\]
  3. \[Checksum/hash (file integrity): hash = SHA256(file) (useful to verify dataset files have not changed)\]
  4. \[Random seed determinism: RNG_sequence = RNG(seed)\]
    \[Setting seed s makes RNG deterministic (e.g.\]
    \[set_seed(42) => fixed pseudo-random outputs).\]
⛏️19

Tools, Platforms and Resources

💡 KEY CONCEPT SUMMARY

Tools, Platforms and Resources

Key Point: Accuracy = (TP + TN) / (TP + TN + FP + FN)

What this topic covers
In an AI project cycle, "Tools, Platforms and Resources" refers to the software, hardware, online services and reference materials you choose to build, train, evaluate and deploy your AI solution. Choosing the right mix lets you collect data, prepare it, create models, run experiments, test performance and share results safely and efficiently.

Categories

  • Tools (software and utilities): programming languages (Python), libraries (scikit-learn, TensorFlow, PyTorch), IDEs and notebooks (Jupyter, VS Code, Google Colab), annotation tools (LabelImg), data tools (Pandas, OpenRefine), and visualization tools (Matplotlib, Seaborn).
  • Platforms (execution & hosting): cloud notebooks and compute (Google Colab, Kaggle Kernels), cloud ML services (Google Cloud AI Platform, Microsoft Azure ML, IBM Watson), model hosting and APIs, and edge platforms (Raspberry Pi, mobile devices) for deployment.
  • Resources: datasets (MNIST, CIFAR, Kaggle datasets), pretrained models (MobileNet, BERT), APIs (Google Vision API), documentation, tutorials, ethical/guideline resources and version control/collaboration tools (GitHub, Google Drive).

How to choose
Match the tool/platform to the project needs: for small experiments use notebooks (Colab) and standard libraries; for heavy training use GPUs on cloud platforms; for deployment on phones or IoT choose lightweight models and edge platforms. Consider cost, compute requirements, privacy, data size, licensing and students' skill level.

Practical steps in a student AI project

  • Collect data using forms or sensors; store in spreadsheets or CSV files.
  • Label/annotate data with LabelImg or simple Excel tagging.
  • Use Jupyter/Colab to preprocess data (Pandas, NumPy), train models (scikit-learn for classical models; TensorFlow/Keras for neural nets), and visualize results (Matplotlib).
  • Evaluate with standard metrics (accuracy, precision, recall, MSE). Save model artifacts and create a simple demo using a web-service, mobile app or Raspberry Pi.
  • Document steps, cite datasets and note ethical/privacy considerations and any biases.

Safety, ethics and practical constraints
Be mindful of data privacy (avoid sharing personal data without consent), licence restrictions on datasets or models, compute costs for cloud GPUs, and possible biases in datasets. Use version control (GitHub) and reproducible notebooks so results can be checked and improved.

Summary
Tools let you write and run code and annotate data. Platforms provide compute and hosting. Resources are datasets, models and documentation. Correct choices reduce development time and help build reliable, responsible AI projects suitable for Class 10 level experiments.

📌 Examples
  • Image classifier project: Collect images, annotate with LabelImg, train a CNN in Google Colab using TensorFlow, evaluate accuracy, and deploy a lightweight MobileNet model on a smartphone or Raspberry Pi.
  • Text sentiment classifier: Use a Google Form to collect short reviews, clean data in Google Sheets, train a simple logistic regression model with scikit-learn in a Jupyter notebook and evaluate using precision, recall and F1-score.
  • Teachable Machine demo: Use Google Teachable Machine to build a gesture recognizer without code, export a TensorFlow.js model and run it in a browser.
  • Kaggle Notebook pipeline: Use a Kaggle dataset, preprocess in a Kaggle notebook, try multiple models (Decision Tree, Random Forest), compare results and submit predictions.
  • Using APIs: Send images to Google Vision API to detect objects and use those labels as features for a downstream classification model.
🧮 Formulas
  1. \[Accuracy = (TP + TN) / (TP + TN + FP + FN)\]
  2. \[Precision = TP / (TP + FP)\]
  3. \[Recall (Sensitivity) = TP / (TP + FN)\]
  4. \[F1-score = 2 * (Precision * Recall) / (Precision + Recall)\]
  5. \[Mean Squared Error (MSE) = (1/n) * Σ (y_pred_i - y_true_i)^2\]
  6. \[Simple linear model: y = m*x + c (used in basic regression examples)\]

Key Concepts

Problem statement
A clear, specific description of the task the AI system should solve, including inputs, outputs and constraints.
Use case
A real-world scenario that describes how the AI solution will be applied to meet user needs.
Stakeholders
People or groups affected by or interested in the AI project, whose needs shape requirements and evaluation.
Dataset
A structured collection of examples (records, images, text) used to train and evaluate an AI model.
Data collection
The process of gathering relevant data from sources such as sensors, databases or surveys for the project.
Data cleaning
Removing or correcting errors, handling missing values and ensuring consistency in the dataset.
Feature engineering
Creating or transforming input variables (features) to improve model performance.
Labeling/Annotation
Assigning correct target values or tags to data examples used for supervised learning.
Train/Validation/Test split
Dividing the dataset into parts for training the model, tuning it, and evaluating final performance.
Model selection
Choosing the appropriate algorithm or architecture based on problem type, data and constraints.
Training
The process where the chosen model learns patterns from the training data by adjusting its parameters.
Validation
Using a separate dataset to tune model choices and hyperparameters to avoid overfitting.
Evaluation metrics
Quantitative measures used to assess model performance, such as accuracy, precision or recall.
Baseline model
A simple initial model or heuristic used as a reference to judge improvements from more complex models.
Overfitting
When a model learns noise and specific patterns in training data, performing poorly on new data.
Underfitting
When a model is too simple to capture the underlying patterns, giving poor performance on both training and test data.
Cross-validation
A technique that splits data into multiple folds to reliably estimate model performance and reduce variance.
Hyperparameter tuning
Searching for the best settings (hyperparameters) that control model behavior, like learning rate or tree depth.
Deployment
Making the trained AI model available for real users, often via an app, API or embedded system.
Monitoring & Maintenance
Continuously tracking model performance in production and updating it when performance degrades or data changes.

Practice Questions

  1. List the main stages of the AI Project Cycle in order. / AI प्रोजेक्ट चक्र के मुख्य चरणों को क्रम में सूचीबद्ध कीजिए।
    Show answer

    Define the problem, collect data, prepare and clean data, choose model and features, train the model, evaluate the model, deploy, and then monitor and maintain; the cycle is iterative, so evaluation often leads back to earlier stages. / समस्या परिभाषित करना, डेटा एकत्र करना, डेटा तैयार और साफ़ करना, मॉडल और विशेषताएँ चुनना, मॉडल को प्रशिक्षित करना, मॉडल का मूल्यांकन करना, परिनियोजन (डिप्लॉय) करना, और फिर निगरानी व रखरखाव करना; यह चक्र पुनरावृत्तीय है, इसलिए मूल्यांकन प्रायः पहले के चरणों की ओर लौटाता है।

  2. Why is problem identification considered the most important stage of the AI project cycle? / समस्या की पहचान को AI प्रोजेक्ट चक्र का सबसे महत्वपूर्ण चरण क्यों माना जाता है?
    Show answer

    Because a clearly defined problem with measurable success criteria guides data collection, model choice, evaluation and deployment; if the problem is vague, the team may build the wrong model or collect the wrong data, wasting time and cost. / क्योंकि मापने योग्य सफलता मानदंड के साथ स्पष्ट रूप से परिभाषित समस्या डेटा संग्रह, मॉडल चयन, मूल्यांकन और परिनियोजन को मार्गदर्शन देती है; यदि समस्या अस्पष्ट है तो टीम गलत मॉडल बना सकती है या गलत डेटा एकत्र कर सकती है, जिससे समय और लागत बर्बाद होती है।

  3. What does it mean to make a problem statement 'SMART'? / किसी समस्या कथन को 'SMART' बनाने का क्या अर्थ है?
    Show answer

    A SMART problem statement is Specific, Measurable, Achievable, Relevant and Time-bound, which makes the project goal clear and its success objectively assessable. / SMART समस्या कथन विशिष्ट (Specific), मापने योग्य (Measurable), प्राप्य (Achievable), प्रासंगिक (Relevant) और समय-बद्ध (Time-bound) होता है, जो परियोजना के लक्ष्य को स्पष्ट और उसकी सफलता को वस्तुनिष्ठ रूप से आकलन योग्य बनाता है।

  4. Explain two common data problems to watch for during data collection. / डेटा संग्रह के दौरान ध्यान रखने योग्य दो सामान्य डेटा समस्याओं को समझाइए।
    Show answer

    Class imbalance occurs when one label is far more frequent than others, which can bias the model toward the majority class; non-representative sampling occurs when the collected data does not reflect the real population, leading to biased and unreliable predictions. / वर्ग असंतुलन तब होता है जब एक लेबल दूसरों की तुलना में बहुत अधिक बार आता है, जिससे मॉडल बहुसंख्यक वर्ग की ओर पक्षपाती हो सकता है; गैर-प्रतिनिधि नमूनाकरण तब होता है जब एकत्रित डेटा वास्तविक जनसंख्या को नहीं दर्शाता, जिससे पक्षपाती और अविश्वसनीय भविष्यवाणियाँ होती हैं।

  5. Why is data labeling and annotation important, and how is inter-annotator agreement measured? / डेटा लेबलिंग और एनोटेशन क्यों महत्वपूर्ण है, और एनोटेटर-अंतर सहमति को कैसे मापा जाता है?
    Show answer

    Labeling adds meaningful tags to raw data to create the 'ground truth' used to train and test models, so good labels directly affect accuracy and fairness; inter-annotator agreement is measured using Cohen's Kappa = (Po − Pe) / (1 − Pe), where Po is observed agreement and Pe is agreement expected by chance. / लेबलिंग कच्चे डेटा में सार्थक टैग जोड़कर 'ग्राउंड ट्रुथ' बनाती है जिसका उपयोग मॉडल को प्रशिक्षित और परखने में होता है, इसलिए अच्छे लेबल सीधे सटीकता और निष्पक्षता को प्रभावित करते हैं; एनोटेटर-अंतर सहमति को कोहेन कप्पा = (Po − Pe) / (1 − Pe) से मापा जाता है, जहाँ Po प्रेक्षित सहमति और Pe संयोग से अपेक्षित सहमति है।

  6. Why do we split data into training, validation and test sets, and what problem does it prevent? / हम डेटा को प्रशिक्षण, सत्यापन और परीक्षण समुच्चयों में क्यों विभाजित करते हैं, और यह किस समस्या को रोकता है?
    Show answer

    The training set teaches the model, the validation set tunes hyperparameters and decides when to stop, and the test set gives an unbiased estimate of real-world performance; this split prevents overfitting, where a model memorises training data but fails on new data. / प्रशिक्षण समुच्चय मॉडल को सिखाता है, सत्यापन समुच्चय हाइपरपैरामीटर समायोजित करता है और रुकने का समय तय करता है, और परीक्षण समुच्चय वास्तविक प्रदर्शन का निष्पक्ष अनुमान देता है; यह विभाजन ओवरफिटिंग को रोकता है, जिसमें मॉडल प्रशिक्षण डेटा रट लेता है किंतु नए डेटा पर असफल रहता है।

  7. A model has Precision = 0.8 and Recall = 0.6. Calculate its F1-score. / एक मॉडल की Precision = 0.8 और Recall = 0.6 है। इसके F1-स्कोर की गणना कीजिए।
    Show answer

    F1 = 2 × (Precision × Recall) / (Precision + Recall) = 2 × (0.8 × 0.6) / (0.8 + 0.6) = 2 × 0.48 / 1.4 = 0.96 / 1.4 ≈ 0.686. / F1 = 2 × (Precision × Recall) / (Precision + Recall) = 2 × (0.8 × 0.6) / (0.8 + 0.6) = 2 × 0.48 / 1.4 = 0.96 / 1.4 ≈ 0.686।

  8. What is hyperparameter tuning, and how does grid search differ from random search? / हाइपरपैरामीटर ट्यूनिंग क्या है, और ग्रिड सर्च रैंडम सर्च से कैसे भिन्न है?
    Show answer

    Hyperparameter tuning is choosing the best settings (like learning rate, tree depth, k in k-NN) that are set before training and not learned from data; grid search tries every combination from defined value lists (exhaustive but costly), while random search samples random combinations and is often more efficient when only some hyperparameters matter. / हाइपरपैरामीटर ट्यूनिंग सर्वोत्तम सेटिंग्स (जैसे लर्निंग रेट, ट्री गहराई, k-NN में k) चुनना है जो प्रशिक्षण से पहले निर्धारित होती हैं और डेटा से नहीं सीखी जातीं; ग्रिड सर्च परिभाषित मान सूचियों से हर संयोजन आज़माता है (संपूर्ण किंतु महँगा), जबकि रैंडम सर्च यादृच्छिक संयोजनों का नमूना लेता है और प्रायः अधिक कुशल होता है जब केवल कुछ हाइपरपैरामीटर महत्वपूर्ण हों।

Related Laws & Principles

Explore all

Foundational laws & principles connected to this chapter — tap to open in the Laws Explorer.

Loading related laws…
Sourced from 249 content files · LLOS Learn · browse all chapters