{"id":15802,"date":"2020-04-19T00:18:33","date_gmt":"2020-04-18T23:18:33","guid":{"rendered":"https:\/\/www.datanovia.com\/en\/?p=15802"},"modified":"2020-04-19T00:20:25","modified_gmt":"2020-04-18T23:20:25","slug":"seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice","status":"publish","type":"post","link":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/","title":{"rendered":"Seriation in R: How to Optimally Order Objects in a Data Matrice"},"content":{"rendered":"<div id=\"rdoc\">\n<p>This article describes <strong>seriation methods<\/strong>, which consists of finding a suitable linear order for a set of objects in data using loss or merit functions.<\/p>\n<p>There are different seriation algorithms. The input data can be either a dissimilarity matrix or a standard data matrix.<\/p>\n<p>You will learn how to perform seriation in R and visualize the reordered data using the <strong>seriation<\/strong> R package.<\/p>\n<p>Contents:<\/p>\n<div id=\"TOC\">\n<ul>\n<li><a href=\"#prerequisites\">Prerequisites<\/a><\/li>\n<li><a href=\"#data-preparation\">Data preparation<\/a><\/li>\n<li><a href=\"#basic-example-of-seriation\">Basic example of seriation<\/a><\/li>\n<li><a href=\"#heat-maps\">Heat maps<\/a><\/li>\n<li><a href=\"#bertins-permutation-matrix\">Bertin\u2019s permutation matrix<\/a><\/li>\n<li><a href=\"#binary-data-matrices\">Binary data matrices<\/a><\/li>\n<li><a href=\"#summary\">Summary<\/a><\/li>\n<li><a href=\"#references\">References<\/a><\/li>\n<\/ul>\n<\/div>\n<div id=\"prerequisites\" class=\"section level2\">\n<h2>Prerequisites<\/h2>\n<p>Load required R packages:<\/p>\n<pre class=\"r\"><code>library(seriation)<\/code><\/pre>\n<\/div>\n<div id=\"data-preparation\" class=\"section level2\">\n<h2>Data preparation<\/h2>\n<p>Demo data: <code>iris<\/code><\/p>\n<pre class=\"r\"><code># Load the data\r\ndata(\"iris\")\r\ndf &lt;- iris\r\nhead(df, 2)<\/code><\/pre>\n<pre><code>##   Sepal.Length Sepal.Width Petal.Length Petal.Width Species\r\n## 1          5.1         3.5          1.4         0.2  setosa\r\n## 2          4.9         3.0          1.4         0.2  setosa<\/code><\/pre>\n<pre class=\"r\"><code># Remove the column `species` (column 5)\r\ndf &lt;- df[, -5]\r\n# Reorder the objects randomly\r\nset.seed(123)\r\ndf &lt;- df[sample(seq_len(nrow(df))),]\r\nhead(df, 2)<\/code><\/pre>\n<pre><code>##     Sepal.Length Sepal.Width Petal.Length Petal.Width\r\n## 44           5.0         3.5          1.6         0.6\r\n## 118          7.7         3.8          6.7         2.2<\/code><\/pre>\n<\/div>\n<div id=\"basic-example-of-seriation\" class=\"section level2\">\n<h2>Basic example of seriation<\/h2>\n<p>Reorder objects and inspect the effect of seriation on dissimilarity matrix:<\/p>\n<pre class=\"r\"><code># Compute dissimilarity matrix\r\ndist_result &lt;- dist(df)\r\n# Seriate objects, reorder rows based on their similarity\r\nobject_order &lt;- seriate(dist_result)\r\n# Extract object orders\r\nhead(get_order(object_order), 15)<\/code><\/pre>\n<pre><code>##  [1]  78   2  52  83  76 139 148  32  59  20 129 103 143   4  85<\/code><\/pre>\n<pre class=\"r\"><code># Visualize the effect of seriation on dissimilarity matrix\r\npimage(dist_result, main = \"Random order\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-effect-of-seriation-on-dissimilarity-matrix-1.png\" width=\"576\" \/><\/p>\n<pre class=\"r\"><code>pimage(dist_result, order = object_order, main = \"Reordered\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-effect-of-seriation-on-dissimilarity-matrix-2.png\" width=\"576\" \/><\/p>\n<p>Effect of the seriation on the original data scale. We standardize the data using scale such that the visualized value is the number of standard diviations an object differs from the variable mean. For matrices containing negative values, <code>pimage()<\/code> uses automatically a divergent palette.<\/p>\n<p>Since the seriation above only produced an order for the rows of the data, we use <code>NA<\/code> for columns orders in the R code below.<\/p>\n<pre class=\"r\"><code># Heamap of the raw data\r\npimage(scale(df), main = \"Random\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-effect-of-seriation-on-the-original-data-1.png\" width=\"576\" \/><\/p>\n<pre class=\"r\"><code># Heatmap of the reordered data\r\npimage(scale(df), order = c(object_order, NA), main = \"Reordered\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-effect-of-seriation-on-the-original-data-2.png\" width=\"576\" \/><\/p>\n<\/div>\n<div id=\"heat-maps\" class=\"section level2\">\n<h2>Heat maps<\/h2>\n<p>A heat map is a color coded data matrix with a dendrogram added to one side and to the top to indicate the order of rows and columns.<\/p>\n<p>Typically, reordering is done according to row or column means within the restrictions imposed by the dendrogram.<\/p>\n<p>It is possible to find the optimal ordering of the leaf nodes of a dendrogram which minimizes the distances between adjacent objects. Such an order might provide an improvement over using simple reordering such as the row or column means with respect to presentation.<\/p>\n<p>The R function <code>hmap()<\/code> [seriation package] uses optimal ordering and can also use seriation directly on distance matrices without using hierarchical clustering to produce dendrograms first. It uses the function <code>gplots::heatmap.2()<\/code> to create the heatmap.<\/p>\n<p>For the following example, we use again the randomly reordered iris data set from the examples above. To make the variables (columns) comparable, we use standard scaling.<\/p>\n<pre class=\"r\"><code># Standardize the data\r\ndf_scaled &lt;- scale(df, center = FALSE)\r\n\r\n# Produce a heat map with optimally reordered dendrograms\r\n# Hierarchical clustering is used to produce dendrograms\r\nhmap(df_scaled, margin = c(7, 4), cexCol = 1, labRow = FALSE)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-heat-maps-1.png\" width=\"576\" \/><\/p>\n<pre class=\"r\"><code># Specify seriation method\r\n# seriation on the dissimilarity matrices for rows and columns is performed\r\nhmap(df_scaled, method = \"MDS\")<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-heat-maps-2.png\" width=\"576\" \/><\/p>\n<\/div>\n<div id=\"bertins-permutation-matrix\" class=\"section level2\">\n<h2>Bertin\u2019s permutation matrix<\/h2>\n<p>The idea is to reveal a more homogeneous structure in a data matrix by simultaneously rearranging rows and columns. The rearranged matrix is displayed and cases and variables can be grouped manually to gain a better understanding of the data.<\/p>\n<p>As an example, we use the <code>USArrests<\/code> dataset, which contains the violent crime rates by US states in 1973. To make values comparable across columns (variables), the ranks of the values for each variable are used instead of the original values.<\/p>\n<p>For seriation, we calculate distances between rows and between columns using the sum of absolute rank differences (this is equal to the Minkowski distance with power 1).<\/p>\n<p>In the example, below the output is illustrated as a matrix of bars. High values are highlighted (filled blocks). The cases are displayed as the columns and the variables as rows.<\/p>\n<pre class=\"r\"><code># Data preparation\r\n# Load the dataset\r\ndata(\"USArrests\")\r\n# Replace original values by their ranks\r\ndf &lt;- head(apply(USArrests, 2, rank), 30)\r\n\r\n# Perform seriation on row and columns\r\nrow_order &lt;- seriate(dist(df, \"minkowski\", p = 1),  method =\"TSP\")\r\ncol_order &lt;- seriate(dist(t(df), \"minkowski\", p = 1),  method =\"TSP\")\r\norders &lt;- c(row_order, col_order)\r\n\r\n# Visualization: matrix of bars \r\n# Original matrix\r\nbertinplot(df)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-berlin-permutation-matrix-1.png\" width=\"576\" \/><\/p>\n<pre class=\"r\"><code># Rearranged matrix\r\nbertinplot(df, orders)<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-berlin-permutation-matrix-2.png\" width=\"576\" \/><\/p>\n<\/div>\n<div id=\"binary-data-matrices\" class=\"section level2\">\n<h2>Binary data matrices<\/h2>\n<p>Binary data are 0-1 data matrices. The standard visualization of <code>bertinplot()<\/code>, do not make much sense for binary data. We can use the panel functions <code>panel.squares()<\/code> or <code>panel.circles()<\/code>.<\/p>\n<pre class=\"r\"><code># Load demo data\r\ndata(\"Townships\")\r\n# Visualize the original data\r\nbertinplot(\r\n  Townships, \r\n  options = list(panel = panel.circles)\r\n  )<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-binary-data-matrix-1.png\" width=\"576\" \/><\/p>\n<pre class=\"r\"><code># Seriate rows and columns using the bond energy algorithm (BEA)\r\nset.seed(1234)\r\norders &lt;- seriate(Townships, method = \"BEA\", control = list(rep = 10))\r\nbertinplot(\r\n  Townships, order = orders, \r\n  options = list(panel = panel.circles)\r\n  )<\/code><\/pre>\n<p><img decoding=\"async\" src=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/dn-tutorials\/r-tutorial\/figures\/seriation-in-r-binary-data-matrix-2.png\" width=\"576\" \/><\/p>\n<div class=\"block\">\n<p>A clear structure is visible in the reordered matrix is displayed. The variables (rows in a Bertin plot) can be split into the three categories describing different evolution states of townships:<\/p>\n<ol style=\"list-style-type: decimal;\">\n<li>Rural: No doctor, one-room school and possibly also no water supply<\/li>\n<li>Intermediate: Land reallocation, veterinary and agricultural cooperative<\/li>\n<li>Urban: Railway station, high school and police station<\/li>\n<\/ol>\n<p>The townships also clearly fall into these three groups which tentatively can be called villages (first 7), towns (next 5) and cities (final 2). The townships B and C are on the transition to the next higher group.<\/p>\n<\/div>\n<\/div>\n<div id=\"summary\" class=\"section level2\">\n<h2>Summary<\/h2>\n<p>This articles describes how to reorder objects in a dataset using seriation methods.<\/p>\n<\/div>\n<div id=\"references\" class=\"section level2\">\n<h2>References<\/h2>\n<ul>\n<li>Michael Hahsler, Kurt Hornik and Christian Buchta, <a href=\"http:\/\/dx.doi.org\/10.18637\/jss.v025.i03\">Getting Things in Order: An Introduction to the R Package seriation,<\/a> <em>Journal of Statistical Software,<\/em> 25(3), 2008.<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<p><!--end rdoc--><\/p>\n","protected":false},"excerpt":{"rendered":"<p>This article describes seriation methods, which consists of finding a suitable linear order for a set of objects in data using loss or merit functions. There are different seriation algorithms. [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":15806,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"rating_form_position":"","rating_results_position":"","mr_structured_data_type":"","footnotes":""},"categories":[123,134],"tags":[363],"class_list":["post-15802","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-cluster-analysis","category-data-visualization","tag-heatmap"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.2 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Seriation in R: How to Optimally Order Objects in a Data Matrice - Datanovia<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Seriation in R: How to Optimally Order Objects in a Data Matrice - Datanovia\" \/>\n<meta property=\"og:description\" content=\"This article describes seriation methods, which consists of finding a suitable linear order for a set of objects in data using loss or merit functions. There are different seriation algorithms. [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/\" \/>\n<meta property=\"og:site_name\" content=\"Datanovia\" \/>\n<meta property=\"article:published_time\" content=\"2020-04-18T23:18:33+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2020-04-18T23:20:25+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png\" \/>\n\t<meta property=\"og:image:width\" content=\"1344\" \/>\n\t<meta property=\"og:image:height\" content=\"864\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Alboukadel\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Alboukadel\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/\"},\"author\":{\"name\":\"Alboukadel\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e\"},\"headline\":\"Seriation in R: How to Optimally Order Objects in a Data Matrice\",\"datePublished\":\"2020-04-18T23:18:33+00:00\",\"dateModified\":\"2020-04-18T23:20:25+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/\"},\"wordCount\":633,\"commentCount\":4,\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png\",\"keywords\":[\"Heatmap\"],\"articleSection\":[\"Cluster Analysis\",\"Data Visualization\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/\",\"name\":\"Seriation in R: How to Optimally Order Objects in a Data Matrice - Datanovia\",\"isPartOf\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png\",\"datePublished\":\"2020-04-18T23:18:33+00:00\",\"dateModified\":\"2020-04-18T23:20:25+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png\",\"width\":1344,\"height\":864,\"caption\":\"seriation-in-r-logo-1.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.datanovia.com\/en\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Seriation in R: How to Optimally Order Objects in a Data Matrice\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#website\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"name\":\"Datanovia\",\"description\":\"Data Mining and Statistics for Decision Support\",\"publisher\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.datanovia.com\/en\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#organization\",\"name\":\"Datanovia\",\"url\":\"https:\/\/www.datanovia.com\/en\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"contentUrl\":\"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png\",\"width\":98,\"height\":99,\"caption\":\"Datanovia\"},\"image\":{\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/\"}},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e\",\"name\":\"Alboukadel\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g\",\"caption\":\"Alboukadel\"},\"url\":\"https:\/\/www.datanovia.com\/en\/blog\/author\/kassambara\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Seriation in R: How to Optimally Order Objects in a Data Matrice - Datanovia","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/","og_locale":"en_US","og_type":"article","og_title":"Seriation in R: How to Optimally Order Objects in a Data Matrice - Datanovia","og_description":"This article describes seriation methods, which consists of finding a suitable linear order for a set of objects in data using loss or merit functions. There are different seriation algorithms. [&hellip;]","og_url":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/","og_site_name":"Datanovia","article_published_time":"2020-04-18T23:18:33+00:00","article_modified_time":"2020-04-18T23:20:25+00:00","og_image":[{"width":1344,"height":864,"url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png","type":"image\/png"}],"author":"Alboukadel","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Alboukadel","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#article","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/"},"author":{"name":"Alboukadel","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e"},"headline":"Seriation in R: How to Optimally Order Objects in a Data Matrice","datePublished":"2020-04-18T23:18:33+00:00","dateModified":"2020-04-18T23:20:25+00:00","mainEntityOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/"},"wordCount":633,"commentCount":4,"publisher":{"@id":"https:\/\/www.datanovia.com\/en\/#organization"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png","keywords":["Heatmap"],"articleSection":["Cluster Analysis","Data Visualization"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/","url":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/","name":"Seriation in R: How to Optimally Order Objects in a Data Matrice - Datanovia","isPartOf":{"@id":"https:\/\/www.datanovia.com\/en\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage"},"thumbnailUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png","datePublished":"2020-04-18T23:18:33+00:00","dateModified":"2020-04-18T23:20:25+00:00","breadcrumb":{"@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#primaryimage","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2020\/04\/seriation-in-r-logo-1.png","width":1344,"height":864,"caption":"seriation-in-r-logo-1.png"},{"@type":"BreadcrumbList","@id":"https:\/\/www.datanovia.com\/en\/blog\/seriation-in-r-how-to-optimally-order-objects-in-a-data-matrice\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.datanovia.com\/en\/"},{"@type":"ListItem","position":2,"name":"Seriation in R: How to Optimally Order Objects in a Data Matrice"}]},{"@type":"WebSite","@id":"https:\/\/www.datanovia.com\/en\/#website","url":"https:\/\/www.datanovia.com\/en\/","name":"Datanovia","description":"Data Mining and Statistics for Decision Support","publisher":{"@id":"https:\/\/www.datanovia.com\/en\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.datanovia.com\/en\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.datanovia.com\/en\/#organization","name":"Datanovia","url":"https:\/\/www.datanovia.com\/en\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/","url":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","contentUrl":"https:\/\/www.datanovia.com\/en\/wp-content\/uploads\/2018\/09\/datanovia-logo.png","width":98,"height":99,"caption":"Datanovia"},"image":{"@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/logo\/image\/"}},{"@type":"Person","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/7767cf2bd5c91a1610c6eb53a0ff069e","name":"Alboukadel","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.datanovia.com\/en\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/ed3108646c5c7c3d188324ab972f96ad7d9975b41b94014d7f68257791be395a?s=96&d=mm&r=g","caption":"Alboukadel"},"url":"https:\/\/www.datanovia.com\/en\/blog\/author\/kassambara\/"}]}},"multi-rating":{"mr_rating_results":[]},"_links":{"self":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts\/15802","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/comments?post=15802"}],"version-history":[{"count":2,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts\/15802\/revisions"}],"predecessor-version":[{"id":15808,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/posts\/15802\/revisions\/15808"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media\/15806"}],"wp:attachment":[{"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/media?parent=15802"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/categories?post=15802"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.datanovia.com\/en\/wp-json\/wp\/v2\/tags?post=15802"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}