Artificial Intelligence Study Guide

1. Introduction to AI

  • Definition: AI is the simulation of human intelligence in machines to perform tasks like problem-solving, decision-making, and learning.
  • History of AI: AI evolved through different eras, including rule-based systems, expert systems, and modern machine learning.
  • Why AI is Popular Now:
    • Availability of large datasets (Big Data).
    • Improved computational power (GPUs & TPUs).
    • Advanced machine learning algorithms.

2. Applications of AI

  • AI is used in various fields:
    • Recommendation Systems: (Netflix, Amazon, YouTube)
    • Image Recognition: (Face ID, object detection)
    • Natural Language Processing (NLP): (Chatbots, Google Translate)
    • Healthcare: (Disease diagnosis, robotic surgery)
    • Finance: (Stock market predictions, fraud detection)

3. Machine Learning

Key Terms:

  • Algorithm: A set of rules used by a machine to learn patterns from data.
  • Model: A system trained using an algorithm to recognize patterns and make predictions.
  • Predictor Variable (Independent Variable): Features used as input in the model (e.g., age, income).
  • Response Variable (Dependent Variable): The target outcome we want to predict (e.g., house price, disease risk).
  • Training Data: Data used to teach the model patterns.
  • Testing Data: Data used to evaluate the model’s accuracy.

Types of Machine Learning:

  1. Supervised Learning:

    • The model is trained using labeled data.
    • Example: Email spam detection (Spam/Not Spam).
    • Algorithms: Linear Regression, Decision Trees, Random Forest, Naïve Bayes.
  2. Unsupervised Learning:

    • The model finds hidden patterns in unlabeled data.
    • Example: Customer segmentation in marketing.
    • Algorithms: K-Means Clustering, Principal Component Analysis (PCA).
  3. Reinforcement Learning:

    • AI learns by trial and error using rewards and penalties.
    • Example: Game-playing AI (AlphaGo, Chess AI).
    • Algorithm: Q-Learning.

4. Data Processing

  • Data Cleaning: Removing inconsistencies, missing values, and duplicate records.
  • Feature Engineering: Selecting and transforming input variables for better model accuracy.
  • Data Splitting:
    • 80% Training Set: Used for model training.
    • 20% Testing Set: Used to validate the model’s performance.

5. AI Algorithms

Classification Algorithms:

  • Decision Trees: A flowchart-like structure where each node represents a decision.
  • Random Forest: An ensemble of multiple decision trees to improve accuracy.
  • Naïve Bayes: A probabilistic classifier based on Bayes’ Theorem.
  • K-Nearest Neighbors (KNN): Classifies data based on similarity to neighbors.
  • Support Vector Machines (SVM): Finds the optimal hyperplane to separate data into classes.

Regression Algorithms:

  • Linear Regression: Predicts a continuous variable based on a straight-line relationship.
  • Logistic Regression: Used for binary classification (Yes/No, 0/1).

Clustering Algorithms:

  • K-Means Clustering: Groups similar data points into clusters based on distance.
  • Hierarchical Clustering: Builds a tree-like structure of nested clusters.

6. Neural Networks & Deep Learning

  • Perceptron: The basic unit of a neural network that mimics a biological neuron.
  • Activation Functions: Functions like sigmoid, ReLU, and tanh determine neuron activation.
  • Backpropagation: The method used to train deep neural networks by adjusting weights.
  • Types of Neural Networks:
    • Feedforward Neural Networks (FNN): Data moves in one direction.
    • Convolutional Neural Networks (CNN): Used for image processing.
    • Recurrent Neural Networks (RNN): Used for sequence data like speech and text.

7. Natural Language Processing (NLP)

  • Definition: AI enables computers to understand human language.
  • Common NLP Tasks:
    • Sentiment analysis (positive/negative reviews)
    • Machine translation (Google Translate)
    • Speech recognition (Siri, Alexa)
  • Techniques Used:
    • Stemming: Reduces words to their root form (e.g., “running” → “run”).
    • Lemmatization: Converts words to their base dictionary form (e.g., “better” → “good”).

8. Reinforcement Learning & Q-Learning

  • Agent: The AI system that learns by interacting with the environment.
  • Environment: The system in which the agent operates.
  • Reward Function: The score given for correct or incorrect actions.
  • Q-Table: A matrix that stores the optimal actions for each state.
  • Example: AI playing a game and learning through trial and error.

9. AI Model Evaluation & Performance Metrics

  • Overfitting: The model performs well on training data but poorly on new data.
  • Underfitting: The model is too simple and fails to capture patterns in data.
  • Performance Metrics:
    • Accuracy: Measures correct predictions.
    • Precision & Recall: Used in classification tasks.
    • Confusion Matrix: Shows true positives, false positives, etc.

10. Future of AI

  • Ethical AI: Addressing bias, fairness, and accountability in AI models.
  • AI in Healthcare: Predictive diagnostics, personalized medicine.
  • AI in Education: Smart tutoring systems, automated grading.
  • AI and Automation: Self-driving cars, robotic process automation (RPA).