What is the RAG (Retrieval-Augmented Generation) 🔥 😳
Think, you are writing an exam. We usually write exams based on what we have memorized. But RAG is like an open book exam. It means we will write the exam using the resources on time, not based on our memory. just like writing answers to the question using a book.
AI models like ChatGPT (actually LLMs) can answer based on their training data set. They cannot provide answers beyond their training data. After integrating the RAG technology, AI models can provide answers by accessing the new outside databases or documents. It will be more accurate than the common answers that return from the LLMs.
Why RAG?🤔 🤔
AI models (LLMs) like ChatGPT and Gemini are brilliant, but they have some limitations,
1. Outdated Data - they trained on past data, because they have no idea about on time information. So they do predict. (Knowledge Cutoff)
2. Hallucinations - sometimes they provide random answers instead of the correct answer.
3. Personal Data - general AI models have no idea about your personal information, like private details or company information.
We can completely mitigate these issues using RAG. How does it work?
This entire process is done through 4 steps,
1. asking a question - think you are asking "can i get a leave?"
2. Retrieve (search) - The AI model (RAG integrated) does not provide the answer directly; it will search your company's HR policies and regulations.
3. Augmented - then the system will collect your problem and the company information and send it to the AL model.
4. generation - now, the AI model is providing an accurate answer after analysing your question with your company details.
Advantages of RAG,😮 😮
👉 Low cost - no need to train an AI model from scratch
👉 Real-time information - if you ask for real time news, you can get answers if they exist in the databases
👉 Stopping hallucination - because the AI model will generate answers based on provided real information.
👉 Sources - The AL model can highlight references based on the provided documents or databases.
As a summary, the RAG(Retrieval-Augmented Generation) is like a bridge between your data and a separate AI model like ChatGPT. We can get highly accurate answers from AI models, providing our information as an outside data source.👍 👍
✍️ @TheInfinityAI
Think, you are writing an exam. We usually write exams based on what we have memorized. But RAG is like an open book exam. It means we will write the exam using the resources on time, not based on our memory. just like writing answers to the question using a book.
AI models like ChatGPT (actually LLMs) can answer based on their training data set. They cannot provide answers beyond their training data. After integrating the RAG technology, AI models can provide answers by accessing the new outside databases or documents. It will be more accurate than the common answers that return from the LLMs.
Why RAG?
AI models (LLMs) like ChatGPT and Gemini are brilliant, but they have some limitations,
1. Outdated Data - they trained on past data, because they have no idea about on time information. So they do predict. (Knowledge Cutoff)
2. Hallucinations - sometimes they provide random answers instead of the correct answer.
3. Personal Data - general AI models have no idea about your personal information, like private details or company information.
We can completely mitigate these issues using RAG. How does it work?
This entire process is done through 4 steps,
1. asking a question - think you are asking "can i get a leave?"
2. Retrieve (search) - The AI model (RAG integrated) does not provide the answer directly; it will search your company's HR policies and regulations.
3. Augmented - then the system will collect your problem and the company information and send it to the AL model.
4. generation - now, the AI model is providing an accurate answer after analysing your question with your company details.
Advantages of RAG,
As a summary, the RAG(Retrieval-Augmented Generation) is like a bridge between your data and a separate AI model like ChatGPT. We can get highly accurate answers from AI models, providing our information as an outside data source.
Please open Telegram to view this post
VIEW IN TELEGRAM
❤4❤🔥1☃1⚡1🔥1🎉1🏆1🎃1🎄1
Please open Telegram to view this post
VIEW IN TELEGRAM
Friends, we all heard about AI (Artificial Intelligence), right? But the basis of all this is Machine Learning (ML). Many people think that this is a very difficult thing, something that is only about math. However, what we hope to learn from this article series is that we can learn ML in everyday language, simply.
Let's learn this in several steps. Today we will start with Phase 1 "The Foundations of ML" as he 1st step.
Phase 1: (The Foundations) 🏗
We must have a strong foundation for every building. Like that, we should know about several basics before starting the ML. We are discussing that things through this article.
01. What is the ML? (the big picture)
Simply, in common computer programming, we are providing data after writing a code, and the code will provide an output. But the ML is doing the opposite. We provide data and the answer. Then the computer figures out on its own how that answer came about. Finally, it creates a "model."
ML have 3 main types,
- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning
02. Need Maths?
Don't worry, the ML is not complex, but some maths parts are important, like.
- Linear Algebra
- Calculus
- Statistics
03 . Data is the Fuel of ML
We cannot expect the correct decisions without accurate data. we should process data before inputting it into the ML models.
- EDA (Exploratory Data Analysis)
- Data cleaning
- Feature engineering
These are the basics of our ML journey. If you study those things, you can easily understand the future articles of this series.
✍️ @TheInfinityAI
Let's learn this in several steps. Today we will start with Phase 1 "The Foundations of ML" as he 1st step.
Phase 1: (The Foundations) 🏗
We must have a strong foundation for every building. Like that, we should know about several basics before starting the ML. We are discussing that things through this article.
01. What is the ML? (the big picture)
Simply, in common computer programming, we are providing data after writing a code, and the code will provide an output. But the ML is doing the opposite. We provide data and the answer. Then the computer figures out on its own how that answer came about. Finally, it creates a "model."
ML have 3 main types,
- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning
02. Need Maths?
Don't worry, the ML is not complex, but some maths parts are important, like.
- Linear Algebra
- Calculus
- Statistics
03 . Data is the Fuel of ML
We cannot expect the correct decisions without accurate data. we should process data before inputting it into the ML models.
- EDA (Exploratory Data Analysis)
- Data cleaning
- Feature engineering
These are the basics of our ML journey. If you study those things, you can easily understand the future articles of this series.
Please open Telegram to view this post
VIEW IN TELEGRAM
❤5👍1
Today, we will discuss an easy but powerful algorithm, which is Regression. Earlier, we discussed Supervised Learning. The regression is a Supervised Learning ML algorithm, which predicts numbers.
What is Regression
Think, you are going to build your dream house. When the square feet of the house increase, the price also increases. In regression, we find the connections between those things.
What is linear regression?
This is the basic concept in regression. In this, we write a line (best-fit line) through our data points. As an example,
• A student got 40 marks who worked 2 hours.
• A student got 60 marks who worked 12 hours.
• A student got 90 marks who worked 2 days.
Linear Regression can find the answer to such a question.
Can you remember the school maths?
We learned about the Equation of a straight line in school. The same thing is used in this. (y = mx + c)
• y = the value that we are looking for (exam score).
• x = the data we already know (hours).
• m = the slope of the line.
• c = the points, whre the line starts.
When we are training a model, we are using a model to find the best values of m and c for our data.
How does the machine correct errors? (Cost Function)
The line the machine first draws sometimes does not go exactly through the data. Now there is a simple error occurring (notable error with a large dataset). We are using the Mean Squared Error (MSE) method to measure this error. Actually, in the MSE, we find the difference between the real value and the value provided by the machine. The machine tries every time to reduce this MSE. Because if MSE is low, our prediction is accurate.
Where is Regression used?
• Stock Market - Predict tomorrow's stock market prices.
• Real Estate - Determine the prices of houses and land.
• Business - See what sales will be next month.
Python example for Linear Regression
I hope you got a basic idea about Regression from today's article. Remember, here we are guessing "Values". In the next article, we will talk about how to find out what category something belongs to (Classification).
✍️ @TheInfinityAI
What is Regression
Think, you are going to build your dream house. When the square feet of the house increase, the price also increases. In regression, we find the connections between those things.
What is linear regression?
This is the basic concept in regression. In this, we write a line (best-fit line) through our data points. As an example,
• A student got 40 marks who worked 2 hours.
• A student got 60 marks who worked 12 hours.
• A student got 90 marks who worked 2 days.
Linear Regression can find the answer to such a question.
Can you remember the school maths?
We learned about the Equation of a straight line in school. The same thing is used in this. (y = mx + c)
• y = the value that we are looking for (exam score).
• x = the data we already know (hours).
• m = the slope of the line.
• c = the points, whre the line starts.
When we are training a model, we are using a model to find the best values of m and c for our data.
How does the machine correct errors? (Cost Function)
The line the machine first draws sometimes does not go exactly through the data. Now there is a simple error occurring (notable error with a large dataset). We are using the Mean Squared Error (MSE) method to measure this error. Actually, in the MSE, we find the difference between the real value and the value provided by the machine. The machine tries every time to reduce this MSE. Because if MSE is low, our prediction is accurate.
Where is Regression used?
• Stock Market - Predict tomorrow's stock market prices.
• Real Estate - Determine the prices of houses and land.
• Business - See what sales will be next month.
Python example for Linear Regression
import numpy as np
from sklearn.linearmodel import LinearRegression
Xhours = [[2], [5], [1], [3], [6]]
ymarks = [40, 70, 20, 50, 80]
model = LinearRegression()
model.fit(Xhours, ymarks)
newhours = [[4]]
predictedmark = model.predict(newhours)
print(f"Points for 4 hours: {predicted_mark[0]:.2f}")
I hope you got a basic idea about Regression from today's article. Remember, here we are guessing "Values". In the next article, we will talk about how to find out what category something belongs to (Classification).
✍️ @TheInfinityAI
❤3🔥1
🎄 Merry Christmas from Infinity CS!
Infinity CS | CS / AI / ML
@TheInfinityAI
May your holidays be bug-free, joyful, and full of inspiration.
@TheInfinityAI
❤7
🎓 BSc Honours in Computer Engineering. Shape your future in technology with the Faculty of Engineering Technology – The Open University of Sri Lanka
#BScHonours #ComputerEngineering #OUSL #EngineeringEducation #ApplyNow
@TheInfinityAI
📌 A/L Maths Stream Only
📌 Strong academic foundation
📌 Industry-relevant skills
📌 Recognized degree
🗓 Closing Date: 31st January 2026
👉 Apply Now
📞 011 288 1399 / 070 206 7058
🌐 www.ou.ac.lk
#BScHonours #ComputerEngineering #OUSL #EngineeringEducation #ApplyNow
@TheInfinityAI
❤2🔥1
The Best Agentic AI Browsers to Look For in 2026
🚀 Perplexity Comet
📝 Your AI sidekick that browses, researches, and executes tasks for you—just ask.
🧠 ChatGPT Atlas
📝 ChatGPT becomes your browser and handles the web while you relax.
💬 Dia Browser
📝 Chat with your tabs, write smarter, and plan faster—AI built into your flow.
🤖Microsoft Edge Copilot
📝 Copilot reads your tabs, answers instantly, and gets work done on the spot.
🔐BrowserOS
📝 A private, open-source AI browser that automates tasks locally—no data leaks.
🌐 Opera Neon
📝 A next-gen AI browser that researches, builds, shops, and works even offline.
🚀 Genspark AI Browser
📝 A full-agentic browser that runs deep research and workflows on autopilot.
🚀 Perplexity Comet
📝 Your AI sidekick that browses, researches, and executes tasks for you—just ask.
🧠 ChatGPT Atlas
📝 ChatGPT becomes your browser and handles the web while you relax.
💬 Dia Browser
📝 Chat with your tabs, write smarter, and plan faster—AI built into your flow.
🤖Microsoft Edge Copilot
📝 Copilot reads your tabs, answers instantly, and gets work done on the spot.
🔐BrowserOS
📝 A private, open-source AI browser that automates tasks locally—no data leaks.
🌐 Opera Neon
📝 A next-gen AI browser that researches, builds, shops, and works even offline.
🚀 Genspark AI Browser
📝 A full-agentic browser that runs deep research and workflows on autopilot.
❤1
Forwarded from The Hacker News
APT36 (Transparent Tribe) has been linked to new espionage attacks against Indian government and academic targets.
Emails deliver ZIP files with PDF-looking LNK shortcuts that run malware via mshta.exe and load the RAT in memory.
🔗 Technical details → https://thehackernews.com/2026/01/transparent-tribe-launches-new-rat.html
Emails deliver ZIP files with PDF-looking LNK shortcuts that run malware via mshta.exe and load the RAT in memory.
🔗 Technical details → https://thehackernews.com/2026/01/transparent-tribe-launches-new-rat.html
❤1
The Ultimate Machine Learning Roadmap (2026 Edition) 🏆
Phase 1: Introduction (හැඳින්වීම)
Phase 2: Mathematical Foundations (ගණිතමය පදනම)
Phase 3: Programming Fundamentals (Python)
Phase 4: Data Handling
Phase 5: Machine Learning Core
Phase 6: Supervised Learning (Deep Dive)
Phase 7: Unsupervised & Reinforcement Learning
Phase 8: Model Evaluation & Validation
Phase 9: Deep Learning (Neural Networks)
Phase 10: Advanced Concepts & Modern AI
❤2
𝐈𝐧𝐟𝐢𝐧𝐢𝐭𝐲 𝐂𝐒 pinned «The Ultimate Machine Learning Roadmap (2026 Edition) 🏆 Phase 1: Introduction (හැඳින්වීම) Phase 2: Mathematical Foundations (ගණිතමය පදනම) Phase 3: Programming Fundamentals (Python) Phase 4: Data Handling Phase 5: Machine Learning Core Phase 6: Supervised…»
Article 1: ML Engineer කෙනෙක් වෙන්නේ කොහොමද? 👋
අද ගොඩක් අය AI, ML, Deep Learning කියන වචන පටලවගන්නවා. අපි මේක පටන් ගන්න කලින් බලමු ඇත්තටම මේ රෝල් එක මොකක්ද කියලා.
1. ML Engineer vs AI Engineer
ML Engineer: - වැඩිපුරම අවධානය දෙන්නේ දත්ත (Data) පාවිච්චි කරලා Algorithms සහ Models හදන්න. ඒවයේ නිවැරදිතාවය (Accuracy) වැඩි කරන්නේ කොහොමද කියන එක තමයි මෙයාගේ ප්රධාන රාජකාරිය.
AI Engineer - මේක මීට වඩා ටිකක් පුළුල්. ML වලට අමතරව Robotics, NLP වගේ මිනිස් බුද්ධිය අනුකරණය කරන ඕනෑම සිස්ටම් එකක් හදන්න AI Engineer කෙනෙක් සම්බන්ධ වෙනවා.
2. ඔයාට තියෙන්න ඕන දක්ෂතා (Skills)
Programming - Python. ඒ වගේම Libraries (Numpy, Pandas වගේ) ගැන දැනුම.
Mathematics - මැෂින් එකක් ඉගෙන ගන්න හැටි තේරුම් ගන්න Calculus සහ Statistics ඕනේ.
Data Engineering - දත්ත පිරිසිදු කරලා හරියට සකස් කරන්න දැනගන්න ඕනේ.
Article 2: Calculus – ML වලට මොකටද මේවා? 🔢
දැන් අපි කෙලින්ම Mathematical Foundations වල පළවෙනි පියවරට බහිමු. ඒ තමයි Calculus. ML වලදී අපිට Calculus ඕන වෙන්නේ ඇයි? සරලම උත්තරේ තමයි Model එකක වැරදි අවම කරන්න (Optimization).
1. Derivatives
Derivative එකකින් කියන්නේ යම් දෙයක් වෙනස් වෙන වේගයයි. ML වලදී අපේ දත්ත වලට පොඩි වෙනසක් කරද්දී අපේ Model එකේ වැරැද්ද (Loss) කොච්චර වෙනස් වෙනවද කියලා බලන්න අපි Derivatives පාවිච්චි කරනවා.
2. Gradient Descent
මේක ML වල තියෙන වැදගත්ම සංකල්පයක්. ඔයා කන්දක් උඩ ඉඳන් මීදුම වෙලාවක පල්ලමට එනවා කියලා හිතන්න. ඔයා අඩිය තියන්නේ බෑවුම වැඩිම පැත්තට නේද? Gradient එකෙන් කරන්නේ අපේ වැරැද්ද (Error) වැඩියෙන්ම තියෙන පැත්ත පෙන්වන එක. අපි කරන්නේ ඒකේ අනිත් පැත්තට (වැරැද්ද අඩු වෙන පැත්තට) ගමන් කරන එකයි.
3. Chain Rule
මේක ගොඩක් වැදගත් වෙන්නේ ඉස්සරහට අපි ඉගෙන ගන්න Deep Learning (Neural Networks) වලට. එකින් එකට සම්බන්ධ වෙලා තියෙන functions වල වෙනස් වීම් ගණනය කරන්න මේක පාවිච්චි කරනවා.
අපි අද Article 1 සහ 2 (Intro & Calculus) ගැන මූලික අදහසක් ගත්තා. ඊළඟ ලිපියෙන් (Article 3) අපි කතා කරන්නේ Linear Algebra (Matrices & Tensors) ගැන. මොකද දත්ත මැෂින් එකකට පේන්නේ Matrix විදිහට.
✍️ @TheInfinityAI
❤1
Article 3: Linear Algebra – දත්ත වල භාෂාව 🔢
Machine Learning වලදී අපිට ලක්ෂ ගණන් දත්ත එක්ක වැඩ කරන්න වෙනවා. මේ හැම දත්තයක්ම තනි තනියම ගණනය කරන එක ලේසි නැහැ. අන්න ඒ නිසයි අපි Linear Algebra පාවිච්චි කරන්නේ. මේකෙන් අපිට පුළුවන් දත්ත විශාල ප්රමාණයක් එකපාර හසුරුවන්න.
1. දත්ත hierarchy එක (Scalars, Vectors, Matrices & Tensors)
අපි දත්ත හසුරුවන ආකාරය ප්රධාන මට්ටම් 4කට බෙදන්න පුළුවන්.
● Scalar - මේක නිකන්ම තනි අංකයක්. (x = 5).
● Vector - මේක සංඛ්යා ලැයිස්තුවක්.
● Matrix - මේක හරියට Excel sheet එකක් වගේ. Rows සහ Columns තියෙන සංඛ්යා වගුවක්. ML වලදී අපේ Dataset දකින්නේ Matrix එකක් විදිහට.
● Tensor - මේක Matrix ගොඩක එකතුවක්. RGB Image එකක් ගත්තොත්, රතු, කොළ, නිල් කියන පාට තුනට අදාළව Matrix 3ක් තියෙනවා. ඒක Tensor එකක්.
2. Matrix Operations
මැෂින් එකක් ඇතුලේ ගණනය කිරීම් වෙන්නේ මේ ක්රම ටික හරහා.
● Addition - එකම ප්රමාණයේ Matrices දෙකක් එකතු කිරීම.
● Matrix Multiplication - මේක තමයි ML වල තියෙන වැදගත්ම දේ. අපේ input දත්ත සහ Model එකේ තියෙන weights ගුණ කරන්නේ මේ ක්රමයට.
3. Determinants සහ Inverse (ප්රතිලෝමය)
අපි සාමාන්ය ගණිතයේදී 5x = 10 වුණොත් x හොයන්න 10 බෙදනවා. හැබැයි Matrix වලදී අපිට බෙදන්න බැහැ. ඒ වෙනුවට අපි කරන්නේ Inverse එකෙන් ගුණ කරන එකයි. (Matrix එකකට Inverse එකක් තියෙනවද නැද්ද කියලා බලන්න Determinant එක පාවිච්චි කරනවා)
4. Eigenvalues සහ Eigenvectors
අපි මැට්රික්ස් එකක් පාවිච්චි කරලා දත්ත වල හැඩය වෙනස් කරද්දී සමහර Directions වෙනස් වෙන්නේ නැහැ. අන්න ඒ දිශාවන් තමයි Eigenvectors. ඒ දිශාවට දත්ත කොච්චර දුරක් ඇදෙනවද කියන එක Eigenvalue එකෙන් කියනවා. මේක ගොඩක් වැදගත් වෙන්නේ PCA (Dimensionality Reduction) වැනි සංකීර්ණ දත්ත සරල කරන ක්රම වලදී.
5. Singular Value Decomposition (SVD)
SVD කියන්නේ ඕනෑම Matrix එකක් කුඩා කොටස් 3කට කඩන ක්රමයක්. Netflix වගේ App වල ඔයා කැමති ෆිල්ම් මොනවද කියලා අනුමාන කරන්න (Recommendation Systems වලට) මේ SVD පාවිච්චි කරනවා.
සරලව කිවොත් Linear Algebra කියන්නේ දත්ත ටික සංවිධානය කරලා මැෂින් එකට තේරෙන භාෂාවක්ට ඒවා හරවන එක. මේ පදනම නැතුව අපිට Neural Networks හෝ සංකීර්ණ Models තේරුම් ගන්න බැහැ. ඊළඟ ලිපියෙන් (Article 4) අපි කතා කරන්නේ Probability ගැන. දත්ත වල තියෙන අවිනිශ්චිත බව මැෂින් එකක් පාලනය කරන්නේ කොහොමද කියලා එතනදී බලමු.
✍️ @TheInfinityAI
1❤2🔥1
𝐈𝐧𝐟𝐢𝐧𝐢𝐭𝐲 𝐂𝐒
Photo
Article 4: Probability – අවිනිශ්චිත ලෝකයක නිවැරදි තීරණ ගමු 🎲
අද අපි එන්නේ ML Roadmap එකේ ඊලග පියවරට. දැන් අපි Mathematical Foundations වල අවසානයට ලඟා වෙලා ඉන්නේ. අද කතා කරන්නේ Probability (සම්භාවිතාව) ගැන. ML වලදී අපිට හැමතිස්සෙම 100% ක් නිවැරදි දත්ත ලැබෙන්නේ නැහැ. දත්ත වල තියෙන අවිනිශ්චිත බව (Uncertainty) පාලනය කරලා වඩාත්ම ගැලපෙන අනුමානයන් කරන්නේ කොහොමද කියලා මොඩල් එක ඉගෙන ගන්නේ සම්භාවිතාව පාවිච්චි කරලා. ඔයා හිතන්න ඔයා ඊමේල් එකක් බලනවා කියලා. ඒක Spam එකක්ද නැද්ද කියලා මොඩල් එක තීරණය කරන්නේ කොහොමද? අපි ඒක කරන්නේ සම්භාවිතාව පාවිච්චි කරලා. උදාහරණයක් විදියට, මේ වචන තියෙන ඊමේල් එකක් Spam වෙන්න තියෙන සම්භාවිතාව 90% යි වගේ තීරණයක්.
1. Random Variables
අපි දත්තයක් ගත්තම ඒකේ අගය ස්ථිරව කියන්න බැරි නම් ඒක Random Variable එකක්. මේකෙ ප්රධාන වර්ග දෙකක් තියෙනවා,
• Discrete Random Variables - ගණන් කළ හැකි පූර්ණ අගයන්.
• Continuous Random Variables - යම් පරාසයක් තුළ පවතින ඕනෑම අගයක් විය හැකි දේවල්.
2. Probability Distributions
දත්ත විසිරිලා තියෙන විදිහ මේකෙන් පෙන්වනවා. මෙතනදී වැදගත්ම දේ තමයි Normal Distribution. මේක Bell Curve එකක් වගේ. ලෝකයේ ගොඩක් දේවල් (උදාහරණයක් විදියට අපි A/L වලදි සලකන z-score එක) තියෙන්නේ මේ හැඩයට. මේකේ මැද අගය (Mean) වටේට දත්ත වැඩිපුර එකතු වෙලා තියෙනවා.
3. PDF සහ PMF (සම්භාවිතාව මනින හැටි)
• PMF (Probability Mass Function) - Discrete දත්ත සඳහා සම්භාවිතාව පෙන්වන්නෙ මේකෙන්.
• PDF (Probability Density Function) - Continuous දත්ත සඳහා Range එකක් ඇතුළත සම්භාවිතාව පෙන්වන්නෙ මේකෙන්.
4. Bayes' Theorem
ML වල තියෙන වැදගත්ම ටොපික් එකක් තමයි මේක. මේකෙන් කරන්නේ අලුත් තොරතුරු ලැබෙද්දී අපේ පැරණි අනුමානයන් Update කරන එක. (formula එක ඔයාලා හොයාගෙන ඒ ගැන ඉගන ගන්න, එච්චර අමාරු නෑ)
සම්භාවිතාව කියන්නේ අපි ලග තියෙන අනුමාන කිරීමේ හැකියාව mathematically represent කිරීමක්. ML වල තියෙන Naive Bayes Classifier වගේ algorithms සම්පූර්ණයෙන්ම වැඩ කරන්නේ මේ Bayes' Theorem එක මත. ඊළඟ ලිපියෙන් (Article 5) අපි කතා කරන්නේ Statistics ගැන. මේක තමයි අපේ Mathematical Foundations Phase එකේ අවසාන කොටස. දත්ත වල තියෙන රහස් එළියට ගන්නේ කොහොමද කියලා අපි එතනදී බලමු.
✍️ @TheInfinityAI
❤2
𝐈𝐧𝐟𝐢𝐧𝐢𝐭𝐲 𝐂𝐒
Photo
𝐀𝐫𝐭𝐢𝐜𝐥𝐞 𝟓: 𝐒𝐭𝐚𝐭𝐢𝐬𝐭𝐢𝐜𝐬 – දත්ත අතර ඇති සම්බන්ධතා 📊
අපි Mathematical Foundations Phase 1 වල අවසානයට ලං වෙලා ඉන්නේ. අද කතා කරන්නේ Statistics ගැන. ML වලදී අපිට ලැබෙන දත්ත ඇතුළේ තියෙන details එළියට ගන්න පාවිච්චි කරන ප්රධානම දේ තමයි මේක. දත්ත පිරිසිදු කරන්න (Data Cleaning) වගේම Model එකක් කොච්චර හොඳට වැඩ කරනවද කියලා මනින්නත් මේක අනිවාර්යයෙන්ම ඕනේ.
සංඛ්යානය ප්රධාන කොටස් දෙකකට බෙදන්න පුළුවන්,
Descriptive Statistics; තියෙන දත්ත ටික විස්තර කරන එක. (සාමාන්ය අගය කීයද?) සහ Inferential Statistics; පොඩි දත්ත ප්රමාණයකින් මුළු සමාජය ගැනම අනුමාන කරන එක. (ඡන්දයකදී 1,000කගේ අදහස අරන් මුළු රටේම මතය කියනවා වගේ).
1. 𝐌𝐞𝐚𝐬𝐮𝐫𝐞𝐬 𝐨𝐟 𝐂𝐞𝐧𝐭𝐫𝐚𝐥 𝐓𝐞𝐧𝐝𝐞𝐧𝐜𝐲
අපේ data set එක නියෝජනය කරන එක අගයක් හොයාගන්න මේවා පාවිච්චි කරනවා,
● Mean - සාමාන්ය අගය. දත්ත ඔක්කොම එකතු කරලා දත්ත ගණනින් බෙදීම.
● Median - දත්ත ටික පිළිවෙලට සැකසුවාම මැදින්ම තියෙන අගය.
● Mode - දත්ත අතර වැඩිපුරම වතාවක් තියෙන අගය.
𝟐. 𝐌𝐞𝐚𝐬𝐮𝐫𝐞𝐬 𝐨𝐟 𝐃𝐢𝐬𝐩𝐞𝐫𝐬𝐢𝐨𝐧 (𝐌𝐋 වලදී 𝐄𝐫𝐫𝐨𝐫 එක මනින්න මේ සංකල්ප වැදගත්)
● Variance - දත්ත Mean එකේ ඉඳන් කොච්චර ඈතට විසිරිලා තියෙනවද කියලා බලන මිනුම.
● Standard Deviation - මේක වැඩි නම් දත්ත ගොඩක් ඈතට විසිරිලා තියෙනවා. මේක අඩු නම් දත්ත ටික මැද අගයට ගොඩක් කිට්ටුවෙන් තියෙනවා.
𝟑. 𝐆𝐫𝐚𝐩𝐡𝐬 & 𝐂𝐡𝐚𝐫𝐭𝐬
දත්ත දකිද්දීම වැදගත් තොරතුරු අඳුරගන්න මේවා උදව් වෙනවා.
● Histogram: - දත්ත වල Frequency) එක බලන්න.
● Boxplot - දත්ත වල තියෙන Outliers අඳුරගන්න.
𝟒. 𝐈𝐧𝐟𝐞𝐫𝐞𝐧𝐭𝐢𝐚𝐥 𝐒𝐭𝐚𝐭𝐢𝐬𝐭𝐢𝐜𝐬 (අනුමානය සහ තීරණ ගැනීම)
● Hypothesis Testing - අපේ අනුමානයක් ඇත්තටම හරිද. ඒක අහම්බෙන් වුණ දෙයක්ද කියලා ගණිතමය වශයෙන් තහවුරු කරගන්න මේක පාවිච්චි කරනවා.
● P-Value - සරලවම කිව්වොත් මේ අගය 0.05 ට වඩා අඩු නම් අපේ අනුමානය හරි වෙන්න තියෙන ඉඩ වැඩියි.
සංඛ්යානය කියන්නේ දත්ත වල ස්වභාවය අඳුරගන්න තියෙන mathematical concept ටිකක්. මේ වෙනකන් කතා කරපු ගණිතමය කොටස් (Calculus, Linear Algebra, Probability, Statistics) තමයි ML Algorithm එකක් පිටිපස්සේ තියෙන රහස.
දැන් අපි සාර්ථකව Phase 1 අවසන් කළා! 🥳. ඊළඟ article එකෙන් (Article 6) අපි පටන් ගන්නේ Phase 2: Programming Fundamentals. එතනදී අපි බලමු Python භාෂාව ML වලට පාවිච්චි කරන්නේ කොහොමද සහ ඒකේ තියෙන වැදගත් දේවල් මොනවද කියලා.
✍️ @TheInfinityAI
1❤4
𝐈𝐧𝐟𝐢𝐧𝐢𝐭𝐲 𝐂𝐒
Photo
Article 6: Python Basics
Python කියන්නේ නිකන්ම Programming language එකක් නෙවෙයි. ඒක හරියට ඉංග්රීසි භාෂාව වගේම කියවන්න පුළුවන් හරිම සරල භාෂාවක් (කියලා හිතන් ඉන්නවා). ML Engineer කෙනෙක් විදිහට ඔයාට මේ මූලික කරුණු ටික අනිවාර්යයෙන්ම තියෙන්න ඕනේ.
1. Syntax සහ Variables
Python වලදී අපිට වෙනත් භාෂාවල වගේ semicolon (;) හෝ ලොකු ලොකු දේවල් ඕනේ නැහැ.
age = 25 # Integer
price = 10.5 # Float
name = "User" # String
2. Data Structures
ML වලදී අපිට දත්ත ගොඩවල් එක්ක වැඩ කරන්න වෙනවා. ඒකට මේවා හරිම වැදගත්:
● Lists - අගයන් ගොඩක් පිළිවෙලට තියාගන්න.
[10, 20, 30]● Tuples: වෙනස් කරන්න බැරි Data Lists
(1, 2)● Dictionaries: Key සහ Value විදිහට Data තියාගන්න.
{"name": "User", "role": "ML Student"}3. Loops සහ Conditionals
මොඩල් එකක් එකම දේ දහස් වාරයක් කරන්නේ සහ තීරණ ගන්නේ මේවා පාවිච්චි කරලා.
● If-Else - තීරණ ගන්න. (උදා: "ලකුණු 40ට වැඩිනම් 'Pass', නැත්නම් 'Fail'")
● For Loops – Data List එකක තියෙන හැම අගයක්ම එකින් එක පරීක්ෂා කරන්න.
4. Functions
එකම Code block එක නැවත නැවත ලියනවා වෙනුවට අපිට පුළුවන් ඒක එක තැනක ලියලා ඕන වෙලාවට පාවිච්චි කරන්න.
def calculate_grade(marks):
if marks > 75:
return "A"
else:
return "B"
print(calculate_grade(80)) # Output: A
Python ML වලට මේ තරම් වැදගත් ඇයි?
Python වල තියෙන ලොකුම වාසිය තමයි ඒකේ තියෙන Libraries (NumPy, Pandas වගේ දේවල්) නිසා අපිට අමාරු ගණිතමය ගණනය කිරීම් තනි පේළියෙන් කරන්න පුළුවන්. ඒ දේවල් ගැන අපි ඉදිරි ලිපි වලදී කතා කරනවා. අද අපි Python වල මූලික හැඩය සහ දත්ත හසුරුවන ආකාරය ගැන කතා කළා. මේවා තමයි ML වැඩසටහන් වල අඩිතාලම වෙන්නේ. ඊළඟ article එකෙන් (Article 7) අපි කතා කරන්නේ Object-Oriented Programming (OOP) ගැන. ලොකු ML Systems හදද්දී Data සහ Process පාලනය කරන්නේ කොහොමද කියලා අපි එතනදී බලමු.
✍️ @TheInfinityAI
❤6🎄1