با مجموعهها، منظم بمانید ذخیره و طبقهبندی محتوا براساس اولویتهای شما.
فرض کنید با مجموعه داده ای کار می کنید که شامل اطلاعات بیمار از یک سیستم مراقبت های بهداشتی است. مجموعه داده پیچیده است و شامل هر دو ویژگی دسته بندی و عددی است. شما می خواهید الگوها و شباهت ها را در مجموعه داده پیدا کنید. چگونه ممکن است به این کار نزدیک شوید؟
خوشه بندی یک تکنیک یادگیری ماشینی بدون نظارت است که برای گروه بندی نمونه های بدون برچسب بر اساس شباهت آنها به یکدیگر طراحی شده است. (اگر نمونه ها برچسب گذاری شده باشند، این نوع گروه بندی طبقه بندی نامیده می شود.) یک مطالعه فرضی بیمار را در نظر بگیرید که برای ارزیابی یک پروتکل درمانی جدید طراحی شده است. در طول مطالعه، بیماران گزارش می دهند که چند بار در هفته علائم و شدت علائم را تجربه می کنند. محققان می توانند از تجزیه و تحلیل خوشه بندی برای گروه بندی بیماران با پاسخ های درمانی مشابه در خوشه ها استفاده کنند. شکل 1 یک گروه بندی احتمالی داده های شبیه سازی شده را در سه خوشه نشان می دهد.
شکل 1: نمونه های بدون برچسب گروه بندی شده در سه خوشه (داده های شبیه سازی شده).
با نگاهی به داده های بدون برچسب در سمت چپ شکل 1، می توانید حدس بزنید که داده ها سه خوشه را تشکیل می دهند، حتی بدون تعریف رسمی شباهت بین نقاط داده. با این حال، در برنامههای کاربردی دنیای واقعی، باید به صراحت یک معیار تشابه یا معیاری که برای مقایسه نمونهها استفاده میشود، از نظر ویژگیهای مجموعه داده تعریف کنید. وقتی نمونه ها فقط چند ویژگی دارند، تجسم و اندازه گیری شباهت ساده است. اما با افزایش تعداد ویژگی ها، ترکیب و مقایسه ویژگی ها کمتر بصری و پیچیده تر می شود. معیارهای شباهت مختلف ممکن است کم و بیش برای سناریوهای مختلف خوشهبندی مناسب باشند، و این دوره به انتخاب معیار شباهت مناسب در بخشهای بعدی میپردازد: معیارهای تشابه دستی و اندازهگیری تشابه از جاسازیها .
پس از خوشه بندی، به هر گروه یک برچسب منحصر به فرد به نام Cluster ID اختصاص داده می شود. خوشهبندی قدرتمند است زیرا میتواند مجموعه دادههای بزرگ و پیچیده را با ویژگیهای بسیار به یک شناسه خوشه ساده کند.
موارد استفاده خوشه بندی
خوشه بندی در صنایع مختلف مفید است. برخی از کاربردهای رایج برای خوشه بندی:
تقسیم بندی بازار
تحلیل شبکه های اجتماعی
گروه بندی نتایج جستجو
تصویربرداری پزشکی
تقسیم بندی تصویر
تشخیص ناهنجاری
چند مثال خاص از خوشه بندی:
نمودار هرتزسپرونگ-راسل خوشه هایی از ستارگان را هنگامی که بر اساس درخشندگی و دما ترسیم می شود نشان می دهد.
توالی ژنی که شباهتها و تفاوتهای ژنتیکی ناشناخته قبلی را بین گونهها نشان میدهد، منجر به تجدیدنظر در طبقهبندیهایی شده است که قبلاً بر اساس ظواهر انجام میشد.
مدل 5 بزرگ از ویژگی های شخصیتی با خوشه بندی کلماتی که شخصیت را در 5 گروه توصیف می کنند، ایجاد شد. مدل HEXACO از 6 خوشه به جای 5 خوشه استفاده می کند.
انتساب
هنگامی که برخی از نمونهها در یک خوشه دارای دادههای ویژگی گمشده هستند، میتوانید دادههای گمشده را از نمونههای دیگر در خوشه استنتاج کنید. به این می گویند انتساب . برای مثال، برای بهبود توصیههای ویدیویی، میتوان ویدیوهای کمتر محبوب را با ویدیوهای محبوبتر دستهبندی کرد.
فشرده سازی داده ها
همانطور که بحث شد، شناسه خوشه مربوطه می تواند جایگزین ویژگی های دیگر برای همه نمونه های آن خوشه شود. این جایگزینی تعداد ویژگی ها را کاهش می دهد و بنابراین منابع مورد نیاز برای ذخیره، پردازش و آموزش مدل ها را بر روی آن داده ها نیز کاهش می دهد. برای مجموعه داده های بسیار بزرگ، این پس انداز قابل توجه است.
برای مثال، یک ویدیوی YouTube منفرد میتواند دادههای ویژگی داشته باشد از جمله:
مکان بیننده، زمان، و جمعیت
مُهرهای زمان، متن و شناسههای کاربر نظر دهید
برچسب های ویدیویی
خوشهبندی ویدیوهای YouTube این مجموعه از ویژگیها را با یک شناسه خوشه جایگزین میکند، بنابراین دادهها را فشرده میکند.
حفظ حریم خصوصی
میتوانید با خوشهبندی کاربران و مرتبط کردن دادههای کاربر با شناسههای خوشهای به جای شناسههای کاربر، حریم خصوصی را تا حدودی حفظ کنید. برای ارائه یک مثال ممکن، بگویید میخواهید مدلی را در سابقه تماشای کاربران YouTube آموزش دهید. به جای ارسال شناسه های کاربری به مدل، می توانید کاربران را خوشه بندی کنید و فقط شناسه خوشه را ارسال کنید. این باعث میشود تاریخچههای تماشای فردی به کاربران فردی متصل نشود. توجه داشته باشید که برای حفظ حریم خصوصی، خوشه باید دارای تعداد کافی کاربر باشد.
تاریخ آخرین بهروزرسانی 2025-02-25 بهوقت ساعت هماهنگ جهانی.
[[["درک آسان","easyToUnderstand","thumb-up"],["مشکلم را برطرف کرد","solvedMyProblem","thumb-up"],["غیره","otherUp","thumb-up"]],[["اطلاعاتی که نیاز دارم وجود ندارد","missingTheInformationINeed","thumb-down"],["بیشازحد پیچیده/ مراحل بسیار زیاد","tooComplicatedTooManySteps","thumb-down"],["قدیمی","outOfDate","thumb-down"],["مشکل ترجمه","translationIssue","thumb-down"],["مشکل کد / نمونهها","samplesCodeIssue","thumb-down"],["غیره","otherDown","thumb-down"]],["تاریخ آخرین بهروزرسانی 2025-02-25 بهوقت ساعت هماهنگ جهانی."],[[["\u003cp\u003eClustering is an unsupervised machine learning technique used to group similar unlabeled data points into clusters based on defined similarity measures.\u003c/p\u003e\n"],["\u003cp\u003eCluster analysis can be applied to various domains like market segmentation, social network analysis, and medical imaging to identify patterns and simplify complex datasets.\u003c/p\u003e\n"],["\u003cp\u003eClustering enables data compression by replacing numerous features with a single cluster ID, reducing storage and processing needs.\u003c/p\u003e\n"],["\u003cp\u003eIt facilitates data imputation by inferring missing feature data from other examples within the same cluster.\u003c/p\u003e\n"],["\u003cp\u003eClustering offers a degree of privacy preservation by associating user data with cluster IDs instead of individual identifiers.\u003c/p\u003e\n"]]],[],null,["Suppose you are working with a dataset that includes patient information from a\nhealthcare system. The dataset is complex and includes both categorical and\nnumeric features. You want to find patterns and similarities in the dataset.\nHow might you approach this task?\n\n[**Clustering**](/machine-learning/glossary#clustering) is an unsupervised\nmachine learning technique designed to group\n[**unlabeled examples**](https://developers.google.com/machine-learning/glossary#unlabeled_example)\nbased on their similarity to each other. (If the examples are labeled, this\nkind of grouping is called\n[**classification**](https://developers.google.com/machine-learning/glossary#classification_model).)\nConsider a hypothetical patient\nstudy designed to evaluate a new treatment protocol. During the study, patients\nreport how many times per week they experience symptoms and the severity of the\nsymptoms. Researchers can use clustering analysis to group patients with similar\ntreatment responses into clusters. Figure 1 demonstrates one possible grouping\nof simulated data into three clusters.\n**Figure 1: Unlabeled examples grouped into three clusters\n(simulated data).**\n\nLooking at the unlabeled data on the left of Figure 1, you could guess that\nthe data forms three clusters, even without a formal definition of similarity\nbetween data points. In real-world applications, however, you need to explicitly\ndefine a **similarity measure** , or the metric used to compare samples, in\nterms of the dataset's features. When examples have only a couple of features,\nvisualizing and measuring similarity is straightforward. But as the number of\nfeatures increases, combining and comparing features becomes less intuitive\nand more complex. Different similarity measures may be more or less appropriate\nfor different clustering scenarios, and this course will address choosing an\nappropriate similarity measure in later sections:\n[Manual similarity measures](/machine-learning/clustering/kmeans/similarity-measure)\nand\n[Similarity measure from embeddings](/machine-learning/clustering/autoencoder/similarity-measure).\n\nAfter clustering, each group is assigned a unique label called a **cluster ID**.\nClustering is powerful because it can simplify large, complex datasets with\nmany features to a single cluster ID.\n\nClustering use cases\n\nClustering is useful in a variety of industries. Some common applications\nfor clustering:\n\n- Market segmentation\n- Social network analysis\n- Search result grouping\n- Medical imaging\n- Image segmentation\n- Anomaly detection\n\nSome specific examples of clustering:\n\n- The [Hertzsprung-Russell diagram](https://wikipedia.org/wiki/Hertzsprung%E2%80%93Russell_diagram) shows clusters of stars when plotted by luminosity and temperature.\n- Gene sequencing that shows previously unknown genetic similarities and dissimilarities between species has led to the revision of taxonomies previously based on appearances.\n- The [Big 5](https://wikipedia.org/wiki/Big_Five_personality_traits) model of personality traits was developed by clustering words that describe personality into 5 groups. The [HEXACO](https://wikipedia.org/wiki/HEXACO_model_of_personality_structure) model uses 6 clusters instead of 5.\n\nImputation\n\nWhen some examples in a cluster have missing feature data, you can infer the\nmissing data from other examples in the cluster. This is called\n[imputation](https://developers.google.com/machine-learning/glossary/#value-imputation).\nFor example, less popular videos can be clustered with more popular videos\nto improve video recommendations.\n\nData compression\n\nAs discussed, the relevant cluster ID can replace other features for all\nexamples in that cluster. This substitution reduces the number of features and\ntherefore also reduces the resources needed to store, process, and train models\non that data. For very large datasets, these savings become significant.\n\nTo give an example, a single YouTube video can have feature data including:\n\n- viewer location, time, and demographics\n- comment timestamps, text, and user IDs\n- video tags\n\nClustering YouTube videos replaces this set of features with a\nsingle cluster ID, thus compressing the data.\n\nPrivacy preservation\n\nYou can preserve privacy somewhat by clustering users and associating user data\nwith cluster IDs instead of user IDs. To give one possible example, say you want\nto train a model on YouTube users' watch history. Instead of passing user IDs\nto the model, you could cluster users and pass only the cluster ID. This\nkeeps individual watch histories from being attached to individual users. Note\nthat the cluster must contain a sufficiently large number of users in order to\npreserve privacy.\n| **Key terms:**\n|\n| - [clustering](/machine-learning/glossary#clustering)\n| - [example](/machine-learning/glossary#example)\n| - [unlabeled example](/machine-learning/glossary#unlabeled_example)\n| - [classification](/machine-learning/glossary#classification_model)"]]