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

Special Study Note for AI & Machine Learning

Special Study Note for AI & Machine Learning

This note will provide more detailed explanations and examples to help you answer the questions provided earlier. We will cover the following topics in detail: Data Preprocessing, Machine Learning Concepts, Deep Learning, Natural Language Processing, Model Evaluation, and AI Security and Ethics.


1. Data Preprocessing and Cleaning

Before any data can be used for training an AI model, it needs to be preprocessed. Data preprocessing is the step where raw data is cleaned and transformed into a format suitable for analysis.

Key Concepts:

  • Missing Data: Remove or replace missing values in the dataset.
    • Example: Replacing missing values in a column with the mean of that column.
  • Normalization: Scaling data so that features lie within a certain range (e.g., 0 to 1). This is crucial for models like Neural Networks, which are sensitive to the scale of input data.
    • Example: Using Min-Max scaling or Standardization (Z-score normalization).
  • Categorical Data: Convert non-numeric data (like labels or categories) into numeric values. This can be done using techniques like One-Hot Encoding.
    • Example: For a “Color” feature with values [‘Red’, ‘Green’, ‘Blue’], One-Hot Encoding would transform it into three binary features.

2. Machine Learning Basics

Machine Learning (ML) involves creating algorithms that allow computers to learn patterns from data. The main types of ML are:

  • Supervised Learning: The model is trained using labeled data (i.e., data with a known output).
    • Example: Training a model to predict house prices based on features like area, number of rooms, etc.
  • Unsupervised Learning: The model finds hidden patterns or intrinsic structures in data without using labeled outputs.
    • Example: Clustering customers based on their buying behavior (e.g., using K-Means Clustering).
  • Reinforcement Learning: An agent learns by interacting with an environment and receiving feedback in the form of rewards or punishments.
    • Example: A self-driving car learning to navigate a road by trying different actions and receiving feedback.

3. Deep Learning

Deep Learning is a subset of Machine Learning that uses neural networks to learn from large amounts of data. These models are particularly effective for tasks like image recognition and natural language processing.

  • Convolutional Neural Networks (CNN): Used primarily for image processing. CNNs can recognize patterns in images and classify objects within them.
    • Example: Classifying images of cats and dogs.
  • Recurrent Neural Networks (RNN): Used for sequential data like time series or text. RNNs have loops in their architecture to remember information from previous steps.
    • Example: Predicting stock prices based on historical data.
  • Transfer Learning: Involves using a pre-trained model on a new task, reducing the time and data needed for training.
    • Example: Using a model trained on a large image dataset to classify medical images.

4. Natural Language Processing (NLP)

NLP focuses on the interaction between computers and human languages. It is used for tasks like sentiment analysis, translation, and speech recognition.

  • Tokenization: The process of breaking text into smaller units (tokens) such as words or phrases.
    • Example: “I love AI” → [‘I’, ‘love’, ‘AI’]
  • Sentiment Analysis: Determines whether a text is positive, negative, or neutral.
    • Example: Analyzing tweets to determine public sentiment about a product.
  • Word2Vec: A technique used to map words to vectors in a continuous vector space, capturing the semantic meaning of words.
    • Example: “king” and “queen” will be closer in vector space than “king” and “dog.”

5. Model Evaluation and Selection

After building a model, we need to evaluate how well it performs. This can be done using metrics such as accuracy, precision, recall, and F1-score.

  • Accuracy: The percentage of correct predictions.

  • Precision: The percentage of true positives among all predicted positives.

  • Recall: The percentage of true positives among all actual positives.

  • F1-score: The harmonic mean of precision and recall.

  • Cross-Validation: A technique used to assess the model’s performance by dividing the dataset into training and testing subsets. This helps ensure that the model is not overfitting.


6. AI Security and Ethics

AI systems must be developed with ethical considerations and proper security protocols.

  • AI Ethics: Concerns include ensuring fairness, transparency, and accountability in AI systems.
    • Example: Ensuring that AI systems do not discriminate against certain groups of people.
  • AI Security: Protecting AI systems from attacks that could manipulate the model or steal sensitive data.
    • Example: Adversarial attacks where small changes to input data cause incorrect predictions.
  • Privacy: Ensuring that AI models do not expose sensitive personal information during training or prediction.

Special Study Questions

To prepare for the questions:

  1. What is Data Preprocessing?
    Data preprocessing involves steps like data cleaning, handling missing values, normalization, and encoding categorical data.

  2. What is the difference between Supervised and Unsupervised Learning?
    In Supervised Learning, the model is trained using labeled data, while in Unsupervised Learning, the model discovers patterns without labeled data.

  3. What is a Convolutional Neural Network (CNN)?
    A CNN is a type of deep learning model used primarily for image classification, where layers of the network process visual features in images.

  4. Explain Tokenization in NLP.
    Tokenization is the process of breaking text into smaller units, such as words or phrases, to be processed by NLP models.

  5. What is Cross-Validation?
    Cross-validation is a technique used to evaluate a model’s performance by dividing data into subsets for training and testing.


Sinhala Version of the Special Study Note


1. දත්ත පූර්ව සැකසුම් සහ පිරිසිදු කිරීම

AI මොඩලයක් භාවිතා කිරීමට පෙර, එය පූර්ව සැකසීමක් අවශ්‍ය වේ. දත්ත පූර්ව සැකසුම එනම් මූලික දත්ත පිරිසිදු කිරීම සහ විශ්ලේෂණය සඳහා සුදුසු ආකෘතියකට පරිවර්තනය කිරීමයි.

ප්‍රධාන අවධානමන්:

  • අතුරුදන්වූ දත්ත: අතුරුදන්වූ වටිනාකම් මකා දමා හෝ වෙනස් කරන්න.
    • උදාහරණය: සම්පූර්ණ දත්ත තුළ අතුරුදන්වූ වටිනාකම් මතු වන්නේ නම් ඒවා සාමාන්‍ය තක්සේරු කිරීමෙන් පුරවා දමනවා.
  • සාමාන්‍යීකරණය: දත්ත වල පරිමාණය සමාන පරාසයක (උදාහරණයක් ලෙස, 0 සිට 1 අතර) ගෙන යන ක්‍රියාව.
    • උදාහරණය: Min-Max ක්‍රමෝපදේශය හෝ ප්‍රමිතීකරණය.
  • ප්‍රභේදක දත්ත: අංකීය නොවන දත්ත (උදා: ලේබල් හෝ ප්‍රභේද) සංඛ්‍යාත අගයන්ට පරිවර්තනය කිරීම.
    • උදාහරණය: “رේ” දත්ත පිළිබඳව One-Hot Encoding ක්‍රමය.

2. යාන්ත්‍රික අධ්‍යයන මූලිකතා

Machine Learning (ML) යනු පරිගණක පද්ධති තුළ යාන්ත්‍රික ඉගෙනුම මගින් දත්ත වලින් ආදර්ශ ලබා ගැනීමයි.

  • පරීක්ෂිත ඉගෙනුම: පරීක්ෂිත (ලේබල්) දත්ත මත පද්ධතිය පුහුණු කිරීම.
    • උදාහරණය: ගෙවල් මිල පිළිබඳ පූර්ව පදනම.
  • අපරීක්ෂිත ඉගෙනුම: ලේබල් නොවන දත්ත මත පද්ධතිය වඩාත්ම සංකල්පයන් හඳුනා ගැනීම.
    • උදාහරණය: පාරිභෝගික පූර්ව පද්ධති හැඳින්වීම.

3. ගැඹුරු ඉගෙනුම

Deep Learning යනු neural networks මඟින් විශාල පරිමාණයේ දත්ත වලින් ඉගෙනීමේ ක්‍රමවේදයකි.

AI සහ යාන්ත්‍රික අධ්‍යයනය සඳහා විශේෂ අධ්‍යයන සටහන

මෙම සටහන ඔබට උපුටා දක්වා ඇති ප්‍රශ්නවලට පිළිතුරු දීමට උපකාරී වන මාර්ගෝපදේශයක් ලෙස සැලසුම් කර ඇත. පහත පරිච්ඡේදවලින් දත්ත පූර්ව සැකසුම, යාන්ත්‍රික අධ්‍යයනය, ගැඹුරු ඉගෙනුම, ස්වභාවික භාෂා සංකල්පනය, මොඩල පරීක්ෂාව සහ අයි.ඒ. ආරක්ෂාව සහ සමාජ ගුණාත්මක බව යන මාතෘකා පිළිබඳව වඩාත් විස්තරාත්මක විස්තර හා උදාහරණ සපයනු ඇත.


1. දත්ත පූර්ව සැකසුම සහ පිරිසිදු කිරීම

AI මොඩලයක් භාවිතා කිරීමට පෙර, එය පූර්ව සැකසීමක් අවශ්‍ය වේ. දත්ත පූර්ව සැකසුම එනම් මූලික දත්ත පිරිසිදු කිරීම සහ විශ්ලේෂණය සඳහා සුදුසු ආකෘතියකට පරිවර්තනය කිරීමයි.

ප්‍රධාන අවධානමන්:

  • අතුරුදන්වූ දත්ත: අතුරුදන්වූ වටිනාකම් මකා දමා හෝ වෙනස් කරන්න.
    • උදාහරණය: සම්පූර්ණ දත්ත තුළ අතුරුදන්වූ වටිනාකම් මතු වන්නේ නම් ඒවා සාමාන්‍ය තක්සේරු කිරීමෙන් පුරවා දමනවා.
  • සාමාන්‍යීකරණය: දත්ත වල පරිමාණය සමාන පරාසයක (උදාහරණයක් ලෙස, 0 සිට 1 අතර) ගෙන යන ක්‍රියාව.
    • උදාහරණය: Min-Max ක්‍රමෝපදේශය හෝ ප්‍රමිතීකරණය.
  • ප්‍රභේදක දත්ත: අංකීය නොවන දත්ත (උදා: ලේබල් හෝ ප්‍රභේද) සංඛ්‍යාත අගයන්ට පරිවර්තනය කිරීම.
    • උදාහරණය: “Color” ප්‍රභේදයක් ඇති දත්තයක් වෙනස් කිරීම, එය One-Hot Encoding මගින් වඩා සුවිශේෂී බවක් ලබා ගැනීමට.

2. යාන්ත්‍රික අධ්‍යයන මූලිකතා

Machine Learning (ML) යනු පරිගණක පද්ධති තුළ යාන්ත්‍රික ඉගෙනුම මගින් දත්ත වලින් ආදර්ශ ලබා ගැනීමයි.

  • පරීක්ෂිත ඉගෙනුම: පරීක්ෂිත (ලේබල්) දත්ත මත පද්ධතිය පුහුණු කිරීම.
    • උදාහරණය: ගෙවල් මිල පිළිබඳ පූර්ව පදනම.
  • අපරීක්ෂිත ඉගෙනුම: ලේබල් නොවන දත්ත මත පද්ධතිය වඩාත්ම සංකල්පයන් හඳුනා ගැනීම.
    • උදාහරණය: පාරිභෝගික පූර්ව පද්ධති හැඳින්වීම.
  • සංස්කරණ ඉගෙනුම: පද්ධතිය වටපිටිය සමඟ කටයුතු කිරීමේදී ප්‍රතිචාර හෝ පූර්ව සම්මාන ලබා ගනිමින් ඉගෙනීම.
    • උදාහරණය: ස්වයං-යතික රථයක් ඉගෙනීම.

3. ගැඹුරු ඉගෙනුම

Deep Learning යනු neural networks මඟින් විශාල පරිමාණයේ දත්ත වලින් ඉගෙනීමේ ක්‍රමවේදයකි. මෙම ක්‍රමය විශේෂයෙන් රූප හඳුනා ගැනීම සහ ස්වභාවික භාෂා සංකල්පනය සඳහා ගැඹුරු ලෙස යෙදේ.

  • Convolutional Neural Networks (CNN): පරිච්ඡේද රූප හඳුනා ගැනීමට භාවිතා වන deep learning මොඩලයක්.
    • උදාහරණය: පික්ස්ටර් එකේ පළාත් හඳුනා ගැනීම.
  • Recurrent Neural Networks (RNN): කාලසමීකෘත දත්ත මත පද්ධතිය පුහුණු කිරීම.
    • උදාහරණය: විකල්ප මූලාධාර හෝ කාල පරිච්ඡේද මත සාක්ෂාංශ කිරීම.
  • Transfer Learning: ප්‍රථමයෙන් පුහුණු කෙරුණු මොඩලයක් භාවිතා කර අලුත් අවස්ථාවකට ඉගෙනීම.
    • උදාහරණය: ගොනු රූපයක් හඳුනා ගැනීමට පුහුණු කරන ලද මොඩලයක් තවත් නිවැරදිව හඳුනා ගැනීම.

4. ස්වභාවික භාෂා සංකල්පනය (NLP)

NLP, පරිගණක සහ මනුෂ්‍ය භාෂා අතර අන්තර්ගතයයි. එය පද්ධතියන්ට භාෂා හඳුනා ගැනීම, පරිවර්තනය, හෝ කතා බස භාවිතා කරයි.

  • Tokenization: පෙළ ප්‍රකාශනයේ කුඩා ඒකක (token) වලට භාජනය කිරීම.
    • උදාහරණය: “I love AI” → [“I”, “love”, “AI”]
  • Sentiment Analysis: පෙළක සම්ප්‍රේෂණය හෝ සංකල්පය හඳුනා ගැනීම.
    • උදාහරණය: පාරිභෝගික විචාරයන්, පොදු සැලැස්වීම.
  • Word2Vec: වචනවල තේරුම් කුටියක් සහිතව, vector ඉන්දෙණික් වාත්තු වලට පරිවර්තනය කිරීම.
    • උදාහරණය: “king” සහ “queen” අතර සමීපව එකට වර්ගීකෘත කිරීම.

5. මොඩල පරීක්ෂාව සහ තේරීම

මොඩලයක් නිර්මාණය කිරීමෙන් පසුව එය කුමන තාක්‍ෂණික ප්‍රතිඵලයක් ලබා දෙනවාදැයි පරීක්ෂා කිරීමේ ක්‍රියාවලියයි. Accuracy, Precision, Recall, F1-Score යන මට්ටම් පරීක්ෂා කිරීම.

  • Accuracy: නිවැරදි ප්‍රතිඵල ගණන.

  • Precision: predicted positive class තුලින්, කුමන ප්‍රමාණය හොඳයි.

  • Recall: actual positive class තුලින්, කුමන ප්‍රමාණයක් හොඳයි.

  • F1-Score: Precision සහ Recall එකට ගණනාලු කිරීම.

  • Cross-Validation: පරීක්ෂා කිරීමේදී training හා testing data sets වෙන්කර මෙම ක්‍රමය භාවිතා කිරීම.


6. අයි.ඒ ආරක්ෂාව සහ සමාජ ගුණාත්මක බව

AI ක්ෂේත්‍රයේ සංවර්ධනයට අදාළව ගුණාත්මකභාවය සහ ආරක්ෂාව පිළිබඳව වැඩි අවධානයක් අවශ්‍ය වේ.

  • AI Ethics: AI පද්ධති තුල සාධාරණතාව, ප්‍රඥාව සහ පාරදීමේ රහස්‍යතාව පිළිබඳව මනෝභාවයක්.
    • උදාහරණය: AI පද්ධති මගින් කුමන වශයෙන් හෝ පද්ධති පදනම් කිරීම.
  • AI Security: AI පද්ධති ආරක්ෂිතවම පවත්වා ගැනීම.
    • උදාහරණය: කුමුදු භාග හෝ ඒවා පරීක්ෂා කරන ආකාරය.

විශේෂ අධ්‍යයන ප්‍රශ්න

මෙම විශේෂ සටහන් මගින් ඔබට පහත විෂයයන්ට පිළිතුරු සපයන්න පහසු වේ:

  1. Data Preprocessing කියන්නෙ මොකක්ද?
  2. Supervised Learning සහ Unsupervised Learning අතර වෙනස්කම් මොනවාද?
  3. Convolutional Neural Networks (CNN) කියන එකයි මොකක්ද?
  4. Tokenization කියන්නේ මොකක්ද?
  5. Cross-Validation මොනවාද, එය කෙරෙයිද?

7. AI පද්ධති සහ මනෝ-කෘතික මට්ටම්

AI ක්ෂේත්‍රයේ මනෝ-කෘතික සහ සාධාරණ මට්ටම් පිළිබඳව සමාජයේ වැදගත් කටයුතු ගැන කතා කරනවා. මෙම අංශය AI ක්ෂේත්‍රය තුල ඇති වූ මනාපයන් හා පරිසර පද්ධති නිර්මාණය පිළිබඳව බහුලව අවධානය යොමු කරයි.

  • Algorithmic Bias: පද්ධතියක් නිර්මාණය කිරීමේදී දත්ත මත පදනම්ව ඇති විය හැකි විවිධ පූර්ව මතයන්.
    • උදාහරණය: AI මගින් පෙනෙන වර්ග, වයස හෝ ජාතික භේදවලට අනුව නිෂ්පාදන කළ හැකිය.
  • Fairness in AI: ක්ෂේත්‍රයේ පද්ධති නිර්මාණයේ සාධාරණතාවය.
    • උදාහරණය: එක්කෝ එම පද්ධතිය පරිසරයට හානි නොකරයි.
  • Accountability: AI ක්ෂේත්‍රයේ පද්ධති නිර්මාණයේ වගකීම්.
    • උදාහරණය: AI පද්ධතියක් නිර්මාණය කිරීමේදී එහි නිර්මාණයට වගකීමක් ගැනීම.

8. මිනිස්-සංස්කෘතික සහ භාවනික වර්ධනය

AI සමාජයෙහි භාවනික වර්ධනය සලසමින් එවක් පිළිබඳව නිර්මාණය සහ භාවිතා කිරීම් මගින් සාධාරණයක්, කාර්යක්ෂමත්වය සහ පරිසරයේ වඩාත් ප්‍රාථමික ලෙස පරිශීලනය කිරීමට උදාහරණයයි.

  • AI for Good: සමාජයට සහ පාරිසරික ප්‍රතිපත්තියට හෝ ලාභ හෝ අඩු කල හැකි AI.
    • උදාහරණය: හදිසි සේවා වඩාත් ක්ෂේමීකෘත කරමින්.
  • Sustainability and AI: ක්ෂේමීකාරී පද්ධති නිර්මාණය හා පරිසර පද්ධති.
    • උදාහරණය: නිවාස, බලශක්ති, දුෂ්කර මට්ටමේ AI මූලිකයන්.

9. නවීන AI යාන්ත්‍රිකයන් සහ එවක් පිළිබඳ දෘෂ්ටි

අද සමයේ, AI හා Machine Learning ක්ෂේත්‍රයේ නවීන ක්‍රම හා කාර්යක්ෂමතා දෘෂ්ටි කාලයත් සමඟ වැදගත් වන්නේ AI පිළිබඳ සාර්ථකත්වය පවත්වා ගැනීමයි.

  • AI Tools and Frameworks: AI සෑදීම සඳහා අංග සහ භාවිතා කළ හැකි මෙවලම්.
    • උදාහරණය: TensorFlow, Keras, PyTorch.
  • Future Trends in AI: අනාගතයේ AI ක්ෂේත්‍රයේ උච්ච භාවනික තාක්‍ෂණය සහ ඉහළ නවීන සැලසුම්.
    • උදාහරණය: Quantum Computing, Autonomous Systems.

10. තොරතුරු නිශ්පාදනය හා අනාගත මනා පතනය

AI ක්ෂේත්‍රයේ අවසාන නවීන මට්ටමක් මිනිස් මනෝභාවය සහ සංවර්ධනය සඳහා ප්‍රතිලාභ හා තොරතුරු නිෂ්පාදනයි.

  • Data-driven Decision Making: දත්ත මත පදනම්ව නිෂ්පාදන හා තීරණ ගැනීම.
    • උදාහරණය: නව පාරිභෝගික විකුණුම් මාර්ග හඳුනා ගැනීම.
  • AI-Powered Innovation: අලුත් යාන්ත්‍රික, සමාජමය සහ කාර්‍යාංශයේ ක්‍රම නිර්මාණය.
    • උදාහරණය: අලුත් පද්ධති වර්ධනය, වඩාත් ක්ෂේමීකෘත ක්‍රම.

විශේෂ අධ්‍යයන ප්‍රශ්න

මෙම අධ්‍යයන සටහන මඟින් ඔබට පහත සටහන්වූ විෂයයන්ට පිළිතුරු සපයන්න පහසු වේ:

  1. Algorithmic Bias කියන එකයි මොකක්ද?
  2. AI for Good කියන එකයි මොකක්ද?
  3. Recurrent Neural Networks (RNN) මොකක්ද?
  4. Data-driven Decision Making කුමක්ද?
  5. AI-Powered Innovation කියන එකයි මොකක්ද?
  6. Fairness in AI කියන්නේ මොනවාද?

සමීකෘත පසුබැසීම

ඔබට ඉක්මනින් AI සහ යාන්ත්‍රික අධ්‍යයනය පිළිබඳව නිවැරදිව පැහැදිලි කිරීමට මෙම සටහන සහ විශේෂ අධ්‍යයන ප්‍රශ්න ප්‍රයෝජනවත් වනු ඇත. මේවා සියල්ල ඔබේ අවබෝධය තවදුරටත් වර්ධනය කිරීමට සහ සාර්ථක ලෙස ප්‍රශ්න වලට පිළිතුරු දීමට උපකාරී වනු ඇත.