Assam HS Skill Subject Artificial Intelligence study materials
Assam HS Skill Subject Artificial Intelligence study resources

Assam HS Skill Subject Artificial Intelligence cheat sheet

Assam HS Skill Subject Artificial Intelligence · Keep the key ideas within reach.

Quick reference

Introduction to Artificial Intelligence

  • Artificial Intelligence (AI) is the field of building systems that perform tasks associated with human intelligence: perception, reasoning, learning, language use, and decision-making.

  • Historical timeline: Turing test proposed 1950; Dartmouth workshop coined 'artificial intelligence' in 1956; expert systems dominated the 1980s; deep learning resurgence began around 2012 with AlexNet.

  • AI vs ML vs DL: AI is the broad goal, machine learning is a subset of AI that learns patterns from data, and deep learning is a subset of ML using multi-layer neural networks.

  • An intelligent agent perceives its environment through sensors and acts through actuators; a rational agent selects the action expected to maximize its performance measure.

  • Agent types by capability: simple reflex agents, model-based reflex agents, goal-based agents, utility-based agents, and learning agents.

  • The environment an agent operates in is described by properties: fully vs partially observable, deterministic vs stochastic, episodic vs sequential, static vs dynamic, discrete vs continuous.

  • Real-world AI applications include recommendation systems, speech assistants, medical image diagnosis, fraud detection, machine translation, autonomous vehicles, and crop-disease detection in agriculture.

  • Rule-based AI follows hand-written logic; learning-based AI infers rules from examples, which is why it needs representative data and evaluation.

Quick reference

Python Programming for AI

  • Core data types: int, float, str, bool, None; mutable containers list and dict, immutable containers tuple and frozenset, and set for unique unordered elements.

  • Control flow: if/elif/else for branching; for loops iterate over iterables; while loops repeat on a condition; break exits a loop, continue skips to the next iteration, and else on a loop runs only if no break occurred.

  • A function is defined with def name(parameters): and returns a value with return; default arguments are evaluated once at definition time, so mutable defaults such as [] should be avoided.

  • List comprehensions follow [expression for item in iterable if condition] and are the idiomatic way to build transformed lists in one line.

  • NumPy arrays (ndarray) store homogeneous elements and support vectorized element-wise operations; shape gives dimensions and reshape changes them without copying data when possible.

  • pandas provides Series (1-D labeled) and DataFrame (2-D labeled table); read_csv loads data, head() previews rows, info() shows dtypes and null counts, describe() gives summary statistics.

  • Missing values in pandas are detected with isna() and handled with dropna() or fillna(); groupby() splits data by a key and aggregates with functions such as mean or sum.

  • Indexing rule: pandas .loc selects by label, .iloc selects by integer position; NumPy slicing follows start:stop:step and excludes the stop index.

Quick reference

Data Literacy and Data Science Fundamentals

  • Data types: structured (tables, relational databases), semi-structured (JSON, XML), and unstructured (text, images, audio); quantitative data is discrete or continuous, qualitative data is nominal or ordinal.

  • Data collection methods include surveys, sensors, web scraping, APIs, transaction logs, and public datasets; sampling may be random, stratified, or systematic.

  • Data cleaning steps: remove duplicates, fix inconsistent formats and typos, handle missing values, treat outliers, and correct data types before analysis.

  • Descriptive statistics: mean is sensitive to outliers, median is robust; mode is the most frequent value; range = max - min; variance is the average squared deviation and standard deviation is its square root.

  • Distribution shape: skewness measures asymmetry, kurtosis measures tail heaviness; a normal distribution is symmetric with mean = median = mode.

  • Correlation coefficient r ranges from -1 to +1 and measures linear association only; correlation does not imply causation.

  • Visualization choice rule: bar charts for categorical comparison, histograms for distribution of one numeric variable, scatter plots for relationship between two numeric variables, line charts for trends over time, box plots for spread and outliers.

  • Data leakage occurs when information from outside the training set influences model building, such as scaling before the train-test split; it inflates reported accuracy.

Quick reference

Machine Learning Concepts

  • Supervised learning uses labeled data (features X plus target y); unsupervised learning finds structure in unlabeled data such as clustering and dimensionality reduction.

  • Classification predicts discrete labels (spam/not spam); regression predicts a continuous value (price, temperature); logistic regression is a classifier despite its name.

  • Common algorithms: linear and logistic regression, decision trees, k-NN, naive Bayes, support vector machines, random forests; k-means and PCA are unsupervised.

  • Train-test split holds out data to estimate generalization; k-fold cross-validation rotates the validation fold k times and averages the scores.

  • Classification metrics: accuracy, precision = TP/(TP+FP), recall = TP/(TP+FN), F1 = 2PR/(P+R); accuracy is misleading on imbalanced classes.

  • Regression metrics: MAE is the mean absolute error, MSE is the mean squared error, RMSE is its square root in target units, and R-squared is the proportion of variance explained.

  • Overfitting means low training error but high test error; remedies include more data, simpler models, regularization (L1/L2), and early stopping. Underfitting means both errors are high.

  • Confusion matrix layout: rows are actual classes, columns are predicted classes; it yields TP, TN, FP, and FN from which all classification metrics derive.

Quick reference

Neural Networks and Deep Learning Basics

  • A perceptron computes a weighted sum of inputs plus bias and passes it through a step function; it can only separate linearly separable data, as the XOR problem shows.

  • A neural network layer computes z = Wx + b followed by a = f(z), where W is the weight matrix, b the bias vector, and f the activation function.

  • Activation functions: sigmoid outputs 0 to 1 and saturates; tanh outputs -1 to 1; ReLU outputs max(0, z) and reduces vanishing gradients; softmax converts a vector into class probabilities summing to 1.

  • Forward propagation computes predictions layer by layer; the loss function measures error, for example cross-entropy for classification and mean squared error for regression.

  • Backpropagation applies the chain rule to compute the gradient of the loss with respect to each weight; gradient descent updates weights as w = w - learning_rate * gradient.

  • A high learning rate causes divergence or oscillation; a very low learning rate makes training slow; mini-batch gradient descent balances speed and stability.

  • Deep learning excels when data is large and unstructured (images, audio, text); it needs more compute and is less interpretable than classical models.

  • Convolutional layers share weights across spatial positions to detect local patterns in images; pooling layers reduce spatial dimensions; dense layers combine features for final output.

Quick reference

Natural Language Processing and Computer Vision

  • Text preprocessing pipeline: lowercasing, removing punctuation, tokenization, stop-word removal, stemming or lemmatization, then vectorization.

  • Bag of Words counts term occurrences and ignores order; TF-IDF weights a term by term frequency times inverse document frequency, down-weighting common terms.

  • Word embeddings map words to dense vectors so that similar meanings are close in vector space; Word2Vec and GloVe are common pretrained embedding methods.

  • A chatbot pipeline has intent classification, entity extraction, dialogue-state tracking, and response generation; rule-based bots match patterns, retrieval bots select from a knowledge base.

  • Chatbot evaluation uses intent accuracy, fallback rate, task completion rate, and human ratings; intents need enough varied training utterances per class.

  • Image classification basics: images are arrays of pixel values, typically height x width x channels; normalization scales pixel values, for example to 0-1 or with dataset mean and standard deviation.

  • Data augmentation (flips, rotations, crops, brightness changes) enlarges the effective training set and reduces overfitting in vision models.

  • Vision metrics mirror classification metrics: accuracy, precision, recall, F1, and top-k accuracy; confusion matrices reveal which classes are confused.

Quick reference

AI Ethics, Bias, Privacy and Societal Impact

  • Responsible AI principles commonly cited: fairness, transparency and explainability, accountability, privacy, safety, and human oversight.

  • Bias sources: historical bias in training data, sampling bias, labeling bias, and proxy variables correlated with protected attributes such as gender or caste.

  • Fairness trade-offs exist: improving parity across groups can reduce overall accuracy, so the fairness metric must be chosen for the context.

  • Data protection practices: collect only necessary data (data minimization), obtain informed consent, anonymize or pseudonymize identifiers, restrict access, and set retention limits.

  • India's Digital Personal Data Protection Act, 2023 governs processing of digital personal data and requires notice, consent, and purpose limitation; it recognizes data principals and data fiduciaries.

  • Job displacement: automation typically substitutes routine and repetitive tasks first and augments judgment-heavy roles; reskilling and task redesign are the standard responses.

  • Transparency tools include model cards, datasheets for datasets, and explainability methods such as feature importance and LIME; high-stakes domains need human-in-the-loop review.

  • Accountability requires an identified owner for each AI system, documented limitations, and an escalation path for harms caused by model errors.

Quick reference

AI Project Lifecycle and Capstone Project

  • Lifecycle stages in order: problem framing, data collection, data preparation, model building, evaluation, deployment, monitoring, and documentation.

  • Problem framing converts a business need into an ML task: state the objective, define the target variable, choose success metrics, and establish a baseline.

  • Feasibility questions: is the required data available and labeled, is the pattern learnable, is the cost of errors acceptable, and is a non-AI rule-based solution sufficient.

  • Dataset preparation: define features and label, split into train/validation/test before preprocessing, handle missing values and class imbalance, and document the data source and version.

  • Model building loop: start with a simple baseline, then compare models with the same split and metric, tune hyperparameters on validation data, and report test results once.

  • Documentation for a capstone includes problem statement, dataset description, preprocessing steps, model and hyperparameters, evaluation results with a confusion matrix, limitations, and ethical considerations.

  • Presentation structure: context and problem, data, approach, results with the key metric, demo, limitations, future work; keep one message per slide and show the metric that matches the stated objective.

  • Deployment and monitoring: models drift as real-world data changes, so track input distributions and performance over time and plan retraining triggers.

Quick reference

Introduction to Artificial Intelligence

  • AI is the field of building systems that perform tasks associated with human intelligence: perception, reasoning, learning, language use, and decision-making.

  • Historical timeline: Turing test proposed 1950; Dartmouth workshop coined 'artificial intelligence' in 1956; expert systems dominated the 1980s; deep learning resurgence began around 2012 with AlexNet.

  • AI vs ML vs DL: AI is the broad goal, machine learning is a subset of AI that learns patterns from data, and deep learning is a subset of ML using multi-layer neural networks.

  • An intelligent agent perceives its environment through sensors and acts through actuators; a rational agent selects the action expected to maximize its performance measure.

  • Agent types by capability: simple reflex agents, model-based reflex agents, goal-based agents, utility-based agents, and learning agents.

  • The environment an agent operates in is described by properties: fully vs partially observable, deterministic vs stochastic, episodic vs sequential, static vs dynamic, discrete vs continuous.

  • Real-world AI applications include recommendation systems, speech assistants, medical image diagnosis, fraud detection, machine translation, autonomous vehicles, and crop-disease detection in agriculture.

  • Rule-based AI follows hand-written logic; learning-based AI infers rules from examples, which is why it needs representative data and evaluation.

Quick reference

Python Programming for AI

  • Core data types: int, float, str, bool, None; mutable containers list and dict, immutable containers tuple and frozenset, and set for unique unordered elements.

  • Control flow: if/elif/else for branching; for loops iterate over iterables; while loops repeat on a condition; break exits a loop, continue skips to the next iteration, and else on a loop runs only if no break occurred.

  • A function is defined with def name(parameters): and returns a value with return; default arguments are evaluated once at definition time, so mutable defaults such as [] should be avoided.

  • List comprehensions follow [expression for item in iterable if condition] and are the idiomatic way to build transformed lists in one line.

  • NumPy arrays (ndarray) store homogeneous elements and support vectorized element-wise operations; shape gives dimensions and reshape changes them without copying data when possible.

  • pandas provides Series (1-D labeled) and DataFrame (2-D labeled table); read_csv loads data, head() previews rows, info() shows dtypes and null counts, describe() gives summary statistics.

  • Missing values in pandas are detected with isna() and handled with dropna() or fillna(); groupby() splits data by a key and aggregates with functions such as mean or sum.

  • Indexing rule: pandas .loc selects by label, .iloc selects by integer position; NumPy slicing follows start:stop:step and excludes the stop index.

Quick reference

Data Literacy and Data Science Fundamentals

  • Data types: structured (tables, relational databases), semi-structured (JSON, XML), and unstructured (text, images, audio); quantitative data is discrete or continuous, qualitative data is nominal or ordinal.

  • Data collection methods include surveys, sensors, web scraping, APIs, transaction logs, and public datasets; sampling may be random, stratified, or systematic.

  • Data cleaning steps: remove duplicates, fix inconsistent formats and typos, handle missing values, treat outliers, and correct data types before analysis.

  • Descriptive statistics: mean is sensitive to outliers, median is robust; mode is the most frequent value; range = max - min; variance is the average squared deviation and standard deviation is its square root.

  • Distribution shape: skewness measures asymmetry, kurtosis measures tail heaviness; a normal distribution is symmetric with mean = median = mode.

  • Correlation coefficient r ranges from -1 to +1 and measures linear association only; correlation does not imply causation.

  • Visualization choice rule: bar charts for categorical comparison, histograms for distribution of one numeric variable, scatter plots for relationship between two numeric variables, line charts for trends over time, box plots for spread and outliers.

  • Data leakage occurs when information from outside the training set influences model building, such as scaling before the train-test split; it inflates reported accuracy.

Quick reference

Machine Learning Concepts

  • Supervised learning uses labeled data (features X plus target y); unsupervised learning finds structure in unlabeled data such as clustering and dimensionality reduction.

  • Classification predicts discrete labels (spam/not spam); regression predicts a continuous value (price, temperature); logistic regression is a classifier despite its name.

  • Common algorithms: linear and logistic regression, decision trees, k-NN, naive Bayes, support vector machines, random forests; k-means and PCA are unsupervised.

  • Train-test split holds out data to estimate generalization; k-fold cross-validation rotates the validation fold k times and averages the scores.

  • Classification metrics: accuracy, precision = TP/(TP+FP), recall = TP/(TP+FN), F1 = 2PR/(P+R); accuracy is misleading on imbalanced classes.

  • Regression metrics: MAE is the mean absolute error, MSE is the mean squared error, RMSE is its square root in target units, and R-squared is the proportion of variance explained.

  • Overfitting means low training error but high test error; remedies include more data, simpler models, regularization (L1/L2), and early stopping. Underfitting means both errors are high.

  • Confusion matrix layout: rows are actual classes, columns are predicted classes; it yields TP, TN, FP, and FN from which all classification metrics derive.

Quick reference

Neural Networks and Deep Learning Basics

  • A perceptron computes a weighted sum of inputs plus bias and passes it through a step function; it can only separate linearly separable data, as the XOR problem shows.

  • A neural network layer computes z = Wx + b followed by a = f(z), where W is the weight matrix, b the bias vector, and f the activation function.

  • Activation functions: sigmoid outputs 0 to 1 and saturates; tanh outputs -1 to 1; ReLU outputs max(0, z) and reduces vanishing gradients; softmax converts a vector into class probabilities summing to 1.

  • Forward propagation computes predictions layer by layer; the loss function measures error, for example cross-entropy for classification and mean squared error for regression.

  • Backpropagation applies the chain rule to compute the gradient of the loss with respect to each weight; gradient descent updates weights as w = w - learning_rate * gradient.

  • A high learning rate causes divergence or oscillation; a very low learning rate makes training slow; mini-batch gradient descent balances speed and stability.

  • Deep learning excels when data is large and unstructured (images, audio, text); it needs more compute and is less interpretable than classical models.

  • Convolutional layers share weights across spatial positions to detect local patterns in images; pooling layers reduce spatial dimensions; dense layers combine features for final output.

Quick reference

Natural Language Processing and Computer Vision

  • Text preprocessing pipeline: lowercasing, removing punctuation, tokenization, stop-word removal, stemming or lemmatization, then vectorization.

  • Bag of Words counts term occurrences and ignores order; TF-IDF weights a term by term frequency times inverse document frequency, down-weighting common terms.

  • Word embeddings map words to dense vectors so that similar meanings are close in vector space; Word2Vec and GloVe are common pretrained embedding methods.

  • A chatbot pipeline has intent classification, entity extraction, dialogue-state tracking, and response generation; rule-based bots match patterns, retrieval bots select from a knowledge base.

  • Chatbot evaluation uses intent accuracy, fallback rate, task completion rate, and human ratings; intents need enough varied training utterances per class.

  • Image classification basics: images are arrays of pixel values, typically height x width x channels; normalization scales pixel values, for example to 0-1 or with dataset mean and standard deviation.

  • Data augmentation (flips, rotations, crops, brightness changes) enlarges the effective training set and reduces overfitting in vision models.

  • Vision metrics mirror classification metrics: accuracy, precision, recall, F1, and top-k accuracy; confusion matrices reveal which classes are confused.

Quick reference

AI Ethics, Bias, Privacy and Societal Impact

  • Responsible AI principles commonly cited: fairness, transparency and explainability, accountability, privacy, safety, and human oversight.

  • Bias sources: historical bias in training data, sampling bias, labeling bias, and proxy variables correlated with protected attributes such as gender or caste.

  • Fairness trade-offs exist: improving parity across groups can reduce overall accuracy, so the fairness metric must be chosen for the context.

  • Data protection practices: collect only necessary data (data minimization), obtain informed consent, anonymize or pseudonymize identifiers, restrict access, and set retention limits.

  • India's Digital Personal Data Protection Act, 2023 governs processing of digital personal data and requires notice, consent, and purpose limitation; it recognizes data principals and data fiduciaries.

  • Job displacement: automation typically substitutes routine and repetitive tasks first and augments judgment-heavy roles; reskilling and task redesign are the standard responses.

  • Transparency tools include model cards, datasheets for datasets, and explainability methods such as feature importance and LIME; high-stakes domains need human-in-the-loop review.

  • Accountability requires an identified owner for each AI system, documented limitations, and an escalation path for harms caused by model errors.

Quick reference

AI Project Lifecycle and Capstone Project

  • Lifecycle stages in order: problem framing, data collection, data preparation, model building, evaluation, deployment, monitoring, and documentation.

  • Problem framing converts a business need into an ML task: state the objective, define the target variable, choose success metrics, and establish a baseline.

  • Feasibility questions: is the required data available and labeled, is the pattern learnable, is the cost of errors acceptable, and is a non-AI rule-based solution sufficient.

  • Dataset preparation: define features and label, split into train/validation/test before preprocessing, handle missing values and class imbalance, and document the data source and version.

  • Model building loop: start with a simple baseline, then compare models with the same split and metric, tune hyperparameters on validation data, and report test results once.

  • Documentation for a capstone includes problem statement, dataset description, preprocessing steps, model and hyperparameters, evaluation results with a confusion matrix, limitations, and ethical considerations.

  • Presentation structure: context and problem, data, approach, results with the key metric, demo, limitations, future work; keep one message per slide and show the metric that matches the stated objective.

  • Deployment and monitoring: models drift as real-world data changes, so track input distributions and performance over time and plan retraining triggers.