<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Mozilla Club of UCSC</title>
    <description>The latest articles on DEV Community by Mozilla Club of UCSC (@ucscmozilla).</description>
    <link>https://dev.to/ucscmozilla</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Forganization%2Fprofile_image%2F3100%2F5b056aef-48f4-407f-afdc-ab4934e66350.jpg</url>
      <title>DEV Community: Mozilla Club of UCSC</title>
      <link>https://dev.to/ucscmozilla</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ucscmozilla"/>
    <language>en</language>
    <item>
      <title>Will Von Neumann Architecture be diminished in the future?</title>
      <dc:creator>Mohammadhu Faalil</dc:creator>
      <pubDate>Wed, 02 Jun 2021 14:13:30 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/will-von-neumann-architecture-be-diminished-in-the-future-2844</link>
      <guid>https://dev.to/ucscmozilla/will-von-neumann-architecture-be-diminished-in-the-future-2844</guid>
      <description>&lt;p&gt;&lt;strong&gt;Introduction&lt;/strong&gt;&lt;br&gt;
Computer architecture has undergone incredible changes in the past 20 years. One element that has remained constant throughout the years, is the von Neumann concept of computer design. It has been used in computers since it was published.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Von Neumann Architecture.&lt;/strong&gt;&lt;br&gt;
Von Neumann architecture was first published by John Von Neumann in 1945. His computer architecture design consists of a Control Unit, Arithmetic and Logical Unit (ALU), Memory unit, Registers and Inputs/Outputs. The basic structure of the Von Neumann Architecture is shown in the Figure below.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FMs9ohSR.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FMs9ohSR.png" alt="1."&gt;&lt;/a&gt;&lt;br&gt;
According to Von Neumann Architecture, CPU consists of two units, Control Unit and Arithmetic Logic Unit. The underlying principle of Von Neumann Architecture is that data and instructions are treated in the same manner which means that both data and instructions are addressable. It operates using for simple steps:- Fetch, Decode, Execute, Store, called the Machine Cycle  as shown in the diagram.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fq2HUsjg.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2Fq2HUsjg.png" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Instructions are fetched from the memory by the CPU. The CPU then decodes and executes the instructions and once it is completed it is stored back in the memory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Von Neumann Bottleneck.&lt;/strong&gt;&lt;br&gt;
Under this architecture, memory for instructions and data are unified and shared with one data bus and one address bus between processor and memory. Instructions and data have to be fetched in sequential order, known as the Von Neumann Bottleneck which limits the bandwidth of memory access. The processor is idle for a certain amount of time while memory is accessed. Though numerous solutions have been proposed and implemented in modern day including cache memory and branch predictor algorithms, these solutions have not been able to solve the root of the problem rather it had made the architecture more complex.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Has the world started to move away from the Von Neumann Architecture?&lt;/strong&gt;&lt;br&gt;
In the modern world, Harvard Architecture has become a challenge for the Von Neumann Architecture. Harvard architecture is a type of computer architecture that separates its memory into two parts so that data and instructions are stored separately. This architecture also has separate buses to transfer data and fetch data. This allows the CPU to fetch data and instructions simultaneously.&lt;br&gt;
Further, IBM researches introduced a new non Von Neumann Architecture called the True North Architecture inspired by the functions of the human brain. Here, it uses a memory controller like a neuron, with no CPU, to work on synaptic-like data sets in memory with no shuffling around whatsoever by virtue of harnessing the crystallization dynamic of phase-change memories .&lt;br&gt;
In addition to these, many other alternative architectures have come up in the world of today.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
It is obvious working with Von Neumann Architecture is not suitable to work in the future and it will be diminished in the near future. Some companies have already started to work with the alternative architectures, and the rest of the world would most probably switch to the alternative architectures as the traditional Von Neumann Architecture will be unable to cater the needs of the future computers.&lt;/p&gt;

</description>
      <category>architecture</category>
      <category>neumann</category>
    </item>
    <item>
      <title>Today’s Supercomputers …</title>
      <dc:creator>Marita Thushari</dc:creator>
      <pubDate>Wed, 26 May 2021 13:56:42 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/today-s-supercomputers-2dpf</link>
      <guid>https://dev.to/ucscmozilla/today-s-supercomputers-2dpf</guid>
      <description>&lt;p&gt;The evolution of computers is basically known by almost everyone who are interested in computers. At the early stages when computers were introduced vacuum tubes, punched cards &amp;amp; such mechanical technologies were used and the computational speed was very low compared to today’s smart phones. As the years passed and technologies were developed at a high rate, the computational power of computers was also increased. Different classes &amp;amp; levels of computers have been built for various purposes. Supercomputers are one of such classes and this article describes the today’s state of Supercomputers.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Supercomputer?
&lt;/h2&gt;

&lt;p&gt;According to the term ‘Supercomputer’, it is defined as the fastest-high-performance system available which is extremely powerful. At the beginning stages, these supercomputers were basically used to satisfy the requirement for solving high-speed computations in scientific &amp;amp; engineering fields.&lt;/p&gt;

&lt;p&gt;Some common applications of supercomputers are given below;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Testing complex mathematical models designed for climate &amp;amp; weather, nuclear weapons &amp;amp; reactors, pharmaceutical purposes, cryptography and etc.&lt;/li&gt;
&lt;li&gt;Market research purposes &amp;amp; other business-related models.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The computational power of the Supercomputers was measured in ‘Floating-point operations per second (FLOPS)’.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why so Super?
&lt;/h2&gt;

&lt;p&gt;It holds following features that makes it able to execute multiple processes simultaneously using one system.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A Huge number of processing units (CPUs) starting with several hundreds of thousands to a million.&lt;/li&gt;
&lt;li&gt;Uses ‘Capability computing’ technique.&lt;/li&gt;
&lt;li&gt;Several terabytes of RAM &amp;amp; memory that is addressable by all processing units.&lt;/li&gt;
&lt;li&gt;High-speed interconnection, rapid data &amp;amp; instruction retrieval, and fast input/output capability.&lt;/li&gt;
&lt;li&gt;Effective thermal management; processor &amp;amp; memory chips are being immersed in a cryogenic fluid to achieve the low temperature.&lt;/li&gt;
&lt;li&gt;Use of ‘Vector Arithmetic’.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Early days…
&lt;/h2&gt;

&lt;p&gt;Supercomputers were initially introduced in the 1960s mainly for the use of national security purposes such as for nuclear weapons design &amp;amp; cryptography. Seymour Cray CDC invented the first supercomputer ‘CDC 6600’ in 1965. Another successful achievement was the introduction of ‘Cray-1’ supercomputer in 1976. As the development of supercomputers increased ‘Cray Research’ held the top ranking of market share in the early days.&lt;/p&gt;

&lt;p&gt;Following is an image of the ‘Cray-1’ supercomputer.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V51-IgWn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.britannica.com/11/23611-050-81E61C8A/Cray-1-supercomputer-diameter-1976.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V51-IgWn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.britannica.com/11/23611-050-81E61C8A/Cray-1-supercomputer-diameter-1976.jpg" alt="Cray-1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Today’s state…
&lt;/h2&gt;

&lt;p&gt;Today’s supercomputers are widely used for various purposes including aerospace, petroleum, automotive industries, weather forecasting and online gaming as well. Various countries such Japan, USA, Germany, Italy, France, China, Saudi-Arabia and India etc. have shown a great improvement in developing supercomputers. At present, the supercomputer ‘Fugaku’ built by ‘Fujitsu’ of Japan is considered to be the world’s most powerful one followed by two other IBM supercomputers. &lt;/p&gt;

&lt;p&gt;Below given is an image of the ‘Fugaku’ supercomputer.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WpETKBCX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-japantimes.com/wp-content/uploads/2020/11/np_file_51348.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WpETKBCX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-japantimes.com/wp-content/uploads/2020/11/np_file_51348.jpeg" alt="Fugaku"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And according to today’s market IBM with 44% of share ranks at the top of supercomputer manufacturers followed closely by Hewlett Packard with 28%.&lt;/p&gt;

&lt;p&gt;The usage of Supercomputers with the developed AI technologies is currently serving COVID-19 pandemic in a useful way in medical research purposes as well.&lt;/p&gt;

&lt;p&gt;The following image states the world’s Top 8 Supercomputers ranked according to the statistics.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZOFmw3PP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.statcdn.com/Infographic/images/normal/9981.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZOFmw3PP--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.statcdn.com/Infographic/images/normal/9981.jpeg" alt="Top 8 Supercomputers"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>supercomputers</category>
      <category>technology</category>
      <category>article</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>5 Psychological theories that are used in UI/UX Design</title>
      <dc:creator>Akila Maithripala</dc:creator>
      <pubDate>Fri, 14 May 2021 05:49:00 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/5-psychological-theories-that-are-used-in-ui-ux-design-4kgl</link>
      <guid>https://dev.to/ucscmozilla/5-psychological-theories-that-are-used-in-ui-ux-design-4kgl</guid>
      <description>&lt;p&gt;Designing is an art. When a good design is used on top of a good interface, it creates a beautiful harmony between the two layers of technology. Same way, no good design is valued if the backend is non-functional and vice versa. &lt;/p&gt;

&lt;p&gt;Keeping the backend aside, let's see how to use science to arrange designing elements we use every day to please the human brain.&lt;/p&gt;

&lt;p&gt;Here are such design principles which were derived from psychological principles,&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Isolation Effect
&lt;/h2&gt;

&lt;p&gt;The isolation effect states that when many similar objects are present, the object that differs from the rest is the one that's mostly likely to be remembered by the user.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.psdrepo.com%2Fimages%2F2x%2F1423db9e-3bfa-4694-bb89-559a794ccca6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.psdrepo.com%2Fimages%2F2x%2F1423db9e-3bfa-4694-bb89-559a794ccca6.jpg" alt="YouTube Video Playback screen with subscribe button"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Take YouTube video playback window for an example, apart from the video itself, what's the first thing you see in that screen? Yes, the subscribe button. The only red elements in the screen are the YouTube logo itself and the Subscribe button. &lt;/p&gt;

&lt;p&gt;It's like they both have an equal value. Moreover, it sort of gives an idea of what this service is and how it works, by highlighting the most important function of the service. &lt;/p&gt;

&lt;h2&gt;
  
  
  2. Hicks's law
&lt;/h2&gt;

&lt;p&gt;Hick's law states that the time it takes for a person to make a derision depends on the number of choices available to choose from. Pretty obvious right? &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmarvel7077.wpengine.com%2Fwp-content%2Fuploads%2F2017%2F06%2F1WLT8LMUF7RqozfG38TIL3A.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmarvel7077.wpengine.com%2Fwp-content%2Fuploads%2F2017%2F06%2F1WLT8LMUF7RqozfG38TIL3A.png" alt="Hick's Law explained in lists"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Lesser the number of answers there is for a MCQ question, easier for a student to guess the correct answer. Same way, if the number of choices increases, the time to make a choice increases logarithmically.&lt;/p&gt;

&lt;p&gt;So, the number of checkboxes, radio buttons you use on your interface can affect the overall experience of a user.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Serial Position Effect
&lt;/h2&gt;

&lt;p&gt;Ever wondered why Hamberg menus are slowly becoming extinct? It's all bottom navigation now. Why? The serial position effect may have caught the eye of the designers.&lt;/p&gt;

&lt;p&gt;It states that there's a tendency of a user to best remember the first and last items in a series. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.dribbble.com%2Fusers%2F7856%2Fscreenshots%2F2635508%2Fspotify-tab-bar-ios-app.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.dribbble.com%2Fusers%2F7856%2Fscreenshots%2F2635508%2Fspotify-tab-bar-ios-app.gif" alt="Spotify bottom nav bar"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So instead of making a vertical list, designers go for a horizontal series of elements while placing more important functions in left and right ends of the series. Like the Home and Message pages in Twitter app for an example.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.androidpolice.com%2Fwp-content%2Fuploads%2F2018%2F07%2FScreenshot_20180713-113125.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fwww.androidpolice.com%2Fwp-content%2Fuploads%2F2018%2F07%2FScreenshot_20180713-113125.png" alt="Twitter Bottom Navigation"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Cognitive Load Theory
&lt;/h2&gt;

&lt;p&gt;Cognitive load is the amount of thought someone need to exercise in order to complete a specific task. The theory also suggests that if the cognitive load exceeds our processing capacity, we will struggle to complete the task successfully.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fwww.aytech.ca%2Fwp-content%2Fuploads%2F2017%2F01%2FBarriers.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fwww.aytech.ca%2Fwp-content%2Fuploads%2F2017%2F01%2FBarriers.png" alt="Cognitive Load"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are three types of Cognitive Load,&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Intrinsic cognitive load
        - The effort associated with a specific topic&lt;/li&gt;
&lt;li&gt;Extraneous cognitive load
        - The way information or tasks are presented to a learner&lt;/li&gt;
&lt;li&gt;Germane Cognitive load
        - The work put into creating a permanent store of knowledge (a schema)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fuxmag.com%2Fsites%2Fdefault%2Ffiles%2Fuploads%2Fjulien-cognition%2FCognitive_Full1.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/http%3A%2F%2Fuxmag.com%2Fsites%2Fdefault%2Ffiles%2Fuploads%2Fjulien-cognition%2FCognitive_Full1.jpg" alt="Cognitive load in UX"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Considering Cognitive Load mean that you always care about the amount of information a user has to keep in mind, and also if there's a process involving routine of tasks, make it a pattern that's available everywhere in the application, so users get more familiar with it.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Proximity Law
&lt;/h2&gt;

&lt;p&gt;The law of proximity states that objects that are near, or proximate to each other, tend to be grouped together. &lt;/p&gt;

&lt;p&gt;It means that our brain can easily associate objects that are placed together, rather than objects that are placed far apart. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmarvel7077.wpengine.com%2Fwp-content%2Fuploads%2F2017%2F06%2F1Jn2VR9U2bNj8Nh2d8zf5ug.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fmarvel7077.wpengine.com%2Fwp-content%2Fuploads%2F2017%2F06%2F1Jn2VR9U2bNj8Nh2d8zf5ug.png" alt="Proximity Law"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are 72 circles in the image above. We tend to recognise the circles in groups based on the distance between them.  &lt;em&gt;Categorically&lt;/em&gt;, we can also see that there is a group of 36 circles on the left side of the image, and 3 groups of 12 circles on the right side of the image.&lt;/p&gt;

&lt;p&gt;So, there is a scientific way to approaching in grouping things together when designing a UI, and also, be mindful when grouping elements together since users may naturally think they are associated with each other.&lt;/p&gt;

&lt;p&gt;Finally, this has been a brief introduction to how psychological findings can be used to enhance usability and visual look of a user interface. Dig more into these theories to get a good idea of them and also, you'll find many more scientific discoveries that might be beneficial in effective UI designing.&lt;/p&gt;

</description>
      <category>ux</category>
      <category>design</category>
      <category>psychology</category>
    </item>
    <item>
      <title>Block chain In a Nutshell</title>
      <dc:creator>Amana Samsudeen</dc:creator>
      <pubDate>Sun, 09 May 2021 14:45:45 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/block-chain-in-a-nutshell-1h9a</link>
      <guid>https://dev.to/ucscmozilla/block-chain-in-a-nutshell-1h9a</guid>
      <description>&lt;p&gt;Before understanding what is blockchain lets try to understand what a distributed database is. A distributed database is a collection of multiple interconnected databases, which are spread physically across various locations that communicate via a computer network. &lt;br&gt;
A blockchain is similar to distributed databases that maintain a continuously growing list of chronologically ordered records, called blocks. These blocks are linked using encryption techniques which contains a link to connect each block to its previous block, a timestamp, and transaction data. It is like a decentralized, distributed and public digital ledger.&lt;br&gt;
Blockchains are mainly used to record transactions across many computers so that the record cannot be altered without the alteration of all subsequent blocks because the whole chains link depends on data in the nodes(blocks).&lt;/p&gt;

&lt;h1&gt;
  
  
  Why is Blockchain Popular?
&lt;/h1&gt;

&lt;p&gt;Suppose one of us is transferring money to a friend from his/her bank account. He/ She would log in to online banking and transfer the amount to the other person using their account number. After the transaction is completed, the bank updates the transaction records of both persons. Even though this seems simple. These transactions are highly vulnerable.&lt;br&gt;
These types of transactions can be tampered very quickly. Blockchain technology was created essentially to overcome problems of this nature.&lt;/p&gt;

&lt;p&gt;So How Does Blockchain Protect These Transactions?&lt;br&gt;
How exactly does Blockchain technology work?&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--J0mS95mG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2jdd24k8vq6r13s5d16q.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--J0mS95mG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2jdd24k8vq6r13s5d16q.jpg" alt="Alt Text" width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Blockchain is a combination of three leading technologies:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Cryptographic keys (Asymmetric and Symmetric Cryptographies).&lt;/li&gt;
&lt;li&gt;A peer-to-peer network containing a shared digital ledger.&lt;/li&gt;
&lt;li&gt;A means of computing, to store the transactions and records of the network.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Cryptography keys consist of two keys those are Private key and Public key. These keys help in performing successful transactions between two parties. Each individual has these two keys, which they use to produce a secure digital identity reference. This secured identity is the most important aspect of Blockchain technology. In the world of cryptocurrency, this identity is referred to as ‘digital signature’ and is used for authorizing and controlling transactions&lt;br&gt;
The digital signature is merged with the peer-to-peer network; a large number of individuals who act as authorities use the digital signature in order to reach a general agreement on transactions, among other issues. When they authorize a deal, it is certified by a mathematical verification, which results in a successful secured transaction between the two network-connected parties. &lt;br&gt;
So, to sum it up, Blockchain users employ cryptography keys to perform different types of digital interactions over the peer-to-peer network.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Automation in agricultural equipment and technology.</title>
      <dc:creator>Mohammadhu Faalil</dc:creator>
      <pubDate>Wed, 05 May 2021 13:42:53 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/automation-in-agricultural-equipment-and-technology-10gg</link>
      <guid>https://dev.to/ucscmozilla/automation-in-agricultural-equipment-and-technology-10gg</guid>
      <description>&lt;p&gt;The agriculture industry in the modern era is developing by leaps and bounds. The rise in the global population has caused an increase in food demands which in turn incurs farming produce price increase, reconsidering trade policies, shifting supply chains, and reshaping traditional food delivery routes. Despite these challenges, the amount of agricultural workers is steadily declining.  Therefore the farmers are facing a critical juncture between wanting to produce more, higher-quality crops and finding the workers to plant, maintain, and harvest those crops. The necessity arose to focus on using technology to produce more food in order to meet the demand and the concept “Smart Farming” came into place which makes farm more efficient and automates the crop production cycle.&lt;/p&gt;

&lt;p&gt;In the modern world there are numerous technologies that are commonly being utilized in agriculture. The advent of Agricultural robots simply called as agribots was a turning point in the field of agriculture that has resulted in producing more and higher quality foods with less manpower.&lt;/p&gt;

&lt;p&gt;Traditional tractors have been replaced by automated tractors which can be controlled remotely or even pre-programmed to give full autonomy to a producer. &lt;a href="https://www.bearflagrobotics.com/"&gt;Bear Flag Robotics&lt;/a&gt; specializes in building driverless tractors which provides significant savings in labour and input costs.  They have the ability to control several tractors remotely, plan the machine’s route, get real-time reports and alerts – the work can be done without direct human intervention in the field.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--lRZ2Ikz0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/raTt1iK.jpg%3F1" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--lRZ2Ikz0--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/raTt1iK.jpg%3F1" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Moreover, robots developed for seeding and weeding are focused on the field’s specific area, and they work with great precision. This type of farming robot uses artificial intelligence and computer vision, which allows for a reduction of pesticides in the field and, subsequently, the production of high-quality food.&lt;/p&gt;

&lt;p&gt;Historically, the harvesting of crops by automated means is something unimaginable due to the delicate nature of fresh fruits and vegetables. But in the modern days it has changed. The commercial company &lt;a href="https://www.abundantrobotics.com/"&gt;Abundant&lt;/a&gt; has developed an apple picking robot which uses a vacuum instead of graspers or similar devices.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wRmPP4Nl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/1UR8asl.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wRmPP4Nl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/1UR8asl.jpg" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In addition to robots, drones too play a major role in the automation of agriculture. Drone devices can identify damaged crops via imagery and infrared analysis. Farmers receive this information immediately and can quickly react to the changing conditions. Also they can be used to water plants in the fields. The company &lt;a href="https://www.droneseed.com/"&gt;DroneSeed&lt;/a&gt; have developed drones to plant from air in the aim of reforesting lands after wildfires. These types of drones carries a module that “shoots” seeds at the set place and specific distance from each other. To make it possible, developers use compressed air – this way, seeds will not scatter around the field.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rGN9Iy7G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CgH9QVM.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rGN9Iy7G--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/CgH9QVM.jpg" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The benefits of automating traditional agriculture processes are monumental. Increase of productivity through automation has increased the yield as well as the rate of production which in turn has reduced the costs for customers. The routines tasks being automated using robots has reduced the labour cost as well as addressed the issue of labour shortage in the field of agriculture. Besides these, automation has decreased the usage of pesticide and fertilizer while also reducing greenhouse gas emissions.&lt;/p&gt;

&lt;p&gt;There are still certain factors that stop automation of agriculture from gaining momentum. The higher prices of the automated agricultural equipment and lack of technological knowledge stands as a great barrier for this adaptation. Besides, lack of infrastructure and internet connection in certain remote rural areas should not be forgotten. Steps has to be taken by the relevant authorities of the country to provide a helping hand to the farmers in order to fully utilize farm automation.&lt;/p&gt;

&lt;p&gt;Automation in agricultural equipment using the technological advancements has paved the way towards sustainable and more efficient agriculture.&lt;/p&gt;

</description>
      <category>automation</category>
      <category>agriculture</category>
      <category>technology</category>
    </item>
    <item>
      <title>Cloud Computing, an Introduction…
</title>
      <dc:creator>Marita Thushari</dc:creator>
      <pubDate>Sun, 02 May 2021 15:29:38 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/cloud-computing-an-introduction-27ik</link>
      <guid>https://dev.to/ucscmozilla/cloud-computing-an-introduction-27ik</guid>
      <description>&lt;p&gt;In this era of technology everyone tends to search for the best solution or resource for an affordable cost. The concept of Cloud Computing paves the way for this search easily and it has been a great solution for many during this pandemic as well. In this article a brief introduction will be discussed on the concept of Cloud Computing and how it becomes an easy &amp;amp; affordable solution in many situations.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Cloud Computing?
&lt;/h2&gt;

&lt;p&gt;Cloud Computing is the concept that delivers computing services over the Internet using the ‘Pay-as-you-go’ pricing model, which means payment is done only for the usage of the services provided. Therefore, this is also called ‘Consumption-based model’. Due to this model it becomes typically cheaper when compared to purchasing the required hardware components for computing.&lt;/p&gt;

&lt;p&gt;The main services provided by Cloud computing are Computing power and Storage. There are other services provided such as Networking, Database management, etc. These cloud services are provided by various Cloud Service providers and the users who are called the Cloud tenants pay for the services they use.&lt;/p&gt;

&lt;h2&gt;
  
  
  Features…
&lt;/h2&gt;

&lt;p&gt;Cloud Computing holds various advantages such as Reliability &amp;amp; High availability as it is accessible from multiple devices across the globe, Scalability as resources can be increased to cater the demand accordingly, Elasticity as resources can be allocated and deallocated for users, Agility, Geo distribution as devices that are distributed across the globe are connected with each other which also provides Fault Tolerance and Disaster recovery.&lt;/p&gt;

&lt;p&gt;Cost savings is one of the major advantage due to the ability of paying only for the service used which also means that there is no Capital cost needed. High speed and Ability to deploy more new services easily than when using them on-premises are also some other available advantages.&lt;/p&gt;

&lt;p&gt;The disadvantages are that complexity may be increased when migrating the data &amp;amp; apps that are already existing to cloud platforms and Internet connectivity is required to use &amp;amp; access the cloud services.&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud Service Models…
&lt;/h2&gt;

&lt;p&gt;The main Cloud Service models are Infrastructure as a Service (IaaS), Platform as a Service (PaaS) and Software as a Service (SaaS).&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;IaaS&lt;/strong&gt; - Produces the computer infrastructure (hardware components) as the cloud service, Cloud tenant should be responsible for OS maintenance and Network configurations. Eg: Virtual Machines&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;PaaS&lt;/strong&gt; - Produces the platforms required for applications as the cloud service by managing the hosting environment, Cloud tenant is only required to deploy their applications. Eg: Azure App Services&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;SaaS&lt;/strong&gt; - Manages all aspects of the application environment therefore Cloud tenant only needs to provide the required data that is to be processed or stored. Eg: Office 365 from Microsoft, Google Drive&lt;/p&gt;

&lt;h2&gt;
  
  
  Cloud Deployment Models…
&lt;/h2&gt;

&lt;p&gt;The main Cloud deployment models are Public cloud, Private cloud and Hybrid cloud. The describe on how the cloud services are provided and used by the users.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Public cloud&lt;/strong&gt; – Cloud services are provided to anyone over the public Internet.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Private cloud&lt;/strong&gt; – Cloud services are exclusively used by users of a business or an organization.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Hybrid cloud&lt;/strong&gt; – Builds a connectivity between the Public and Private clouds allowing the data to be shared between them.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.24slides.com%2Ftemplates%2Fupload%2Ftemplates-previews%2FQDznvaI0e4zdUjeG0xAaIBZmvxn6P2Rm1n58jMM6.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn.24slides.com%2Ftemplates%2Fupload%2Ftemplates-previews%2FQDznvaI0e4zdUjeG0xAaIBZmvxn6P2Rm1n58jMM6.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How can the Cloud Services can be accessed?
&lt;/h2&gt;

&lt;p&gt;There are many Cloud Service providers at present and there can be more in the near future as well. These Cloud Service Providers provide many services that can be used by anyone through internet. Some of the main Cloud Service providers are AWS from Amazon, Microsoft Azure from Microsoft, Google Cloud from Google and many more. Each of these solutions have their own unique and common characteristics in their available cloud services. And the costs related to each service can also differ among the various service providers. Therefore, it would be easy for anyone to practice these solutions first and then select the most suitable one for their implementation purposes. Most of these Cloud Service providers provide a free trial for this purpose.&lt;/p&gt;

&lt;p&gt;For more details about Microsoft Azure click on &lt;br&gt;
&lt;a href="https://azure.microsoft.com/en-us/" rel="noopener noreferrer"&gt;https://azure.microsoft.com/en-us/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more details about AWS click on &lt;br&gt;
&lt;a href="https://aws.amazon.com/" rel="noopener noreferrer"&gt;https://aws.amazon.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;For more details about Google Cloud click on&lt;br&gt;
&lt;a href="https://cloud.google.com/" rel="noopener noreferrer"&gt;https://cloud.google.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcsharpcorner.azureedge.net%2Farticle%2Ftop-10-cloud-service-providers%2FImages%2FTop%2520cloud%2520providers.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcsharpcorner.azureedge.net%2Farticle%2Ftop-10-cloud-service-providers%2FImages%2FTop%2520cloud%2520providers.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Due to the above existing features of Cloud computing, it is obvious to consider that most of the next-gen businesses will be built on this platform.&lt;/p&gt;

</description>
      <category>cloudcomputing</category>
      <category>technology</category>
      <category>article</category>
      <category>computerscience</category>
    </item>
    <item>
      <title>Reduction of environmental pollution caused through vehicles using Graph theory</title>
      <dc:creator>Mohammed Ashfaq Ashar</dc:creator>
      <pubDate>Thu, 29 Apr 2021 08:36:08 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/reduction-of-environmental-pollution-caused-through-vehicles-using-graph-theory-2a39</link>
      <guid>https://dev.to/ucscmozilla/reduction-of-environmental-pollution-caused-through-vehicles-using-graph-theory-2a39</guid>
      <description>&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;In this modern era, vehicles are heavily used in all developed and non-developed countries. Day by day, usage of vehicles increased. So it causes several adverse effects to nature. One of the worst effects is Air pollution. Exhaust from vehicles is a significant wellspring of open-air contamination around the world &lt;br&gt;
We simply called the pollution caused by the vehicle “vehicle pollutions”. Vehicular contamination is the presentation of unsafe material into the climate by engine vehicles. These materials, known as contaminations, have a few awful impacts on human wellbeing and the biological system. Transportation is a significant wellspring of air contamination in numerous nations throughout the planet because of the great number of vehicles that are accessible on the streets today. An expansion in buying power implies that more individuals would now be able to manage the cost of vehicles, which is awful for the climate. The air contamination from vehicles in metropolitan territories, especially in large urban areas, has become a major issue. The contamination from vehicles has started to tell through indications like severe cough like asthma, migraine, queasiness, disturbance of eyes, different bronchial and perceivability issues.&lt;br&gt;
Ozone, Particulate matter, Nitrogen oxides, Carbon monoxide, Sulphur dioxide, and hazardous air pollutants are some of the main ingredients of vehicular pollutions. &lt;br&gt;
Due to above such mentioned issues, there is a very simple and clear solution for it. Dijkstra's Algorithm is coming under graph theory that is normally used to find the shortest path between two points.&lt;br&gt;
By applying this practical solution, to this problem, we are successfully able to get rid of these issues. Overall, we can observe that problem is mainly due to the traveling of vehicles worldwide without having a proper and shorter path to reach the destination. So due to it, there will wastage of fuels at the same time, pollutants are released to the environment. By having a shortest between the starting point and ending point, we could able to minimize these issues. Therefore Dijkstra's Algorithm helps us to solve this issue. This algorithm continuously go through all the possible path and get the best shortest path between two points which helps to preserve fuels and minimize the release of pollutants&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fevtqy0oe6h19og6v8pzu.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fevtqy0oe6h19og6v8pzu.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Methodology
&lt;/h3&gt;

&lt;p&gt;In this article, Dijkstra's Algorithm has been used to solve the problem that has already been mentioned. If the vehicles traveled so long without any proper and shortest route rather than regular route, there are high chances of getting pollution. The shortest routing helps for the least pollution.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr40dd1gtslc1uo8do3l2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fr40dd1gtslc1uo8do3l2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
 The following model represents a simple road network model &lt;br&gt;
 with starting point and ending point &lt;/p&gt;

&lt;p&gt;G = (V, E) as per the definition of a graph. “V” represents a set of vertices and “E” represents a set of edges. So the road network has to mapped to graph inorder to have the least pollution to environment and also preserve the fuels.  Therefore vertices, we simply say nodes are compared to cities, and edges were compared to road. And also the values that written on top of the edges are simply said as “weights” according to graph theory. Therefore such graphs are considered to be weighted graphs. These weights are considered the distance between two cities.&lt;/p&gt;

&lt;p&gt;For example, we simply set “C” (red dot) as a starting node. Therefore we make as distance 0 while others to infinity as step 1&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwepkk017t546ma7ju6pw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fwepkk017t546ma7ju6pw.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then we can see the neighbor nodes of “C” which are “A”, “B” and “D”. Since “C” is starting node, the weights of “A”, “B” and “D” as follows&lt;br&gt;
A = 0 + 1 = 1 &lt;br&gt;
B = 0 + 7 = 7 &lt;br&gt;
C = 0 + 2 = 2&lt;/p&gt;

&lt;p&gt;So now we can observe the shortest path among all the “A”, “B” and “D” is “A” where C – A is 1.&lt;br&gt;
So now the red dot moves to “A”. from “A”, it is observable that only “B” is neighbor since “C” already visited. Therefore the new weight of “B” is 1 + 3 = 4 which is less than the previous 7.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbo971vaa398yvckslyag.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbo971vaa398yvckslyag.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As a result, we could recursively perform the same procedure inorder to get the least path or weight for all the vertices. The final result would be as follows&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F726ucy6htkw21iyr3z7w.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F726ucy6htkw21iyr3z7w.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;so the above weights which are compared with distances are given at top of nodes by taking “C” as a starting point. Inorder to clarify further, we could see on top of “B”, there is a number 4, which represents the shortest path from “C”, where “B” is the final destination. This means the path is, C   A  to B is1+3=4&lt;br&gt;
But if we consider a path as&lt;br&gt;
C to  D  to E  to B which is 2+7+1=10 which is much more long compared to previous, where there will high wastage of fuels and a high amount of pollutants emission to the environment. Therefore Dijkstra's Algorithm solves this problem by finding the shortest path from starting point to all other points in order to reach the final destination with the least pollutants released to the environment. &lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;In this article using the concept of graph theory which is Dijkstra's Algorithm, we tried to solve the problem caused due to unnecessary routes used to reach the final destination which results in environmental pollutions and high fuel consumption.&lt;br&gt;
Therefore as a responsible individual, it is a must to protect nature and preserve fossil fuels for the future generation&lt;/p&gt;

</description>
      <category>computerscience</category>
      <category>algorithms</category>
      <category>graph</category>
    </item>
    <item>
      <title>A Brief Introduction to Colour Theory</title>
      <dc:creator>Akila Maithripala</dc:creator>
      <pubDate>Wed, 21 Apr 2021 13:36:54 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/a-brief-introduction-to-colour-theory-2hcd</link>
      <guid>https://dev.to/ucscmozilla/a-brief-introduction-to-colour-theory-2hcd</guid>
      <description>&lt;p&gt;Whatever the art or design you do, colour theory plays an important role in conveying your message to your audience. Although many won't really know it, the colour mix you implement in your designs can affect the audience in a psychological way. &lt;/p&gt;

&lt;p&gt;Before going that mental, let's dig up the basics.&lt;/p&gt;

&lt;h1&gt;
  
  
  Colour Systems
&lt;/h1&gt;

&lt;p&gt;Understanding colour system is vital in reproducing more colours. There are two main colour systems. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Additive&lt;/li&gt;
&lt;li&gt;Subtractive &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Additive colours are used in screens while subtractive colours are used in printed materials. Another way of looking at this is that objects that emit light use additive colours and objects that reflect light use subtractive colour.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Additive Colour
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4K8jAI9c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/j5DGWeJ.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4K8jAI9c--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/j5DGWeJ.jpg" alt="Additive"&gt;&lt;/a&gt;&lt;br&gt;
Primary colours of this are Red, Green and Blue (RGB). This is the holy trinity of additive colours that is the basis for all colours that's used on a screen. Combination of all these colours creates white, and absence of the all three colours is black.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Subtractive Colour
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RO8D120Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7gpJGMh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RO8D120Z--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.imgur.com/7gpJGMh.jpg" alt="Subtractive"&gt;&lt;/a&gt;&lt;br&gt;
Primary colours of subtractive are cyan, magenta, yellow and black (CMYK). K stands for 'key' because cyan, magenta and yellow don't fully absorb light and a need arose for a compensating colour to account for this. Hence, black is added as a fourth colour. &lt;/p&gt;

&lt;h1&gt;
  
  
  Colour Wheel
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8PbNDTJq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.stack.imgur.com/SBvcU.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8PbNDTJq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://i.stack.imgur.com/SBvcU.png" alt="Colour-wheel"&gt;&lt;/a&gt;&lt;br&gt;
A bit of a history for you; the colour wheel was invented in 1666 by Isaac Newton, as he mapped the colour spectrum onto a circle. The colour wheel is called the basis of colour theory, as it shows the relationship between colours.&lt;/p&gt;

&lt;p&gt;Colour Wheel is used to find colour &lt;em&gt;harmonies&lt;/em&gt; by using the specific colour combinations. Colour harmony is achieved by using colours that look good together. &lt;/p&gt;

&lt;h2&gt;
  
  
  Colour Combinations
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;1. Complementary Colours&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PkPDtxvk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/complementary-colors.1200x690.f6aff61a6d4a050896d92666ac184888.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PkPDtxvk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/complementary-colors.1200x690.f6aff61a6d4a050896d92666ac184888.png" alt="Complementary Colours"&gt;&lt;/a&gt;&lt;br&gt;
Complementary colours are &lt;strong&gt;two&lt;/strong&gt; colours that are on opposite sides of the colour wheel. A combination of two of these like this provides a high contrast for your work and these colours will appear brighter and more prominent.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Monochromatic&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4xEu1mri--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/monochromatic-colors.1200x690.c7f66f1fcd6a6993b518384ac67996cf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4xEu1mri--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/monochromatic-colors.1200x690.c7f66f1fcd6a6993b518384ac67996cf.png" alt="Monochromatic Colours"&gt;&lt;/a&gt;&lt;br&gt;
Monochromatic colour is used as shades, tones and tints (later explained) of a one base colour. It adds minimalism to your work and also it's easier to design too.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Analogous&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--2qIh4bfp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/analogous-colors.1200x690.09f7dce335bf3297b64fbe9ec4107942.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--2qIh4bfp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/analogous-colors.1200x690.09f7dce335bf3297b64fbe9ec4107942.png" alt="Analogous Colours"&gt;&lt;/a&gt;&lt;br&gt;
Three colours which are placed side by side on the colour wheel are called Analogous colours. The idea is to use one colour as the dominant colour and use the others as supplementary colours. This combination is often called a versatile but overwhelming combination.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Triadic&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--UOIRPW4W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/triadic-colors.1200x690.a4b8643c90eb65eeec9ee403474a8688.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--UOIRPW4W--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/triadic-colors.1200x690.a4b8643c90eb65eeec9ee403474a8688.png" alt="Triadic Colours"&gt;&lt;/a&gt;&lt;br&gt;
Triadic involves three colours that are evenly spaced on colour wheel. This combination creates a high contrast, bold and vibrant colour schemes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;5. Tetradic&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7rVpgWN2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/tetradic-colors.1200x690.fccadf1e4d2ef031edc49c508d2fe2d9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7rVpgWN2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/tetradic-colors.1200x690.fccadf1e4d2ef031edc49c508d2fe2d9.png" alt="Monochromatic Colours"&gt;&lt;/a&gt;&lt;br&gt;
Tetradic is four colours that are evenly spaced on the colour wheel. As in the analogous combination, this combination works best if you let one colour be dominant and use others as supplementary. Although they make a bold impression, more colours means it is more difficult to balance them all.&lt;/p&gt;

&lt;h2&gt;
  
  
  Warm and Cool Colours
&lt;/h2&gt;

&lt;p&gt;The colours of colour wheel can be also divided as warm and cool. Warmness or coolness is known as the temperature of a colour. According to psychology as mentioned above, different colour temperature evokes different feelings.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oXgRup44--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/warm-cool-colors.1200x707.217f638962f8da17d66dc775cc16807a.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oXgRup44--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/warm-cool-colors.1200x707.217f638962f8da17d66dc775cc16807a.png" alt="Monochromatic Colours"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The general idea is that warm colours arouse or stimulate the viewer and cool colours make the viewer calm and relax. &lt;/p&gt;

&lt;h1&gt;
  
  
  Three Components of a Colour
&lt;/h1&gt;

&lt;p&gt;You can refer to many different 'colours' as when you say the name of a certain colour. To overcome this, there are three primary factors that help in defining a colour. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Tbbjzbiq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/hue-saturation-luminance.1200x707.05679cea2b904bb29845f87e16c1962d.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Tbbjzbiq--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/hue-saturation-luminance.1200x707.05679cea2b904bb29845f87e16c1962d.png" alt="Components-of-colour"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Hue
&lt;/h3&gt;

&lt;p&gt;Hue is defined by the position of the colour wheel, and it represents the name of the colour.  &lt;/p&gt;

&lt;h3&gt;
  
  
  2. Saturation
&lt;/h3&gt;

&lt;p&gt;Saturation defines how saturated (rich) a colour is. Saturation at 100% is the normal state of the colour while 0% can result in just a shade of grey. &lt;/p&gt;

&lt;h3&gt;
  
  
  3. Brightness (Luminance)
&lt;/h3&gt;

&lt;p&gt;Same as the saturation, this is expressed as a percentage between 0 and 100. 0% brightness of a colour is black and 100% bright is the full colour.&lt;/p&gt;

&lt;h1&gt;
  
  
  Shades, tints and tones
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--vDhMO240--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/shade-tint-tones.1200x707.99715a943279b262c99287f9db129c26.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--vDhMO240--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://static-cse.canva.com/_next/static/assets/shade-tint-tones.1200x707.99715a943279b262c99287f9db129c26.png" alt="Shades-tint-tones"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Shade
&lt;/h3&gt;

&lt;p&gt;Created by adding &lt;strong&gt;black&lt;/strong&gt; to base hue and it makes the colour darker. This results in a deeper and richer effect and can be overpowering at times.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tint
&lt;/h3&gt;

&lt;p&gt;Created by adding &lt;strong&gt;white&lt;/strong&gt; to base hue and results in lighter colour. It decreases the intense and used to balance vivid colour combinations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Tones
&lt;/h3&gt;

&lt;p&gt;Created by adding black and black &lt;em&gt;and&lt;/em&gt; white (or grey) to base hue. Tones may not look lie pastel but can reveal complex characters which were not apparent in the base hue.&lt;/p&gt;

&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ekFNyqcu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.freepik.com/blog/app/uploads/2019/08/UXColor.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ekFNyqcu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.freepik.com/blog/app/uploads/2019/08/UXColor.jpeg" alt="colours-in-ui-ux"&gt;&lt;/a&gt;&lt;br&gt;
This has been just an introduction to the world of colours. However, with the basics in mind, you can explore more combinations and techniques to use colours in your designs to really make an effect on the viewer. &lt;/p&gt;

</description>
      <category>colour</category>
      <category>ui</category>
      <category>ux</category>
      <category>colourtheory</category>
    </item>
    <item>
      <title>RCB GM Simulator : Running an EDA on the IPL Dataset</title>
      <dc:creator>Dulaj Prabasha</dc:creator>
      <pubDate>Tue, 13 Apr 2021 15:43:14 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/rcb-gm-simulator-running-an-eda-on-the-ipl-dataset-57jb</link>
      <guid>https://dev.to/ucscmozilla/rcb-gm-simulator-running-an-eda-on-the-ipl-dataset-57jb</guid>
      <description>&lt;p&gt;Remember how in the movie Moneyball (2011), Okland A's General Manager Billy Beane hires Economist Peter Brand to use data to change how the game's played? (Seriously though, if you haven't actually watched it, I strongly suggest you do so and come back!) Well, we're about to do the same thing - although operating in the realm of cricket this time. &lt;/p&gt;

&lt;p&gt;What we're about to do is called an Exploratory Data Analysis - EDA for short - a process of analysing datasets to summarise their main characteristics. To do this, we will be using &lt;a href="https://github.com/JDPrabasha/scikit/blob/main/matches.csv" rel="noopener noreferrer"&gt;this IPL Dataset&lt;/a&gt;. First off, let's see what we have shall we?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import pandas as pd 
import numpy as np
df=pd.read_csv("matches.csv")
df.head()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ubnzendv3j67ce6kp4s.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5ubnzendv3j67ce6kp4s.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Okay, that's a lot of information! Let's break it down using the Pandas Dataframe info() method :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df.info()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw02tah3qgbjmyhukyg5p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw02tah3qgbjmyhukyg5p.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;As General Manager of the RCB, your job is to extract as much information you can from the data available. And that involves asking the right questions. Looking closely at our dataset, how much of the data is actually useful? Certainly not the umpires. Let's drop 'em out shall we?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df.drop(["umpire1", "umpire2", "umpire3"], inplace=True, axis=1)
df.head()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2escddn63ouplkxrva4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fy2escddn63ouplkxrva4.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now that is something we can work with! The thing about being the GM (and Data Science in general) however, is that no-one tells you what questions you need to ask. And asking the right questions can often to be tougher than answering them. Here's a list of five questions that I think this dataset may be able to answer : &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Is it more advantageous to bat or field first in a given venue?&lt;/li&gt;
&lt;li&gt;Which venue is each team most strongest at?&lt;/li&gt;
&lt;li&gt;Does the chasing team really have the edge in a match affected by rain?&lt;/li&gt;
&lt;li&gt;How crucial is winning the toss at a given venue?&lt;/li&gt;
&lt;li&gt;How is our track record versus different teams?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now then, let's explore our data on a question-by-question basis! (although not necessarily in that exact order 👻)&lt;/p&gt;

&lt;h1&gt;
  
  
  Q1) How crucial is winning the toss at a given venue?
&lt;/h1&gt;

&lt;p&gt;The cool thing about Pandas is how you can chain together logic to get your desired output in a less verbose way than say SQL. Our dataset gives us the winner of each match. We also know who won the toss at every match. Putting 2 and 2 together, these two things must be equal if the team that won the toss won the match as well. Finally, we need this data on a by-venue basis. Another point is that a percentage would be more useful to us than a raw number.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df[df["toss_winner"]==df["winner"]].value_counts("venue")/df.value_counts("venue")*100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc95up0pwrn2axvaql1b6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fc95up0pwrn2axvaql1b6.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;See how easy that was? Note that we used the value_counts() method to group our data after filtration, and then divided it by the total matches played in that venue. This is another intuitive feature of Panads - in that it can detect similar data objects using indices. &lt;/p&gt;

&lt;p&gt;We see that certain venues give a 100 percent dependancy on the toss. However, if we look at how many matches were played in these venues, we have a much clearer picture. The more matches played, the closer that number aproaches 50.&lt;/p&gt;

&lt;h1&gt;
  
  
  Q2) Is it more advantageous to bat or field first in a given venue?
&lt;/h1&gt;

&lt;p&gt;Now, the process of answering this question follows the same intuition as the first. Although this time, we have to perform a few tweaks to obtain the data in the format we want.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;fielding_wins=df[((df["toss_winner"]==df["winner"]) &amp;amp; (df["toss_decision"]=="field")) | ((df["toss_winner"]!=df["winner"]) &amp;amp; (df["toss_decision"]=="bat"))].value_counts("venue")
fielding_wins.sort_index(inplace=True)

batting_wins=df[((df["toss_winner"]==df["winner"]) &amp;amp; (df["toss_decision"]=="bat")) | ((df["toss_winner"]!=df["winner"]) &amp;amp; (df["toss_decision"]=="field"))].value_counts("venue")
missing_rows=pd.Series([0,0],index=["Green Park", "Holkar Cricket Stadium"])
batting_wins=batting_wins.append(missing_rows)
batting_wins.sort_index(inplace=True)

choices=fielding_wins&amp;gt;batting_wins

encoder={True:"Field", False:"Bat"}
choices.map(encoder)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbutq4b66al91jdqzosg4.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fbutq4b66al91jdqzosg4.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And there's our results! Although that seemed like a lot of code, the logic isn't that hard to follow. Following a top-down approach, we had to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Compare the fielding team wins to the batting team wins&lt;/li&gt;
&lt;li&gt;Ensure that the indices of both these sets lined up and had the same number of elements&lt;/li&gt;
&lt;li&gt;Save both subsets in different variables to perform operations on them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And finally, we mapped the truth values to "Bat" and "Field" to make our lives easier. &lt;br&gt;
&lt;em&gt;( Confession: I did not do any of this in one go. Everything you see here packaged into one neat block of code was preceded by a lot of warnings, a lot of head-scratching and plenty of trial and error)&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Q3) Does the chasing team really have the edge in a match affected by rain?
&lt;/h1&gt;

&lt;p&gt;Let's use the power of Pandas to answer this question in one line of code! If you've been following along with the code so far, this one should be a cakewalk!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;df[(((df["toss_winner"]==df["winner"]) &amp;amp; (df["toss_decision"]=="field")) | ((df["toss_winner"]!=df["winner"]) &amp;amp; (df["toss_decision"]=="bat")))&amp;amp; (df["dl_applied"]==1)].size/df[df["dl_applied"]==1].size*100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dbb8u9q7vi9wt81a45k.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F5dbb8u9q7vi9wt81a45k.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well there we go - the chasing team wins a whooping 81 percent of rain-affected matches!&lt;/p&gt;

&lt;h1&gt;
  
  
  Q4) Which venue is each team most strongest at?
&lt;/h1&gt;

&lt;p&gt;Now this one takes a bit of thinking, as well as some domain knowledge. First off, what we require is a count of winner-venue pairs. Naturally, we know that each team will perform best in one given venue - most commonly their Home Stadium. Counts of these pairs should be expected to appear at the top of a sorted list (barring anomalies such as teams that have rebranded multiple times). Using this intuition, we may answer our question with the following code snippet :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;team_venue_counts=df.groupby(["winner", "venue"]).agg("count")["id"]
team_venue_counts=team_venue_counts.sort_values(ascending=False)
team_venue_counts.head(9)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8402bz1rqmoxk2rhyxav.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8402bz1rqmoxk2rhyxav.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We see that teams do indeed have the largest number of wins at their Home Stadium. However, a percentage would be a much better indicator of how strong teams perform at home. This would require some splicing, appending and rearranging - both with the winner-venue pairs and the venue counts. Unfortunately, the complexity of that process lies outside the purpose of this post. Moving on!&lt;/p&gt;

&lt;h1&gt;
  
  
  Q5) How is our track record versus different teams?
&lt;/h1&gt;

&lt;p&gt;This one includes a few convoluted steps - primarily because our team appears both in the "team1" and "team2" columns. But all in all, the code is again pretty straightforward :&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;as_team1_wins=df[(df["team1"]=="Royal Challengers Bangalore") &amp;amp; (df["winner"]=="Royal Challengers Bangalore")].value_counts("team2")
as_team1_games=df[(df["team1"]=="Royal Challengers Bangalore")].value_counts("team2")

as_team2_wins=df[(df["team2"]=="Royal Challengers Bangalore") &amp;amp; (df["winner"]=="Royal Challengers Bangalore")].value_counts("team1")
as_team2_games=df[(df["team2"]=="Royal Challengers Bangalore")].value_counts("team1")

(as_team1_wins+as_team2_wins)/(as_team1_games+as_team2_games)*100
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwiculag5mbsu4le43pq.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fgwiculag5mbsu4le43pq.png" alt="image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now, I have to admit that that was a bit of a hack. The different variables used to store data weren't exactly the same size - leading to those NaNs in-between. However, it's still impressive that Pandas knew what to do with the rest of it!&lt;/p&gt;

&lt;p&gt;Secondly, we see that there's two separate entries for "Rising Pune Supergiant" and "Rising Pune Supergiants" respectively. This certainly deserves some cleaning up!&lt;/p&gt;

&lt;p&gt;Now it's your turn! Think you can fix those errors? As GM, what other insights might you obtain with this dataset? What other data may you need to augment it with in order to derive better insights? And last but not least, what may be the best methods to visualise our findings? &lt;/p&gt;

&lt;p&gt;Any questions? Anything you think I might have done differently? Do feel free to let me know and I'd be more than happy to respond!&lt;/p&gt;

</description>
      <category>datascience</category>
      <category>python</category>
    </item>
    <item>
      <title>Bubble Sort </title>
      <dc:creator>Mohammadhu Faalil</dc:creator>
      <pubDate>Sun, 31 Jan 2021 13:30:27 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/bubble-sort-2d5n</link>
      <guid>https://dev.to/ucscmozilla/bubble-sort-2d5n</guid>
      <description>&lt;p&gt;Bubble sort is the simplest sorting algorithm that sorts the array by repeatedly swapping the consecutive pair of adjacent elements if they are not sorted.&lt;/p&gt;

&lt;p&gt;The Algorithm for Bubble Sort is as follows :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Bubble Sort (A,N)
1.Repeat Step 2 for I=0 to N-1
2.  Repeat for J=0 to N-I
3.    If A[J] &amp;gt; A[J+1]
4.    SWAP A[J] and A[J+1]
5.  [END OF INNER LOOP]
6.[END OF OUTER LOOP]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Let's have a pictorial representation of how  bubble sort will sort a given array.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVfbvMqM.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fi.imgur.com%2FVfbvMqM.png" alt="enter image description here"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So we see once the first iteration has ended, the largest element has taken its correct place and after second iteration the second largest element will take up its sorted place and it will continue.&lt;/p&gt;

&lt;p&gt;It's time to write the code.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;   void bubbleSort(int arr[],int n)
    {
     int i, j,temp;

        for(i = 0; i &amp;lt; n-1; i++)
        {
            for (j = 0; j &amp;lt; n-i-1; j++)
            {
                if (arr[j] &amp;gt; arr[j+1])
                 temp=arr[j];
                 arr[j]=arr[j+1];
                 arr[j+1]=temp;
            }
        }           
    }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Consider an array of 6 elements is sorted using the bubble sort algorithm. Even if the array is sorted after second or third iteration, the loop will continue until the 6th iteration. This is merely a waste of time. So, the computer scientists have found out a way to optimize this algorithm by using another variable &lt;strong&gt;swapped&lt;/strong&gt; which will check whether a swapping takes place in the inner for loop. If there are no swapping inside the inner loops, it means array is already sorted and we can jump out of the for loop instead of executing all the iterations.&lt;/p&gt;

&lt;p&gt;The optimized implementation of bubble sort algorithm is as follows :&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;void bubbleSort(int arr[],int n)
        {
         int i, j,temp;
         int swapped=0;

            for(i = 0; i &amp;lt; n-1; i++)
            {
                for (j = 0; j &amp;lt; n-i-1; j++)
                {
                    if (arr[j] &amp;gt; arr[j+1])
                    {
                     temp=arr[j];
                     arr[j]=arr[j+1];
                     arr[j+1]=temp;
                     // if swapping occurs update swapped to 1
                     swapped =1
                     }
                }
                //If the value of swapped is 0 after all the iterations of the inner loop
                //then break out
                if(swapped==0)
                {
                    break;
                }

            }           
        }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Complexity Analysis of Bubble Sort&lt;/strong&gt;&lt;br&gt;
 In bubble sort we have seen there are N-1 comparisons in first pass, N-2 in second pass and so on. Therefore, to compute the complexity of bubble sort, we need to calculate the number of comparisons. It can be shown as follows.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;f(n) = (n – 1) + (n – 2) + (n – 3) + ..... + 3 + 2 + 1
f(n) = n (n – 1)/2
f(n) = n^2/2 + O(n) = O(n^2)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;The time complexity of the bubble sort algorithm can be summarized as,&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Worst Case Time Complexity [ Big-O ]:  &lt;strong&gt;O(n^2)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  Best Case Time Complexity [Big-omega]:  &lt;strong&gt;O(n)&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;  Average Time Complexity [Big-theta]:  &lt;strong&gt;O(n^2)&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The main advantage of the Bubble sort algorithm is the simplicity of the algorithm.&lt;/p&gt;

&lt;p&gt;By going through the above blog post, I am pretty sure that you have gained a sound knowledge on Bubble Sort Algorithm. If you have any queries or need more clarifications, feel free to drop in comments.&lt;br&gt;
Thank You.&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>bubblesort</category>
      <category>dsa</category>
      <category>computerscience</category>
    </item>
    <item>
      <title> Machine Learning Diaries : The Andrew Ng Machine Learning Course In Review</title>
      <dc:creator>Dulaj Prabasha</dc:creator>
      <pubDate>Sun, 17 Jan 2021 11:48:55 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/machine-learning-diaries-the-andrew-ng-machine-learning-course-in-review-20he</link>
      <guid>https://dev.to/ucscmozilla/machine-learning-diaries-the-andrew-ng-machine-learning-course-in-review-20he</guid>
      <description>&lt;p&gt;&lt;em&gt;A foreword from me from the future :  Are you looking to get started in Machine Learning?  Wondering whether the Stanford Machine Learning Course on Coursera by Andrew Ng is the best place to start? Look no further! In this blog, I will outline my journey through the course along with my thought process and guide to additional resources. Finally, tips on where you might go upon completion. Without further ado, lets rewind back time shall we?&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 0
&lt;/h1&gt;

&lt;p&gt;The date is the 21&lt;sup&gt;st&lt;/sup&gt; of November, 2020. I look around the internet for free resources to learn machine learning. Intense research on Google recommends me Stanford’s Machine Learning Course on Coursera as its top pick. Although the course is completely free, I apply for financial aid just because. I make plans to dedicate an hour each day to working on the course material while in the midst of a busy Freshman Year CS schedule. My background going into the course is as follows :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Linear Algebra : High-School&lt;/li&gt;
&lt;li&gt;Statistics : High-School&lt;/li&gt;
&lt;li&gt;Programming : C, beginner-level Python&lt;/li&gt;
&lt;li&gt;Machine Learning : NULL&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The date is the 23&lt;sup&gt;rd&lt;/sup&gt; of November. I start the course. &lt;/p&gt;

&lt;h1&gt;
  
  
  Week 1
&lt;/h1&gt;

&lt;p&gt;Okay this first week seems pretty simple. I get myself familiar with the different types of machine learning and am introduced to the concepts of cost function and gradient descent. High school calculus makes this week feel like a breeze. Partial differentiation - which although new to me - ends up being something I am able to grasp easily. The linear algebra content seems simple enough to skimp on.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me : Dear me, I am proud of you for completing the first week of the course despite how outdated the slides and content may seem in terms of visual quality. You finally have a proper idea of the different types of machine learning and will later discover a third type called “Reinforcement Learning”, but alas that is for the future. For now you are good&lt;/em&gt; 😌 &lt;em&gt;. Also, you will be surprised at how crucial a role the concepts of cost and gradient descent will play in the future weeks and in your overall understanding of Machine Learning.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 2
&lt;/h1&gt;

&lt;p&gt;Okay, so this seems largely similar to the content of Week 1, but with broader scope. I like how it all naturally flows from Week 1 to Week 2.  I see that we have a programming assignment this week. Seems intimidating but turns out to be pretty simple. The Octave installation  (Octave being the language used to do the course assignments, with an alternative being Matlab) turns out to be pretty straightforward. I complete the programming exercises via the text editor. Oh, the submission facility seems very intuitive! Color me impressed!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me : Dear me, again proud of you for maintaining consistency. Although, I wish you had not been so intimidated by the first assignment. It is VERY simple. VSCode has this octave extension that simplifies the entire process it turns out - something you will discover in the following days.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2t7zlvnpnan2gnbxf17g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2t7zlvnpnan2gnbxf17g.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 3
&lt;/h1&gt;

&lt;p&gt;Oh, we’re finally doing something different! Classification! Surprisingly, a lot of the same concepts from the previous weeks manage to carry over to this week as well. What’s this though - a new word? Sigmoid … such a peculiar name. The strangeness of the term makes the concept stick. Although I have trouble understanding classification in its entirety , I manage to complete the week. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me : Oh past me, I wish I could tell you about two things that might have really helped you connect everything together. First, well this picture really :&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc0zndgp3o6xfy6hhb0zo.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fc0zndgp3o6xfy6hhb0zo.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;… which is pretty self - explanatory. The second being telling you to imagine a circular decision boundary where the circle expands based on the size of the feature x. This would have helped you get to Week 4 faster without all the meandering, wondering whether you were really ready for Week 4 - until doing so nonetheless.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 4
&lt;/h1&gt;

&lt;p&gt;Neural Networks! Finally get to know what those are! I understand it as a process of multiple logistic regression with a network that selects its own features. But I do not understand the hype behind their ubiquity in modern ML applications.  For the first time, the programming assignment seems a lot harder, but looking through the different tutorials and discussions related to the course, I manage to complete it.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me : No dear me, a neural network is not multi-step logistic regression. The sigmoid, as you will discover very later, is only one of the many available activation functions. Alas, I am afraid you might complete the course with a very shallow understanding of neural networks. This video&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/He4t7Zekob0"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;might have helped immensely, had I been able to show it to you.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 5
&lt;/h1&gt;

&lt;p&gt;Okay, so looks like we’re going into the deep end of how neural networks work! Backpropagation - a neural network calculating its errors and going in reverse looks like? So I’m guessing that’s the difference between neural networks and regular regression - they use backpropagation instead of gradient descent. Getting to the assignments this week - Oh my are they a mess! How do they deviate so much from how I’d understood it?  I barely pass the assignment - that too thanks to a very detailed guide in the resource section - although I have to admit my understanding is clearly lacking.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me : Yes past me - that week was indeed a mess no matter how you look at it! Unfortunately, that is one of the pitfalls of a course that is no longer actively maintained. And no past me - it’s not that neural networks do not use gradient descent - it's more the case of them using backpropagation in combination with gradient descent. I really wish I could have directed you to this video&lt;/em&gt; &lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/khUVIZ3MON8"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;&lt;em&gt;which I’ve found to explain backpropagation in the clearest way possible. It would have saved you all those hours of confusion. However, I am glad you stuck through with the course as that is only one of the only two weeks that I’d describe as categorically bad.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 6
&lt;/h1&gt;

&lt;p&gt;I am very hesitant to start this new week after all the shock from the previous one. But what’s this though - looks like we’re done with neural networks! That’s a relief! This week proves to be one of the most interesting, informative and intuitive weeks in the entire course, dealing with the concept of fine-tuning your models. I feel relieved to have stuck through the hell that was Week 5, and go on to easily complete the week's assignments, with some help from the resources section of course.&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 7
&lt;/h1&gt;

&lt;p&gt;We move to an entirely different algorithm this week - Support Vector Machines. I have a hard time grasping the concept of kernels. Those ugly feelings from Week 5 are starting to pop up again - Oh no! I completely fail the week’s quiz. Fortunately however, I discover this video series&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/efR1C6CvhmE"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;which does a really good job explaining how kernel functions work. Although I cannot grasp all the math behind it, the intuition proves adequate to get through the quiz.  Unfortunately, the programming assignment does not get any easier. A single error on one line causes me to waste an entire day on debugging as this week’s assignment takes a lot longer than usual to run on the terminal. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me :  You can pat yourself on the back - you have survived the last hell week of the course. It’s smooth sailing from here on out!&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 8
&lt;/h1&gt;

&lt;p&gt;This week I learn about my first unsupervised learning algorithm, K-Means, and thankfully it proves to be pretty straightforward. I also learn about dimensionality reduction, another simple concept at face-value but its importance showing to be unmistakably obvious - although I do not understand all of the math behind it completely.  I begin to understand the importance of having a better grasp of linear algebra for machine learning. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me : You are absolutely correct past me - A solid foundation of linear algebra is crucial to machine learning, and as you will discover in the future - so is statistics - especially when you eventually get to reinforcement learning.  Not to worry though, as your high school linear algebra will prove to be adequate to finish off the course.&lt;/em&gt;&lt;/p&gt;

&lt;h1&gt;
  
  
  Week 9
&lt;/h1&gt;

&lt;p&gt;I am nearing the end of the course. As such, this week looks to present more general applications of machine learning in different ways - namely anomaly detection and recommender systems. Although the concept seems simple, I have a tough time wrapping my head around recommender systems. I end up failing the quiz. After failing it a few more times, I discover this helpful video&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/n3RKsY2H-NE"&gt;
&lt;/iframe&gt;
&lt;br&gt;
 with which I finally manage to pass. The programming assignment for the week ends up being one of the shortest - I complete it in an hour, again with help from the resources section of course.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me : Look at that - that was your final programming assignment! Now then, let’s finish off the course!&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Weeks 10 and 11
&lt;/h1&gt;

&lt;p&gt;These prove to be the shortest -  each taking about an hour to complete. I finish off the final two weeks in the span of two days. And would you look at that - there’s my Certificate! I’m ecstatic that I have something to show for on LinkedIn for all that effort! The date is the 2&lt;sup&gt;nd&lt;/sup&gt; of January. I seem to have finished well ahead of time!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2rny1lvt0l2u07jcb98p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F2rny1lvt0l2u07jcb98p.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;A note from future me: Congrats me! Your future self is proud of you for having stuck through it and maintaining consistency despite a busy schedule. (Although have to say, the LinkedIn thing sounds kind of pathetic doesn’t it? Ahh well, as long as it gets you going)&lt;/em&gt;&lt;/p&gt;
&lt;h1&gt;
  
  
  Conclusion
&lt;/h1&gt;

&lt;p&gt;In the end, was it worth it? A course not maintained after 2011 with little visual appeal.  Assignments in a language barely used in modern machine learning applications. Deep learning and neural networks, which are at the forefront of Machine Learning today, being an aspect that is merely glanced upon, and that too with little clarity. Looking back at it now, how many stars would I rate it out of five if I had to rate it as a starting point for individuals looking to enter the field of machine learning? A sparkling five stars of course! Barring the relatively few inconveniences, I believe the course was some of the best use of my time, as now I can confidently explore different avenues of machine learning with the solid foundation laid by the course. Few courses offer the level of theoretical understanding in the manner this one does across all aspects in the field. Believe the hype around this course - it’s real!&lt;/p&gt;

&lt;p&gt;So where to from here? It's been about two weeks since I've finished the course.  From exploring the options out there ,what I’ve found is that Kaggle’s plethora of mini-courses are the best way to find out for yourself the answer to that very question! &lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feeax9ly7egu9kqmktqt1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Feeax9ly7egu9kqmktqt1.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Their Intro to Machine Learning, Intro to Deep Learning and Pandas courses are what I’ve found to be the best starting points. You will surely be amazed at how fast you will be able to grasp how to work with Python’s different machine learning libraries Scikit-learn and Tensorflow + Keras with your newfound foundational knowledge of machine learning! &lt;/p&gt;

&lt;p&gt;At the time of writing, I am trying out Scikit-learn and Pandas using different datasets across the internet, the link to which you can find here :&lt;/p&gt;


&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev.to%2Fassets%2Fgithub-logo-5a155e1f9a670af7944dd5e12375bc76ed542ea80224905ecaf878b9157cdefc.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/JDPrabasha" rel="noopener noreferrer"&gt;
        JDPrabasha
      &lt;/a&gt; / &lt;a href="https://github.com/JDPrabasha/scikit" rel="noopener noreferrer"&gt;
        scikit
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Testing scikit-learn
    &lt;/h3&gt;
  &lt;/div&gt;
  &lt;div class="ltag-github-body"&gt;
    
&lt;div id="readme" class="md"&gt;
&lt;div class="markdown-heading"&gt;
&lt;h1 class="heading-element"&gt;Scikit-learn Projects&lt;/h1&gt;
&lt;/div&gt;
&lt;p&gt;Welcome!&lt;br&gt;
&lt;br&gt;
This is where I store all of the datasets and notebooks I use to practice with scikit-learn, a free software machine learning library for Python. It features various classification, regression and clustering algorithms including support vector machines, random forests, gradient boosting, k-means and DBSCAN, and is designed to interoperate with the Python numerical and scientific libraries NumPy and SciPy (to quote Wikipedia)
&lt;br&gt;
&lt;br&gt;
All datasets are ones I've found after looking through the internet for specific datasets that would help me practice with a specific algorithm/set of algorithms, as well as gain experience with Pandas, a data manipulation and analysis library for Python
&lt;br&gt;
&lt;br&gt;
You are completely free to use the datasets as you please, as well as go through my notebooks to see how I've implemented varoius algorithms using particular datasets. Click through the links below to go through the associated notebooks.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/JDPrabasha/scikit/blob/main/SalaryPredictor.ipynb" rel="noopener noreferrer"&gt;Salary Predictor&lt;/a&gt;
&lt;br&gt;
&lt;a href="https://github.com/JDPrabasha/scikit/blob/main/HeartDisease.ipynb" rel="noopener noreferrer"&gt;Heart Disease Predictor&lt;/a&gt;
&lt;br&gt;
&lt;a href="https://github.com/JDPrabasha/scikit/blob/main/HousingPricePredictor.ipynb" rel="noopener noreferrer"&gt;Housing&lt;/a&gt;…&lt;/p&gt;
&lt;/div&gt;
  &lt;/div&gt;
  &lt;div class="gh-btn-container"&gt;&lt;a class="gh-btn" href="https://github.com/JDPrabasha/scikit" rel="noopener noreferrer"&gt;View on GitHub&lt;/a&gt;&lt;/div&gt;
&lt;/div&gt;


&lt;p&gt;I am also in the process of polishing my linear algebra knowledge with this course on YouTube :&lt;br&gt;
&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/aefKXYYXT6I"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;My next goal is to start fastai’s &lt;a href="https://www.fast.ai" rel="noopener noreferrer"&gt;Practical Deep Learning for Coders&lt;/a&gt; at the end of February. You can expect a next peek at my diary in a few months !&lt;/p&gt;

&lt;p&gt;Any questions? Fire away below!&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>datascience</category>
    </item>
    <item>
      <title>Kruskal's and Prim's algorithm</title>
      <dc:creator>Mohammed Ashfaq Ashar</dc:creator>
      <pubDate>Wed, 13 Jan 2021 14:03:33 +0000</pubDate>
      <link>https://dev.to/ucscmozilla/kruskal-s-and-prism-algorithm-4f05</link>
      <guid>https://dev.to/ucscmozilla/kruskal-s-and-prism-algorithm-4f05</guid>
      <description>&lt;p&gt;Today I have come with an interesting tutorial which is Krushkal’s and prim's algorithm. First of all, I would like to explain to you all about the definition of Data structure and Algorithm. The data structure is considered as the way to organize and store data and information in an efficient way such that you can access them quickly, whereas algorithms are considered as the steps that have to be taken to get the expected output from a given set of inputs.&lt;br&gt;
According to research, many computer science students have facing difficulties to understand Data structure and Algorithm, due to the complexity of the subject. Even though it is hard to understand, it plays a major role in the IT industry.&lt;br&gt;
So, in today’s blog, I would like to give you a brief and clear explanation of Kruskal’s and Prim's algorithm which is widely used in finding a minimum spanning tree. I hope you all have a better foundation in trees and minimum spanning trees. However, I would like to explain this algorithm with all the basic explanations of trees and minimum spanning trees from scratch.&lt;br&gt;
Now let us begin&lt;/p&gt;

&lt;h2&gt;
  
  
  What are trees?
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1p2c9sk48tnz4yrhc02g.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1p2c9sk48tnz4yrhc02g.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the above figure, I hope you have got some ideas regarding the definition of a tree. Simply, we can say the tree is a collection of edges and vertices. There are several types of trees where each tree has its unique functionalities. Some of the trees are &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Binary tree&lt;/li&gt;
&lt;li&gt;  Red black tree&lt;/li&gt;
&lt;li&gt;  Binary search tree&lt;/li&gt;
&lt;li&gt;  AVL tree&lt;/li&gt;
&lt;li&gt;  B tree &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and so on.&lt;br&gt;
As I mentioned before, trees are classified into a variety of types due to their functionalities. Some of the functionalities are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;      Used to hierarchical data&lt;/li&gt;
&lt;li&gt;      Used to implement expression parsers and expression solvers.&lt;/li&gt;
&lt;li&gt;      Used the Memory management subsystem of the Linux kernel to search memory regions of processes during preemption.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;and so on.&lt;/p&gt;

&lt;p&gt;I hope now you have got a better foundation about the definition and uses of Trees. Now let us see what spanning and minimum spanning tree&lt;br&gt;
Initially let us look at spanning tree&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Spanning tree?
&lt;/h2&gt;

&lt;p&gt;As simply we can say that a spanning tree is a subgraph of an undirected graph, where it consists of all the vertices with a minimum number of edges.&lt;br&gt;
Let's take an example,&lt;br&gt;
Here there is an undirected graph, we have to find the spanning tree of it. &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbfseriquganq9pqe8zr5.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbfseriquganq9pqe8zr5.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So initially, we have mentioned all the vertices. Then we have connected them by edges, such that the number of edges is minimum. And here, since it is a tree, there should be any cyclic formation. So as a final output, the spanning tree will look like&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1y4djmbmtuqf812nfdwf.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F1y4djmbmtuqf812nfdwf.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
There may be several spanning trees we can get from a given undirected graph. As to make this simple, I have given only one spanning tree.&lt;/p&gt;

&lt;p&gt;This is the complete idea of a  spanning tree. I hope you have got some idea about the spanning tree. As a next step, lets us look at the minimum spanning tree, where we are going to learn about Kruskal’sand prim's algorithm&lt;/p&gt;

&lt;h2&gt;
  
  
  What is the Minimum spanning tree?
&lt;/h2&gt;

&lt;p&gt;The minimum spanning tree is a spanning tree, where the addition or the sum of the weight of the edges should be minimum.&lt;br&gt;
I hope you all are wondering, why we have to find the minimum spanning tree, and what is the use &lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fobyvp2uks0kfjfzouub0.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fobyvp2uks0kfjfzouub0.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Ok, to clear this issue I would like to give you some practical usage of minimum spanning tree.&lt;br&gt;
It is heavily used in &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Network design such as telephone and cable networks.&lt;/li&gt;
&lt;li&gt;  Traveling salesman problem&lt;/li&gt;
&lt;li&gt;  Cluster analysis&lt;/li&gt;
&lt;li&gt;  Entropy-based image registration
and so on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Now comes, a big question&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fymk5e140r9sqt33wgcnw.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fymk5e140r9sqt33wgcnw.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;How to find a minimum spanning tree from a given undirected graph?&lt;br&gt;
Is there any technique for it?&lt;br&gt;
How to apply it?&lt;/p&gt;

&lt;p&gt;Here the place where Kruskal’s and prim's algorithm comes into play. From all the above information you have got some solid idea about trees, spanning trees, minimum spanning trees, and their applications. Now let us discuss this algorithm &lt;/p&gt;

&lt;h2&gt;
  
  
  How to find Minimum Spanning Tree?
&lt;/h2&gt;

&lt;p&gt;We have two approaches to find the minimum spanning tree. Simply, these 2 approaches are algorithms. They are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Kruskal’sAlgorithm&lt;/li&gt;
&lt;li&gt;  Prim's Algorithm&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Here I am going to explain the above two algorithms thoroughly with example.&lt;br&gt;
Let's look at our 1st algorithm which is the Kruskal's algorithm&lt;/p&gt;

&lt;h2&gt;
  
  
  Kruskal’s Algorithm
&lt;/h2&gt;

&lt;p&gt;This is one approach that we can use to find the minimum spanning tree. &lt;br&gt;
I don’t like to provide algorithm at once so that you won’t get a better understanding. Rather, I would like to provide you with a pictorial example so that you will have a complete picture of this algorithm very clearly&lt;/p&gt;

&lt;p&gt;Let’s look at our example&lt;/p&gt;

&lt;p&gt;Find the minimum spanning tree of the graph below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0xkt064xgmx85f42gw37.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0xkt064xgmx85f42gw37.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 1&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Arrange all the edges in ascending order according to their weight( the value is written on top of the edge). &lt;strong&gt;Src&lt;/strong&gt; means starting vertex and &lt;strong&gt;Dest&lt;/strong&gt; means ending vertex
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fdx7b2dqacgggsmm2sqek.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Now we shall pick the shortest weight out of all
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F0sa1dt5tkj7hvgiwyxts.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 3&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Keep in mind, there should be no cycle. So we pick the next short one which is &lt;strong&gt;8 - 2&lt;/strong&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr41zolg6b26lxkhayacx.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 4&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick next short one &lt;strong&gt;6 – 5&lt;/strong&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fu5vk9b5abli5qaslbkdo.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 5&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick the next short one which is &lt;strong&gt;0 – 1&lt;/strong&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fq2voesdvqmy652sejexa.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 6&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick the next short one which is &lt;strong&gt;2 – 5&lt;/strong&gt; 
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fgl4a80594a7k7mu1c3z0.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 7&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Now the problem comes. The next short one is &lt;strong&gt;8 – 6&lt;/strong&gt; which contains a cycle if we add. So we simply discard it &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 8&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick the next short one which is &lt;strong&gt;2 – 3&lt;/strong&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fr7rp9zvlbizjx453n6hb.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 9&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick &lt;strong&gt;7 – 8&lt;/strong&gt;. It will result in a cycle. So simply remove it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 10&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick the next short one which is &lt;strong&gt;0 – 7&lt;/strong&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fbikoty92rv20rlbxz9tx.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 11&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick &lt;strong&gt;1 – 2&lt;/strong&gt;. It results in the cycle. So discard it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 12&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Pick the next short one which is &lt;strong&gt;3 – 4&lt;/strong&gt;
This is the final output. Because all the vertices are present in it and also some of the weight is minimum.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F3gsw8hedfi4wr33lu5g2.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Now we shall have a look into the Prism algorithm to find a minimum spanning tree&lt;/p&gt;

&lt;h2&gt;
  
  
  Prim's Algorithm
&lt;/h2&gt;

&lt;p&gt;This is another approach that we could follow to obtain the minimum spanning tree.&lt;br&gt;
Let’s take the previous example here itself&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6vrk1oqyka21ig9ksl5x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F6vrk1oqyka21ig9ksl5x.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope that you can remember the above diagram. This is the same one we have taken before for Kruskal’s algorithm&lt;br&gt;
Let’s see how to find the minimum spanning tree by using this approach&lt;/p&gt;

&lt;p&gt;In this algorithm, we are free to select any vertex as you wish. So to make this algorithm simpler, I am going to select the starting vertex &lt;strong&gt;“0”&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Step 1&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Select the node/ vertex as the starting node &lt;strong&gt;(“0”)&lt;/strong&gt; and color with green. Then find all the adjacent vertex of it. Put their weight on the adjacent nodes at the same time make &lt;strong&gt;“0”&lt;/strong&gt; as the weight of the starting node.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs55pe4lucgdp7e75ua8g.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 2&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  We can observe that weight of &lt;strong&gt;0 – 1&lt;/strong&gt; is &lt;strong&gt;“4”&lt;/strong&gt; while &lt;strong&gt;0 – 7&lt;/strong&gt; is &lt;strong&gt;“8”&lt;/strong&gt;. We have selected the lowest weight edge, which is &lt;strong&gt;0 – 4&lt;/strong&gt;. Since we already found the adjacent node of &lt;strong&gt;“0”&lt;/strong&gt;, now we have to find all the adjacent nodes of &lt;strong&gt;“1”&lt;/strong&gt; and connect it.
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Foirsnf96czl5tvvzv25j.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 3&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  We can observe that vertex &lt;strong&gt;“7”&lt;/strong&gt; and vertex &lt;strong&gt;“2”&lt;/strong&gt; have the same weight. We can select any node as per our wish. I am going to select vertex &lt;strong&gt;“7”&lt;/strong&gt; and color it green after finding all the adjacent vertex of &lt;strong&gt;“7”&lt;/strong&gt; and connecting them
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fguvcm8dluf4yon11xhlg.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Step 4&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;  Now we can observe that vertex “6” has the lowest weight among vertex &lt;strong&gt;“8”&lt;/strong&gt; and &lt;strong&gt;“2”&lt;/strong&gt;. To find all the adjacent nodes of it and make the vertex “6” with green. We can see that vertex &lt;strong&gt;“8”&lt;/strong&gt; has weight &lt;strong&gt;7&lt;/strong&gt; from vertex &lt;strong&gt;“7”&lt;/strong&gt; while from vertex &lt;strong&gt;“6”&lt;/strong&gt; to vertex &lt;strong&gt;“8”&lt;/strong&gt; it weighs &lt;strong&gt;“6”&lt;/strong&gt;.
Since we need minimum weight, we break the edge &lt;strong&gt;8 – 7&lt;/strong&gt; and connect &lt;strong&gt;6 – 8&lt;/strong&gt;
&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fnh53ff4u99r0zb3ir9e7.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We repeat all the steps as mentioned above, finally, we would able to receive output as where all the nodes are in green color&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs950u2etcx3k00i5l52p.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs950u2etcx3k00i5l52p.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now I hope you all got a clear understanding of Kruskal’s and prim's algorithm. You are given the freedom to use any two algorithms to find a minimum spanning tree. Some of us feel Kruskal’s algorithm is easier compared to prim's whereas some others feel the prism algorithm is better than Kruskal’s algorithm. &lt;br&gt;
Therefore I have included both the algorithms here so that you are able to get a good understanding of finding a minimum spanning tree.&lt;/p&gt;

&lt;p&gt;See you in our next blog!&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>tutorial</category>
      <category>tree</category>
    </item>
  </channel>
</rss>
