{"id":15991,"date":"2016-07-19T18:20:47","date_gmt":"2016-07-20T01:20:47","guid":{"rendered":"https:\/\/devwww.3cloudsolutions.com\/post\/supply-chain-insights-with-advanced-analytics-fuzzy-clustering-2\/"},"modified":"2024-06-18T09:04:27","modified_gmt":"2024-06-18T16:04:27","slug":"supply-chain-insights-with-advanced-analytics-fuzzy-clustering","status":"publish","type":"post","link":"https:\/\/3cloudsolutions.com\/resources\/supply-chain-insights-with-advanced-analytics-fuzzy-clustering\/","title":{"rendered":"Supply Chain Insights with Advanced Analytics: Fuzzy Clustering"},"content":{"rendered":"<p>Many business decisions need to be made with incomplete information, and require managers to plan for uncertain outcomes. If implementing a new inventory policy has the promise of reducing holding costs across the enterprise by $10 million over the next 2 years, what\u2019s the chance the savings will be <em>exactly <\/em>$10 million? Well, it\u2019s about zero. Would a manager\u2019s decision to move forward with the initiative change if they were told there\u2019s an 80 percent\u00a0chance of saving <em>more<\/em> than $10 million? What about only a 50 percent\u00a0chance? How about 10 percent? Incorporating measures of uncertainty can be tremendously helpful for decision makers. Unfortunately, many analytic techniques produce very deterministic, or single point, estimates (e.g., \u201cOur model predicts exactly $10 million in\u00a0savings!\u201d). In a recent project, we applied fuzzy logic to a common machine learning technique \u2013 clustering\u00a0\u2013 to provide probabilistic information for inventory management.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/fuzzy-clustering.jpg\" alt=\"fuzzy-clustering.jpg\" width=\"798\" height=\"504\" \/><\/p>\n<p><!--more--><\/p>\n<p>For many organizations, inventory management policies can vary by groups of products that are similar. This could mean they come from the same distribution center, have similar sales patterns, require the same cost or effort to produce, etc. But across many product attributes, it can be challenging to define what makes products \u201csimilar.\u201d Applying an inappropriate policy, as might happen when associating an item with the wrong group, can be tremendously expensive, especially when inventory or stock-out costs are high.<\/p>\n<p>The machine learning task of clustering is a common way to find hidden structures in data, namely which data points are more closely related to certain points than others \u2013 or groups. Examples in industry include customer segmentation for targeted marketing, image processing and recognition, and patterns of gene expression in bioinformatics. The objective in this project was to use clustering to help identify groups of similar products across several identifying characteristics, and fuzzy logic to pinpoint items that may not currently belong strongly to any one particular group. This was done in support of\u00a0a supply chain management group that wished to get deeper insight into product relationships for inventory policies. By having a prioritized list of items that do not strongly associate with one particular group, managers can easily keep an eye on a subset of products that may hold higher potential savings, or require a hybrid management policy.<\/p>\n<p>To illustrate an application of fuzzy clustering, we created an example using the classic <em>Iris <\/em>data set and performed analysis using the R statistical programming language. The <em>Iris <\/em>data consists of 150 observations, and 4 features. In a supply chain context, these might represent average periodic sales volume, holding cost, stock-out cost, and shelf life. We\u2019ll set the number of clusters (K) to 3. The values have been normalized since they are on different measurement scales. <a href=\"https:\/\/gist.github.com\/alathrop\/f4c01b3d036aa6f326f46a7905d9bb98\" target=\"_blank\" rel=\"noopener\">The R code is here.<\/a><\/p>\n<p><strong>Figure 1\u00a0<\/strong>shows the original values in 2-dimensional principal component space (a technique to represent multiple attributes in a compact number of dimensions). We can see a clear separation of values along the left side. But what about the products on the right? How can we group them?<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/fuzzy-p0.png\" alt=\"fuzzy-p0.png\" width=\"798\" height=\"581\" \/><\/strong><\/p>\n<p><strong>Figure 1<\/strong><\/p>\n<p><strong>Figure 2<\/strong>\u00a0illustrates the 3 K-means clusters. Using a distance calculation, K-means performs multiple iterations to calculate the best group for item membership. Using fuzzy K-means, we also have the benefit of understanding the degree, or probability, of cluster membership. Larger dots have a stronger membership; smaller dots have a weaker membership. Notice that dots near the perimeter of clusters are smaller; there is less certainty to which cluster they belong.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/fuzzy-p1.png\" alt=\"fuzzy-p1.png\" width=\"798\" height=\"543\" \/><\/p>\n<p><strong>Figure 2<\/strong><\/p>\n<p><strong>Figure 3<\/strong>\u00a0adds a fuzzy cluster according to a given membership threshold. In this case, any item in clusters 1 or 3 that does not have at least a 60 percent\u00a0membership degree in its primary cluster falls into the \u201cfuzzy\u201d category; these are items we want to watch more closely \u2013 they may be special cases or likely to move from one cluster to another.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/fuzzy-p2.png\" alt=\"fuzzy-p2.png\" width=\"798\" height=\"543\" \/><\/p>\n<p><strong>Figure 3<\/strong><\/p>\n<p><strong>Figure 4<\/strong>\u00a0shows the item numbers of the fuzzy cluster and a summary table, where we can more closely inspect the items in the fuzzy cluster as well as all other products according to their cluster membership. Using the fuzzy clustering results, as well as a discovery tool like Power BI, would allow an even deeper dive into the data.<\/p>\n<p><strong><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/fuzzy-p3.png\" alt=\"fuzzy-p3.png\" width=\"798\" height=\"543\" \/><\/strong><\/p>\n<p><strong><img decoding=\"async\" src=\"https:\/\/3cloudsolutions.com\/wp-content\/uploads\/2022\/11\/fuzzy-p3b.png\" alt=\"fuzzy-p3b.png\" \/><\/strong><\/p>\n<p><strong>Figure 4<\/strong><\/p>\n<p>For those of you wondering about the smaller dots on the perimeter of all the clusters, these items have small membership degrees because they may represent outliers. The \u2018fclust\u2019 package used in this example also has a function to detect and create an \u2018outlier\u2019 cluster for anomaly detection!<\/p>\n<p>Fuzzy clustering represents an excellent way to visualize statistical groupings of data and also highlight items of interest that might need special attention. R, a platform designed especially for analytics, makes this easy. For more information on advanced analytics, be sure to check out the helpful resources on our <a href=\"https:\/\/www.blue-granite.com\/microsoft-r\">Microsoft R<\/a> landing page and our <a href=\"\/webinar-overview-of-text-analytics-microsoft-azure\">webinar on text analytics<\/a>.<\/p>\n<p>If you have questions or need assistance with an advanced analytics project\u00a0please\u00a0contact <a href=\"https:\/\/www.blue-granite.com\/contact-us\">BlueGranite<\/a> today.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Overview of fuzzy clustering for supply chain analytics to visualize statistical groupings of data and highlight items of interest using R.<\/p>\n","protected":false},"author":21,"featured_media":14793,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"content-type":"","footnotes":""},"categories":[260],"tags":[319,341],"class_list":["post-15991","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-ai","tag-machine-learning-ai","tag-r","topics-blog"],"acf":[],"_links":{"self":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts\/15991","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/users\/21"}],"replies":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/comments?post=15991"}],"version-history":[{"count":0,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/posts\/15991\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/media\/14793"}],"wp:attachment":[{"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/media?parent=15991"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/categories?post=15991"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/3cloudsolutions.com\/wp-json\/wp\/v2\/tags?post=15991"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}