Curriculum
Course: Artificial intelligence (AI) and machine...
Login
Text lesson

Week 4: Self-Study Notes

Study-Friendly Structure

Each section includes:

  • Key Concepts (Simplified theory).
  • Practical Examples (Hands-on coding examples).
  • Exercises (Practice tasks for reinforcement).

English Version

Week 4: Advanced Topics and Capstone Project


1. Deep Learning Concepts

Deep learning expands neural networks into multi-layer architectures for advanced problem-solving.

Key Topics:

  • Convolutional Neural Networks (CNNs): Used in image processing and computer vision tasks.
  • Recurrent Neural Networks (RNNs): Handles sequential data, such as time series or text.

Practical Steps:

  1. Building a CNN for Image Classification:

    python
    from tensorflow.keras.models import Sequential
    from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
    model = Sequential([
    Conv2D(32, (3, 3), activation='relu', input_shape=(64, 64, 3)),
    MaxPooling2D(pool_size=(2, 2)),
    Flatten(),
    Dense(128, activation='relu'),
    Dense(1, activation='sigmoid')
    ])
    model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
    print(model.summary())
  2. Building an RNN for Sequence Prediction:

    python
    from tensorflow.keras.models import Sequential
    from tensorflow.keras.layers import SimpleRNN, Dense
    import numpy as np
    model = Sequential([
    SimpleRNN(50, input_shape=(10, 1), activation='relu'),
    Dense(1)
    ])
    model.compile(optimizer='adam', loss='mean_squared_error')
    print(model.summary())

Quick Exercise:

  • Implement a CNN for a simple image dataset like MNIST.
  • Train an RNN to predict the next value in a sequence.

2. AI Ethics and Responsible AI

AI should be designed and used responsibly to avoid bias, discrimination, and harm.

Key Concepts:

  • Bias in AI Models: Unfair predictions due to skewed data.
  • Explainability: AI decisions must be interpretable by humans.
  • Fairness: AI should treat all individuals equally.

Practical Exercise:

  • Identify ethical concerns in an AI application you use daily (e.g., social media algorithms).
  • Discuss how these concerns can be mitigated.

3. Capstone Project

This is the final practical task that integrates all concepts learned so far.

Project Ideas:

  1. AI for Image Classification:

    • Build a model that classifies images into categories like cats and dogs.
  2. AI for Sentiment Analysis:

    • Create an AI tool to classify text into positive, negative, or neutral sentiments.
  3. AI for Predictive Analytics:

    • Use historical data to forecast future trends, such as sales or weather patterns.

Guidelines for the Capstone Project:

  • Define the problem statement clearly.
  • Prepare the dataset.
  • Build and train the model.
  • Evaluate model performance and document findings.

සිංහල අනුවාදය

4 වන සතිය: උසස් මාතෘකා සහ සමුදා ආරම්භක ව්‍යාපෘතිය


1. ගැඹුරු ඉගෙනුම් සංකල්ප

ගැඹුරු ඉගෙනුම පළාත් රැසක් සහිත මලලජාල අතුරින් සංකීර්ණ ගැටලු සඳහා විසඳුම් සොයයි.

ප්‍රධාන මාතෘකා:

  • CNNs (Convolutional Neural Networks): රූප සැකසීමේදී භාවිතා වේ.
  • RNNs (Recurrent Neural Networks): අනුපිළිවෙළ දත්ත සඳහා යොදාගන්නා ලදී.

ප්‍රායෝගික පියවර:

  1. රූප වර්ගීකරණය සඳහා CNN සාදන්න:

    python
    from tensorflow.keras.models import Sequential
    from tensorflow.keras.layers import Conv2D, MaxPooling2D, Flatten, Dense
    model = Sequential([
    Conv2D(32, (3, 3), activation='relu', input_shape=(64, 64, 3)),
    MaxPooling2D(pool_size=(2, 2)),
    Flatten(),
    Dense(128, activation='relu'),
    Dense(1, activation='sigmoid')
    ])
    model.compile(optimizer='adam', loss='binary_crossentropy', metrics=['accuracy'])
    print(model.summary())
  2. අනුපිළිවෙළ අනාවැකිය සඳහා RNN සාදන්න:

    python
    from tensorflow.keras.models import Sequential
    from tensorflow.keras.layers import SimpleRNN, Dense
    import numpy as np
    model = Sequential([
    SimpleRNN(50, input_shape=(10, 1), activation='relu'),
    Dense(1)
    ])
    model.compile(optimizer='adam', loss='mean_squared_error')
    print(model.summary())

දඩුකාරකම:

  • සරල රූප දත්ත කට්ටලයක් මත CNN ක්‍රියාත්මක කරන්න.
  • අනුපිළිවෙළ දත්ත සඳහා RNN පුහුණු කරන්න.

2. AI ආචාරශීලය සහ වගකීමකින් යුතු AI

AI වගකීමකින් සහ ආචාරශීලයෙන් නිර්මාණය කළ යුතුය.

ප්‍රධාන සංකල්ප:

  • විකෘතිකරණය: අයුක්ත දත්ත නිසා අසාධාරණ අනාවැකිය.
  • සඳහන් කිරීමේ හැකියාව: AI තීරණ මිනිසුන්ට පැහැදිලි කළ හැකි යුතුය.
  • සාධාරණත්වය: සෑම අයෙකුටම AI සම ආකාරයෙන් වග බලාගත යුතුය.

ප්‍රායෝගික කාර්යය:

  • ඔබ පාවිච්චි කරන AI යෙදුමක් තුළ ආචාරශීලීය ගැටළු හඳුනාගන්න.
  • ඒවා පාලනය කිරීමේ ක්‍රම ගැන විවරණය කරන්න.

3. සමුදා ආරම්භක ව්‍යාපෘතිය

මෙය ඉගෙනුම සකස් කළ සියලුම සංකල්ප එකතු කරන අවසන් ක්‍රියාවිධිය වේ.

ව්‍යාපෘති යෝජනා:

  1. AI මගින් රූප වර්ගීකරණය:

    • මෝඩලයක් සාදන්න, රූප කාණ්ඩ වර්ගීකරණය සඳහා.
  2. AI මගින් සංවේදන විශ්ලේෂණය:

    • ගණිත, අනුමානකරණය සොයා ගන්න.
  3. AI මගින් අනාවැකියක්:

    • අතීත දත්ත මත මීළඟ ප්‍රවණතාවයන් අනාවැකියක් ලබාදෙන්න.

ව්‍යාපෘති සීමාවන්:

  • ගැටලුවේ නිවැරදි විවරණයක් ලබා දෙන්න.
  • දත්ත සකස් කරන්න.
  • ආදර්ශය සාදන්න.
  • ප්‍රතිඵල ලේඛනය කරන්න.