{
  "source_file": "0930",
  "source_platform": "Hashnode",
  "author": "Muhammad Fahad Bashir",
  "title_listed": "3. Understanding Data, Attributes & Data Objects in Machine Learning",
  "keywords": "",
  "domain": "机器学习",
  "content_type": "深度技术解析",
  "is_paid_flag": "否",
  "url": "https://ml-diaries-by-fahd.hashnode.dev/3-understanding-data-attributes-and-data-objects-in-machine-learning",
  "publish_date": "2025-04-13",
  "corpus_stage": "",
  "notes": "",
  "id": "94c1b2e1958d",
  "collected_at": "2026-10-02T14:10:55",
  "title": "3. Understanding Data, Attributes & Data Objects in Machine Learning",
  "body_markdown": "3. Understanding Data, Attributes & Data Objects in Machine Learning\nUpdated\nApril 13, 2025\n•\n6\nmin read\n•\nView as Markdown\nM\nMuhammad Fahad Bashir\nMachine Learning, Artificial Intelligence\nIn our\nprevious article\n, we explored the types of machine learning and their basic workflow. However, a strong algorithm is only as good as the data it's trained on.\nGarbage in, garbage out\n- a flawed dataset can lead to poor model performance, regardless of the algorithm's complexity. Therefore, understanding the\ndata, its attributes, and data objects\nis crucial for building effective models. In this article, we'll dive deeper into the importance of data understanding and explore the key concepts that will help you work with data more effectively.\nData\nIn simple words,\ndata\nis the\nraw information\nthat we feed into a machine learning model so it can learn patterns.\nData is usually arranged in a\ntabular format\n– like a spreadsheet – made up of\nrows and columns\n:\nRows\n= different\nexamples\nor\ninstances\nof data\nColumns\n= different\nattributes\nor\nfeatures\nthat describe the data\nAttributes\nAttributes\nare the\nproperties or features\nof a data object.\nEach attribute describes an aspect of the object. In tabular data, these are the\ncolumns\n.\nData Object\nA\ndata object\nis a\nsingle record or row\nin the dataset.\nIt’s one complete unit of data that contains values for all the attributes.\nYou might also hear it called a Data point, Instance, Record, Sample. All of these are synonyms for\none row\nin your dataset.\nJuice Store Example\nLet’s make this real with an example.\nImagine you own a juice shop and are collecting customer data.\nCustomer ID\nAge\nFavorite Juice\nQuantity\nPurchased on Weekend?\n101\n25\nOrange\n2\nYes\n102\n30\nMango\n1\nNo\n103\n22\nApple\n3\nYes\n🔍 In this example:\nThe\nwhole table\nis your\ndata\nEach\nrow\n(e.g., Customer ID 101) is a\ndata object\nEach\ncolumn\n(like\nAge\n,\nFavorite Juice\n, etc.) is an\nattribute\nLet’s understand these concept in more detail by types attributes\nTypes of Attributes in Machine Learning\nWhen you're working with machine learning models, it's not enough to just collect data — you must understand\nwhat kind of data\nyou're dealing with. Why? Because the type of\nattribute\n(or feature) determines:\nWhich\nalgorithms\nyou can use,\nHow you\npreprocess\nthe data,\nAnd what kind of\ninsights\nor predictions your model can produce.\nLet’s break it down with definitions, detailed explanations, and practical examples.\n1-\nNominal Attributes\n—\nLabels without Order\nNominal attributes are\ncategorical values\nthat represent different\nnames or labels\n, and\nthere is no inherent order or ranking\namong them.\n📌 Key Characteristics:\nThese are used to\nclassify\nor\ngroup\nthings.\nValues are\nmutually exclusive\n— a data point can only belong to one category.\nYou\ncannot\nperform mathematical operations like average or sort meaningfully.\nExample:\nFavorite Juice\n: Apple, Mango, Orange\nThese are just names of juice flavors. You can't say Apple > Mango — there’s\nno ranking\n, just labels.\nIn\nMachine Learning\n: These are usually encoded using\nOne-Hot Encoding\nor\nLabel Encoding\nbefore being used in algorithms.\n2- Binary Attributes\n—\nYes or No, On or Off\nBinary attributes are a special case of nominal attributes where there are\nonly two possible values\n.\n📌 Key Characteristics:\nRepresent\ntwo categories\n: True/False, Yes/No, 0/1\nVery common in real-world problems\nExample:\nPurchased on the Weekend?\n→ Yes or No\nOr encoded as: 1 = Yes, 0 = No\nIn\nMachine Learning\n: Binary attributes are often used directly (as 0 or 1) in models and are great for\ndecision trees\n,\nlogistic regression\n, etc.\n3- Ordinal Attributes\n—\nCategories with Order\nOrdinal attributes are like nominal attributes,\nbut with an added twist — the categories have a meaningful order or ranking.\n📌 Key Characteristics:\nCategories can be ranked, but the\ndifference between ranks isn't measurable\n.\nYou can\nsort\nthe data, but you can’t calculate differences like \"Medium is 2 units more than Small.\"\nExample:\nJuice Size\n: Small, Medium, Large\nClearly, there's an order — Small < Medium < Large — but the\ngap between sizes isn’t numerically defined\n.\nIn Machine Leaning: Ordinal data is often\nencoded using integers\n(e.g., Small = 1, Medium = 2, Large = 3), but care must be taken\nnot to treat them as purely numeric\nunless the algorithm supports it (like tree-based models).\nNumeric Attributes\n—\nMeasurable Quantities\nNumeric attributes represent\nquantitative values\nand can be\nmeasured\n. These are the most straightforward data types when it comes to mathematics.\n📌 Subtypes:\nThere are two kinds of numeric data:\nDiscrete\n– Countable values (e.g., number of items)\nContinuous\n– Measurable values with infinite possibilities (e.g., height, weight)\nExample:\nAge\n: 25, 30, 40 (continuous)\nQuantity\n: 1, 2, 3 juices (discrete)\nIn ML: Numeric data can be used directly in many algorithms. You might still apply techniques like\nnormalization\nor\nscaling\nto standardize values for better performance\n🧃 Putting It All Together: Juice Store Dataset Revisited\nCustomer ID\nAge\nFavorite Juice\nQuantity\nPurchased on Weekend?\nJuice Size\n101\n25\nOrange\n2\nYes\nMedium\n102\n30\nMango\n1\nNo\nLarge\n103\n22\nApple\n3\nYes\nSmall\nAttribute\nType\nAge\nNumeric\nFavorite Juice\nNominal\nQuantity\nNumeric (Discrete)\nPurchased on Weekend?\nBinary\nJuice Size\nOrdinal\nData Preprocessing and Attribute Transformation\nUnderstanding the type of attribute is crucial before applying machine learning models. Here’s how attributes influence model performance:\nNominal and Binary attributes\n: Often require conversion into numerical values to facilitate model training.\nOrdinal attributes\n: Need to be properly transformed to reflect their order.\nNumeric attributes\n: Are directly used by models but might require scaling or normalization.\nConclusion\nUnderstanding your data is the first real step toward building smart machine learning models. Knowing what attributes are — and how they work — helps you prepare your data correctly, choose the right techniques, and avoid mistakes.\nRemember:\nGood data = Good model. Bad data = Bad results.\nMaster these basics, and you’ll build a strong foundation for everything else in your ML journey.\n#\ndata\n#\nmachine-learning\n#\ntutorial\n#\nbasics\n13\nviews",
  "metadata": {
    "title": "3. Understanding Data, Attributes & Data Objects in Machine Learning",
    "description": "Explore the importance of understanding data, attributes, and data objects in machine learning to build effective and high-performance models",
    "keywords": null,
    "author": null,
    "og:title": "3. Understanding Data, Attributes & Data Objects in Machine Learning",
    "og:description": "Explore the importance of understanding data, attributes, and data objects in machine learning to build effective and high-performance models",
    "og:url": "https://ml-diaries-by-fahd.hashnode.dev/3-understanding-data-attributes-and-data-objects-in-machine-learning",
    "og:site_name": "ML Diaries by Fahd",
    "og:image": "https://cdn.hashnode.com/res/hashnode/image/upload/v1744558576663/18cb5f50-3582-437e-9801-9607a5befde0.png",
    "og:image:width": "1200",
    "og:image:height": "630",
    "og:type": "article",
    "twitter:card": "summary_large_image",
    "twitter:title": "3. Understanding Data, Attributes & Data Objects in Machine Learning",
    "twitter:description": "Explore the importance of understanding data, attributes, and data objects in machine learning to build effective and high-performance models",
    "twitter:image": "https://cdn.hashnode.com/res/hashnode/image/upload/v1744558576663/18cb5f50-3582-437e-9801-9607a5befde0.png",
    "article:published_time": "2025-04-13T15:36:57.088Z",
    "article:modified_time": "2025-04-13T15:41:08.399Z",
    "article:author": "https://ml-diaries-by-fahd.hashnode.dev/@mfahadbashir"
  },
  "paywall": {
    "listed_paid": false,
    "detected": false,
    "marker": "",
    "public_only": false,
    "policy": "付费/会员内容只保留页面公开可见部分，不绕过付费墙"
  },
  "crawl": {
    "success": true,
    "status_code": 200,
    "error": ""
  },
  "code_blocks": [],
  "images": [
    {
      "status": "ok",
      "url": "https://cdn.hashnode.com/res/hashnode/image/upload/v1744558576663/18cb5f50-3582-437e-9801-9607a5befde0.png",
      "bytes": 1112286,
      "reused": true,
      "local_path": "attachments/94c1b2e1958d/images/002.png",
      "src": "https://cdn.hashnode.com/res/hashnode/image/upload/v1744558576663/18cb5f50-3582-437e-9801-9607a5befde0.png",
      "alt": "3. Understanding Data, Attributes & Data Objects in Machine Learning",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://static.surveysparrow.com/site/strapi-content/uploads/2024/09/Characteristics_of_Nominal_Data_5b5c2004db.png",
      "bytes": 14227,
      "reused": true,
      "local_path": "attachments/94c1b2e1958d/images/004.png",
      "src": "https://static.surveysparrow.com/site/strapi-content/uploads/2024/09/Characteristics_of_Nominal_Data_5b5c2004db.png",
      "alt": "Nominal Data 101: Definition, Examples, and Analysis",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://images.twinkl.co.uk/tw1n/image/private/t_630/image_repo/62/48/au-l-526318-yesno-communication-support-cards_ver_2.jpg",
      "bytes": 32336,
      "reused": true,
      "local_path": "attachments/94c1b2e1958d/images/005.jpg",
      "src": "https://images.twinkl.co.uk/tw1n/image/private/t_630/image_repo/62/48/au-l-526318-yesno-communication-support-cards_ver_2.jpg",
      "alt": "Yes/No Communication Support Cards (teacher made) - Twinkl",
      "downloaded": true
    },
    {
      "status": "ok",
      "url": "https://cdn.hashnode.com/res/hashnode/image/upload/v1744557945058/95280001-bfb6-4617-a44f-26789b5704b4.png",
      "bytes": 326952,
      "reused": true,
      "local_path": "attachments/94c1b2e1958d/images/006.png",
      "src": "https://cdn.hashnode.com/res/hashnode/image/upload/v1744557945058/95280001-bfb6-4617-a44f-26789b5704b4.png",
      "alt": "",
      "downloaded": true
    },
    {
      "status": "http_520",
      "url": "https://www.displayr.com/wp-content/uploads/2017/09/12visualizations.png",
      "src": "https://www.displayr.com/wp-content/uploads/2017/09/12visualizations.png",
      "alt": "12 Visualizations to Show a Single Number - Displayr",
      "downloaded": false,
      "retried_at": "2026-10-20T22:23:28Z"
    }
  ],
  "audio": [],
  "videos": [],
  "links": [
    {
      "href": "https://ml-diaries-by-fahd.hashnode.dev/3-understanding-data-attributes-and-data-objects-in-machine-learning.md",
      "label": "View as Markdown",
      "type": "a"
    },
    {
      "href": "https://hashnode.com/@mfahadbashir",
      "label": "M",
      "type": "a"
    },
    {
      "href": "https://www.linkedin.com/in/muhammad-fahad-bashir-09568216a/",
      "label": "",
      "type": "a"
    },
    {
      "href": "https://ml-diaries-by-fahd.hashnode.dev/2-types-of-machine-learning-and-their-basic-workflow",
      "label": "previous article",
      "type": "a"
    },
    {
      "href": "https://ml-diaries-by-fahd.hashnode.dev/tag/data",
      "label": "# data",
      "type": "a"
    },
    {
      "href": "https://ml-diaries-by-fahd.hashnode.dev/tag/machine-learning",
      "label": "# machine-learning",
      "type": "a"
    },
    {
      "href": "https://ml-diaries-by-fahd.hashnode.dev/tag/tutorial",
      "label": "# tutorial",
      "type": "a"
    },
    {
      "href": "https://ml-diaries-by-fahd.hashnode.dev/tag/basics",
      "label": "# basics",
      "type": "a"
    }
  ],
  "retry_at": "2026-10-03T08:07:48",
  "repair_version": 2,
  "repaired_at": "2026-10-14T10:50:43Z",
  "source_url": "https://ml-diaries-by-fahd.hashnode.dev/3-understanding-data-attributes-and-data-objects-in-machine-learning",
  "papers": [],
  "actual_video_files": [],
  "body_chars": 6208,
  "expected_body_images": 5,
  "discovery_status": "ok",
  "delivery_status": "partial",
  "missing_reason": "http_520",
  "raw_html": "attachments/94c1b2e1958d/pages/source.html",
  "local_html": "attachments/94c1b2e1958d/pages/article.html",
  "body_base_path": "attachments/94c1b2e1958d/pages/",
  "body_markdown_path": "attachments/94c1b2e1958d/pages/article.md"
}