{"id":18514,"date":"2020-08-17T19:27:53","date_gmt":"2020-08-17T13:57:53","guid":{"rendered":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/"},"modified":"2024-09-02T15:30:59","modified_gmt":"2024-09-02T10:00:59","slug":"understanding-sparse-matrix","status":"publish","type":"post","link":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/","title":{"rendered":"Understanding Sparse Matrix with Examples"},"content":{"rendered":"\n<p><em>Contributed by: Shreya <br>LinkedIn Profile: <a href=\"https:\/\/www.linkedin.com\/in\/shreya-shetty-9a070792\/\" target=\"_blank\" rel=\"nofollow noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/www.linkedin.com\/in\/shreya-shetty-9a070792\/<\/a>  <\/em><\/p>\n\n\n\n<p>If you have worked with natural language uses cases, you would have definitely come across the process of converting text into the format that machines understand, i.e. numeric. While we are able to put it into the numeric format, we observe lot of zeros(majority) programmatically where it has \u2018m\u2019 rows and \u2018n\u2019 columns. Wondering where are we heading to, it is a&nbsp;<a rel=\"noreferrer noopener nofollow\" aria-label=\" (opens in a new tab)\" href=\"https:\/\/en.wikipedia.org\/wiki\/Matrix_(mathematics)\" target=\"_blank\">matrix<\/a>&nbsp;in which most of the elements are zero.<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"definition\"><strong>Definition<\/strong><\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"sparse-matrix-sparse-array\"><strong>Sparse Matrix\/Sparse Array:<\/strong><\/h3>\n\n\n\n<p>A matrix is a two-dimensional data object made of m rows and n columns, therefore having a total m x n values. If most of the elements of the matrix have 0 value, then it is called a sparse matrix.<\/p>\n\n\n\n<p>The number of zero-valued elements divided by the total number of elements (e.g., m \u00d7 n for an m \u00d7 n matrix) is called the sparsity of the matrix (which is equal to 1 minus the density of the matrix). Using those definitions, a matrix will be sparse when its sparsity is greater than 0.5.<br><\/p>\n\n\n\n<p>Let\u2019s quickly looks at the math: Total elements: 35, Non zero: 9 and Zeros: 26 and hence makes the sparsity= 26\/35 and Density=9\/35<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"history\"><strong>History<\/strong><\/h2>\n\n\n\n<p>The term sparse matrix was possibly coined by Harry Markowitz<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"why-learn-sparse-matrix\"><strong>Why learn Sparse matrix?<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Analysing the book page by page, each word will be converted into a numeric format and considering 100000 words, there will be 100 words if we go page wise and results in a sparse matrix.<\/li>\n\n\n\n<li>Analysing the product review in e-commerce site, 1 product out of huge list will also boil down to sparse matrix when we look at holistically.<\/li>\n\n\n\n<li>Identifying the core topics in the documents.<\/li>\n\n\n\n<li>Summarising the large paragraphs.<\/li>\n\n\n\n<li>Sentiment analysis of tweets on social media.<\/li>\n<\/ul>\n\n\n\n<p>Scenarios go on and if you are thinking to be an analyst that makes it implicit to learn the best use of the sparse matrix. Most importantly computers can understand only numbers and the above scenarios clearly result in the sparse matrix while converting text into Numbers.<\/p>\n\n\n\n<p>I will take a simple example to show the sparse matrix generation in the context of text analytics:<\/p>\n\n\n\n<p>We are analysing the sentences of a novel and below are the 2 sentences:<\/p>\n\n\n\n<ol class=\"wp-block-list\">\n<li>Mary had a little lamb<\/li>\n\n\n\n<li>Little things really matter in life<\/li>\n<\/ol>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>Words<\/td><td>Mary<\/td><td>had<\/td><td>a<\/td><td>little<\/td><td>lamb<\/td><td>little&nbsp;<\/td><td>things<\/td><td>really<\/td><td>matter&nbsp;<\/td><td>in&nbsp;<\/td><td>life<\/td><\/tr><tr><td>Sentence1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>0<\/td><td>0<\/td><td>0<\/td><td>0<\/td><td>0<\/td><\/tr><tr><td>Sentence2<\/td><td>0<\/td><td>0<\/td><td>0<\/td><td>1<\/td><td>0<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><td>1<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>Imagine this for a large number of sentences and how sparse the words will be. It is evident we have to deal with it. Please note there are many ways of representing text as numbers (One hot encoding, Count Vectorizer Encoding and TF-IDF encoding)<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"challenges-of-handling-sparse-matrix\"><strong>Challenges of Handling Sparse Matrix<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Memory: Even though the majority of elements are zero and has no information, space is utilized to store it and needs a way to handle it.<\/li>\n\n\n\n<li>Computational: To perform any calculations like matrix multiplication might take a lot of time due to although we know the result is 0. It has to still perform the process and time is wasted.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"efficient-ways-of-handling-sparse-matrix\"><strong>Efficient Ways of Handling Sparse Matrix<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Storage:&nbsp;<\/strong>There are lesser non-zero elements than zeros and thus lesser memory can be used to store only those elements.<\/li>\n\n\n\n<li><strong>Computing time:<\/strong>&nbsp;Computing time can be saved by logically designing a data structure traversing only non-zero elements.<\/li>\n<\/ul>\n\n\n\n<p>When storing and manipulating sparse matrices on a computer, it is beneficial and often necessary to use specialized algorithms and data structures that take advantage of the sparse structure of the matrix.<\/p>\n\n\n\n<p>Sparse data is by nature more easily compressed and thus requires significantly less storage.&nbsp;<\/p>\n\n\n\n<p>Storing the Sparse Matrix: Format can be broadly classified into:<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"efficient-modification-formats\"><strong>Efficient Modification formats<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>Dictionary of keys (DOK): DOK consists of a dictionary that maps (row, column)-pairs to the value of the elements.<\/li>\n\n\n\n<li>List of lists (LIL): LIL stores one list per row, with each entry containing the column index and the value.<\/li>\n\n\n\n<li>Coordinate list (COO): stores a list of&nbsp;(row, column, value)&nbsp;tuples.\t<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"efficient-access-and-operations-format\"><strong>Efficient Access and operations format<\/strong><\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CSR (Compressed Sparse Row):<\/li>\n<\/ul>\n\n\n\n<p><strong>data<\/strong> is a row-wise flattened array<\/p>\n\n\n\n<p><strong>indices<\/strong> are indices of the columns<\/p>\n\n\n\n<p><strong>indptr<\/strong> is a pointer for data and indices, an array of length row + 1, with the max of its element as the length of the data or indices.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>CSC (Compressed Sparse Column)<\/li>\n<\/ul>\n\n\n\n<p><strong>data<\/strong> is simply a column-wise flattened version of the matrix<\/p>\n\n\n\n<p><strong>indices<\/strong> is the row indices for the corresponding elements of the data, e.g., the first element in the data is a 1, and it is located in the row index 1(second row); the second element in the data is a 2, and the row index is 3(fourth row), etc...<\/p>\n\n\n\n<p><strong>indptr<\/strong> is a pointer for data and indices, an array of length col + 1, with max of its element as the length of the data or indices. It is representing the range of column indices that each element in the data belongs to. In the above example, we have<\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"conclusion\"><strong>Conclusion<\/strong><\/h2>\n\n\n\n<p>In nutshell, Sparse matrix is common in most of the scenarios of natural language processing. Choosing the applicable compressing technique and efficiently utilising memory and computational power is key while analysing the unstructured data.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Contributed by: Shreya LinkedIn Profile: https:\/\/www.linkedin.com\/in\/shreya-shetty-9a070792\/ If you have worked with natural language uses cases, you would have definitely come across the process of converting text into the format that machines understand, i.e. numeric. While we are able to put it into the numeric format, we observe lot of zeros(majority) programmatically where it has \u2018m\u2019 [&hellip;]<\/p>\n","protected":false},"author":41,"featured_media":18529,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"_uag_custom_page_level_css":"","site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"default","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","ast-disable-related-posts":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"set","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"var(--ast-global-color-4)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"footnotes":""},"categories":[2],"tags":[],"content_type":[],"class_list":["post-18514","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-artificial-intelligence"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.3 (Yoast SEO v27.3) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Understanding Sparse Matrix with Examples<\/title>\n<meta name=\"description\" content=\"Sparse Matrix: This article explains what is sparse matrix and what are the challenges and efficient ways of handling sparse matrix. Click to know more.\" \/>\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.mygreatlearning.com\/blog\/understanding-sparse-matrix\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Understanding Sparse Matrix with Examples\" \/>\n<meta property=\"og:description\" content=\"Sparse Matrix: This article explains what is sparse matrix and what are the challenges and efficient ways of handling sparse matrix. Click to know more.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/\" \/>\n<meta property=\"og:site_name\" content=\"Great Learning Blog: Free Resources what Matters to shape your Career!\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/GreatLearningOfficial\/\" \/>\n<meta property=\"article:published_time\" content=\"2020-08-17T13:57:53+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2024-09-02T10:00:59+00:00\" \/>\n<meta property=\"og:image\" content=\"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1000\" \/>\n\t<meta property=\"og:image:height\" content=\"700\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Great Learning Editorial Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@https:\/\/twitter.com\/Great_Learning\" \/>\n<meta name=\"twitter:site\" content=\"@Great_Learning\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Great Learning Editorial Team\" \/>\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.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#article\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/\"},\"author\":{\"name\":\"Great Learning Editorial Team\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\"},\"headline\":\"Understanding Sparse Matrix with Examples\",\"datePublished\":\"2020-08-17T13:57:53+00:00\",\"dateModified\":\"2024-09-02T10:00:59+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/\"},\"wordCount\":863,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/shutterstock_1639825231.jpg\",\"articleSection\":[\"AI and Machine Learning\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/\",\"name\":\"Understanding Sparse Matrix with Examples\",\"isPartOf\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#primaryimage\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#primaryimage\"},\"thumbnailUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/shutterstock_1639825231.jpg\",\"datePublished\":\"2020-08-17T13:57:53+00:00\",\"dateModified\":\"2024-09-02T10:00:59+00:00\",\"description\":\"Sparse Matrix: This article explains what is sparse matrix and what are the challenges and efficient ways of handling sparse matrix. Click to know more.\",\"breadcrumb\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#primaryimage\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/shutterstock_1639825231.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2020\\\/07\\\/shutterstock_1639825231.jpg\",\"width\":1000,\"height\":700,\"caption\":\"sparse matrix\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/understanding-sparse-matrix\\\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Blog\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"AI and Machine Learning\",\"item\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/artificial-intelligence\\\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Understanding Sparse Matrix with Examples\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#website\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"name\":\"Great Learning Blog\",\"description\":\"Learn, Upskill &amp; Career Development Guide and Resources\",\"publisher\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\"},\"alternateName\":\"Great Learning\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#organization\",\"name\":\"Great Learning\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/06\\\/GL-Logo.jpg\",\"width\":900,\"height\":900,\"caption\":\"Great Learning\"},\"image\":{\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/logo\\\/image\\\/\"},\"sameAs\":[\"https:\\\/\\\/www.facebook.com\\\/GreatLearningOfficial\\\/\",\"https:\\\/\\\/x.com\\\/Great_Learning\",\"https:\\\/\\\/www.instagram.com\\\/greatlearningofficial\\\/\",\"https:\\\/\\\/www.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/in.pinterest.com\\\/greatlearning12\\\/\",\"https:\\\/\\\/www.youtube.com\\\/user\\\/beaconelearning\\\/\"],\"description\":\"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.\",\"email\":\"info@mygreatlearning.com\",\"legalName\":\"Great Learning Education Services Pvt. Ltd\",\"foundingDate\":\"2013-11-29\",\"numberOfEmployees\":{\"@type\":\"QuantitativeValue\",\"minValue\":\"1001\",\"maxValue\":\"5000\"}},{\"@type\":\"Person\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/#\\\/schema\\\/person\\\/6f993d1be4c584a335951e836f2656ad\",\"name\":\"Great Learning Editorial Team\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"contentUrl\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/wp-content\\\/uploads\\\/2022\\\/02\\\/unnamed.webp\",\"caption\":\"Great Learning Editorial Team\"},\"description\":\"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.\",\"sameAs\":[\"https:\\\/\\\/www.mygreatlearning.com\\\/\",\"https:\\\/\\\/in.linkedin.com\\\/school\\\/great-learning\\\/\",\"https:\\\/\\\/x.com\\\/https:\\\/\\\/twitter.com\\\/Great_Learning\",\"https:\\\/\\\/www.youtube.com\\\/channel\\\/UCObs0kLIrDjX2LLSybqNaEA\"],\"award\":[\"Best EdTech Company of the Year 2024\",\"Education Economictimes Outstanding Education\\\/Edtech Solution Provider of the Year 2024\",\"Leading E-learning Platform 2024\"],\"url\":\"https:\\\/\\\/www.mygreatlearning.com\\\/blog\\\/author\\\/greatlearning\\\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Understanding Sparse Matrix with Examples","description":"Sparse Matrix: This article explains what is sparse matrix and what are the challenges and efficient ways of handling sparse matrix. Click to know more.","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.mygreatlearning.com\/blog\/understanding-sparse-matrix\/","og_locale":"en_US","og_type":"article","og_title":"Understanding Sparse Matrix with Examples","og_description":"Sparse Matrix: This article explains what is sparse matrix and what are the challenges and efficient ways of handling sparse matrix. Click to know more.","og_url":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/","og_site_name":"Great Learning Blog: Free Resources what Matters to shape your Career!","article_publisher":"https:\/\/www.facebook.com\/GreatLearningOfficial\/","article_published_time":"2020-08-17T13:57:53+00:00","article_modified_time":"2024-09-02T10:00:59+00:00","og_image":[{"width":1000,"height":700,"url":"http:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg","type":"image\/jpeg"}],"author":"Great Learning Editorial Team","twitter_card":"summary_large_image","twitter_creator":"@https:\/\/twitter.com\/Great_Learning","twitter_site":"@Great_Learning","twitter_misc":{"Written by":"Great Learning Editorial Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#article","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/"},"author":{"name":"Great Learning Editorial Team","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad"},"headline":"Understanding Sparse Matrix with Examples","datePublished":"2020-08-17T13:57:53+00:00","dateModified":"2024-09-02T10:00:59+00:00","mainEntityOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/"},"wordCount":863,"commentCount":0,"publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg","articleSection":["AI and Machine Learning"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/","url":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/","name":"Understanding Sparse Matrix with Examples","isPartOf":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#primaryimage"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#primaryimage"},"thumbnailUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg","datePublished":"2020-08-17T13:57:53+00:00","dateModified":"2024-09-02T10:00:59+00:00","description":"Sparse Matrix: This article explains what is sparse matrix and what are the challenges and efficient ways of handling sparse matrix. Click to know more.","breadcrumb":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#primaryimage","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg","width":1000,"height":700,"caption":"sparse matrix"},{"@type":"BreadcrumbList","@id":"https:\/\/www.mygreatlearning.com\/blog\/understanding-sparse-matrix\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Blog","item":"https:\/\/www.mygreatlearning.com\/blog\/"},{"@type":"ListItem","position":2,"name":"AI and Machine Learning","item":"https:\/\/www.mygreatlearning.com\/blog\/artificial-intelligence\/"},{"@type":"ListItem","position":3,"name":"Understanding Sparse Matrix with Examples"}]},{"@type":"WebSite","@id":"https:\/\/www.mygreatlearning.com\/blog\/#website","url":"https:\/\/www.mygreatlearning.com\/blog\/","name":"Great Learning Blog","description":"Learn, Upskill &amp; Career Development Guide and Resources","publisher":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization"},"alternateName":"Great Learning","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.mygreatlearning.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.mygreatlearning.com\/blog\/#organization","name":"Great Learning","url":"https:\/\/www.mygreatlearning.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/06\/GL-Logo.jpg","width":900,"height":900,"caption":"Great Learning"},"image":{"@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/GreatLearningOfficial\/","https:\/\/x.com\/Great_Learning","https:\/\/www.instagram.com\/greatlearningofficial\/","https:\/\/www.linkedin.com\/school\/great-learning\/","https:\/\/in.pinterest.com\/greatlearning12\/","https:\/\/www.youtube.com\/user\/beaconelearning\/"],"description":"Great Learning is a leading global ed-tech company for professional training and higher education. It offers comprehensive, industry-relevant, hands-on learning programs across various business, technology, and interdisciplinary domains driving the digital economy. These programs are developed and offered in collaboration with the world's foremost academic institutions.","email":"info@mygreatlearning.com","legalName":"Great Learning Education Services Pvt. Ltd","foundingDate":"2013-11-29","numberOfEmployees":{"@type":"QuantitativeValue","minValue":"1001","maxValue":"5000"}},{"@type":"Person","@id":"https:\/\/www.mygreatlearning.com\/blog\/#\/schema\/person\/6f993d1be4c584a335951e836f2656ad","name":"Great Learning Editorial Team","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","url":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","contentUrl":"https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2022\/02\/unnamed.webp","caption":"Great Learning Editorial Team"},"description":"The Great Learning Editorial Staff includes a dynamic team of subject matter experts, instructors, and education professionals who combine their deep industry knowledge with innovative teaching methods. Their mission is to provide learners with the skills and insights needed to excel in their careers, whether through upskilling, reskilling, or transitioning into new fields.","sameAs":["https:\/\/www.mygreatlearning.com\/","https:\/\/in.linkedin.com\/school\/great-learning\/","https:\/\/x.com\/https:\/\/twitter.com\/Great_Learning","https:\/\/www.youtube.com\/channel\/UCObs0kLIrDjX2LLSybqNaEA"],"award":["Best EdTech Company of the Year 2024","Education Economictimes Outstanding Education\/Edtech Solution Provider of the Year 2024","Leading E-learning Platform 2024"],"url":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"}]}},"uagb_featured_image_src":{"full":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg",1000,700,false],"thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231-150x150.jpg",150,150,true],"medium":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231-300x210.jpg",300,210,true],"medium_large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231-768x538.jpg",768,538,true],"large":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg",1000,700,false],"1536x1536":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg",1000,700,false],"2048x2048":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg",1000,700,false],"web-stories-poster-portrait":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg",640,448,false],"web-stories-publisher-logo":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg",96,67,false],"web-stories-thumbnail":["https:\/\/www.mygreatlearning.com\/blog\/wp-content\/uploads\/2020\/07\/shutterstock_1639825231.jpg",150,105,false]},"uagb_author_info":{"display_name":"Great Learning Editorial Team","author_link":"https:\/\/www.mygreatlearning.com\/blog\/author\/greatlearning\/"},"uagb_comment_info":0,"uagb_excerpt":"Contributed by: Shreya LinkedIn Profile: https:\/\/www.linkedin.com\/in\/shreya-shetty-9a070792\/ If you have worked with natural language uses cases, you would have definitely come across the process of converting text into the format that machines understand, i.e. numeric. While we are able to put it into the numeric format, we observe lot of zeros(majority) programmatically where it has \u2018m\u2019&hellip;","_links":{"self":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/18514","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/users\/41"}],"replies":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/comments?post=18514"}],"version-history":[{"count":7,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/18514\/revisions"}],"predecessor-version":[{"id":94593,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/posts\/18514\/revisions\/94593"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media\/18529"}],"wp:attachment":[{"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/media?parent=18514"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/categories?post=18514"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/tags?post=18514"},{"taxonomy":"content_type","embeddable":true,"href":"https:\/\/www.mygreatlearning.com\/blog\/wp-json\/wp\/v2\/content_type?post=18514"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}