15/04/2025
🤖 𝐁𝐞𝐟𝐨𝐫𝐞 𝐝𝐢𝐯𝐢𝐧𝐠 𝐢𝐧𝐭𝐨 𝐚𝐥𝐠𝐨𝐫𝐢𝐭𝐡𝐦𝐬, 𝐡𝐞𝐫𝐞’𝐬 𝐬𝐨𝐦𝐞𝐭𝐡𝐢𝐧𝐠 𝐦𝐨𝐫𝐞 𝐢𝐦𝐩𝐨𝐫𝐭𝐚𝐧𝐭:
Understand the types of attributes in your dataset. It’s step one to building smarter models.
🔍 𝐓𝐲𝐩𝐞𝐬 𝐨𝐟 𝐀𝐭𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐬 𝐢𝐧 𝐌𝐚𝐜𝐡𝐢𝐧𝐞 𝐋𝐞𝐚𝐫𝐧𝐢𝐧𝐠
Every dataset is built on attributes—and understanding them is crucial for selecting the right model, preprocessing methods, and achieving accurate predictions.
𝐇𝐞𝐫𝐞 𝐚𝐫𝐞 𝐭𝐡𝐞 𝟒 𝐦𝐚𝐢𝐧 𝐭𝐲𝐩𝐞𝐬 𝐨𝐟 𝐚𝐭𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐬 𝐲𝐨𝐮 𝐬𝐡𝐨𝐮𝐥𝐝 𝐤𝐧𝐨𝐰:
1️⃣ 𝐍𝐨𝐦𝐢𝐧𝐚𝐥 𝐀𝐭𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐬 (𝐂𝐚𝐭𝐞𝐠𝐨𝐫𝐢𝐜𝐚𝐥 𝐃𝐚𝐭𝐚)
📌 Definition: Labels without any order or ranking.
🧠 Examples: Hair color, Country, Blood type
✔️ No logical ordering
✔️ Mode is used for analysis
✔️ Cannot perform mathematical operations
🔄 Missing values? Use mode to impute
2️⃣ 𝐁𝐢𝐧𝐚𝐫𝐲 𝐀𝐭𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐬
📌 Definition: Only two possible values
🧠 Examples: Yes/No, Male/Female, Healthy/Sick
𝐒𝐮𝐛𝐭𝐲𝐩𝐞𝐬:
Symmetric: Both values occur equally (e.g., Male/Female)
Asymmetric: One value dominates (e.g., Healthy/Sick)
✔️ Often encoded as 1 and 0
3️⃣ 𝐎𝐫𝐝𝐢𝐧𝐚𝐥 𝐀𝐭𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐬
📌 Definition: Categories with an inherent order
🧠 Examples: Low-Medium-High, Beginner–Intermediate–Expert
✔️ Logical ordering exists
✔️ Median & Mode are used for analysis
✖️ Differences between values aren’t uniform
✖️ Arithmetic operations aren’t valid
4️⃣𝐍𝐮𝐦𝐞𝐫𝐢𝐜 𝐀𝐭𝐭𝐫𝐢𝐛𝐮𝐭𝐞𝐬
📌 Definition: Measurable or countable numbers
🧠 Examples: Age, Salary, Temperature
𝐒𝐮𝐛𝐭𝐲𝐩𝐞𝐬:
Discrete: Countable (e.g., Number of products)
Continuous: Infinite values within a range (e.g., Time duration, Weight)
⚠️ Note: Interval and Ratio scales are more advanced, but for most ML tasks, we focus on Discrete and Continuous.
🧠 𝐖𝐡𝐲 𝐈𝐭 𝐌𝐚𝐭𝐭𝐞𝐫𝐬
✅ Helps select the right encoding/preprocessing methods
✅ Prevents model bias
✅ Boosts model accuracy and interpretability
🙏 Special thanks to my teachers and mentors for guiding me in understanding data beyond just numbers. Your support makes the difference. 🙌
Shazia Saqib Awfera Dr. Sheraz Naseer Muhammad Haris Irfan Malik
💬 What attribute type did you struggle with most when you started your ML journey?
👇 Let’s start a thread and grow together!