<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Arjun Mahes on Medium]]></title>
        <description><![CDATA[Stories by Arjun Mahes on Medium]]></description>
        <link>https://medium.com/@arjun.mahes?source=rss-9aa34fe9a4a7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d6vD81yGSkEbk4ya6L9vRQ.jpeg</url>
            <title>Stories by Arjun Mahes on Medium</title>
            <link>https://medium.com/@arjun.mahes?source=rss-9aa34fe9a4a7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:50:12 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@arjun.mahes/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Endometriosis is painful — but the cure isn’t out of reach. (Our idea to solve the issue)]]></title>
            <link>https://medium.com/@arjun.mahes/endometriosis-is-painful-but-the-cure-isnt-out-of-reach-our-idea-to-solve-the-issue-490f19ce7393?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/490f19ce7393</guid>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Wed, 11 May 2022 00:17:54 GMT</pubDate>
            <atom:updated>2022-05-12T07:41:28.947Z</atom:updated>
            <content:encoded><![CDATA[<h3>Endometriosis is painful — but the cure isn’t out of reach. (Our idea to solve the issue)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/0*EUFk6XhoFdXcejG9.jpeg" /><figcaption>ENDOCURE</figcaption></figure><blockquote><em>Using DNA methylation via CRISPRoff to repress the over-expression of the genes encoding for SF1 and ERβ production. (</em><a href="https://medium.com/@mehrbains/endometriosis-is-painful-but-the-cure-isnt-out-of-reach-d41d14c799a8"><em>Mehr Bains</em></a><em>)</em></blockquote><p><strong>The Problem |</strong> Endometriosis, a long-term chronic disease-causing infertility and debilitating pain affecting daily activities, affects 190 million women of reproducible age globally, and 1 in 10 women in the UK. With no cure, treatment involves managing symptoms using hormone therapy or invasive surgery, which can cause unwanted menopausal side effects and developed resistance to treatment.</p><p><strong>The Mission|</strong> Create breakthrough epigenetic therapy to cure and alleviate the mental and physical suffering caused by endometriosis.</p><p><strong>The Vision |</strong> A world without endometriosis.</p><p><strong>Our Values |</strong></p><p>📌 We never stop innovating.</p><p>📌 We have high standards for impact.</p><p>📌 We use the first principles to target the problem.</p><p>📌 We do the unconventional.</p><p>📌 We silence the disease, not the conversation about it.</p><h3>The Problem of Endometriosis</h3><p>Endometriosis is a long-term chronic disease-causing infertility and debilitating pain that affects women of reproducible age. It occurs when endometrial-like cells grow outside of the uterus and form lesions. It is responsible for pelvic pain and other symptoms that cause interference in everyday activities, which negatively impacts the quality of life for many women. Currently, it affects 190 million women globally, with 1 in 10 women in the UK having the condition. Although it is a highly prevalent issue, endometriosis has no cure and its treatment involves only managing symptoms by using unreliable hormone therapy or invasive surgery. The unlucky few must suffer the next 4–12 years, and without the correct treatment, the issue can rapidly progress.</p><p>The current major medical treatment aside from pain medication is focused on the hormonal alteration of the menstrual cycle with a major goal to produce a pseudo-pregnancy, pseudo-menopause, or chronic anovulation, creating an acyclic, hypo-estrogenic environment. This is achieved either by blocking ovarian estrogen secretion (GnRH agonists or antagonists), by inducing pseudopregnancy (progestins), or by locally inhibiting estrogenic stimulation of the ectopic endometrium. However, patients can become resistant to hormone therapies over time or symptoms may reoccur if the medicine isn’t taken. As well, this can cause unwanted menopausal symptoms.</p><p>The other treatment modalities include medical therapy, surgical intervention, or a combination of both. The recurrence risk after surgery is high: 7–30% of patients reported recurrences three years after laparoscopic surgery and increases to 40–50% five years after treatment. In fact, recurrent symptoms occur in about 10% of women even after treatments are performed.</p><p>Additionally, 80% or more people have not heard of endometriosis, creating stigma and a lack of awareness about the disease, even though it is so prevalent. This also leads to a long diagnostic delay which contributes to the severity and progression of the disease. Another issue is that pain is often dismissed as being normal and not a result of a disease. The symptoms can often be confused as being due to menstruation and in some cases, patients aren’t believed when they say that they’re experiencing abnormal pain. Any solution addressing endometriosis will need to tackle this component of the issue as well.</p><p>Therefore, this is a call for a novel innovative solution to truly cure endometriosis while eliminating the side effects, that ENDOCURE plans to bring to the industry.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/0*k0X5RnVvafI9E3sK.png" /><figcaption>Normal vs. Endometriosis Affected Uterus</figcaption></figure><h3>Epigenetic Regulation Via Methylation</h3><p>Cells are able to change the regulation levels of specific genes in their genomes, through a process known as methylation. Methylation involves adding a methyl (CH3) group that blocks the gene from being read by the cell. As a result, the gene is silenced, as it won’t be transcribed, translated, or turned into a protein. The process causes the DNA and histones to pack closely together which prevents transcription factors from binding to the DNA and the gene isn’t expressed. However, when this process goes wrong, diseases can occur, one of which is endometriosis.</p><h3>What is CRISPRoff?</h3><p>In 2021, a study by Nunez et al. was published discussing a new CRISPR variant called CRISPRoff. Contrary to the traditional CRISPR complex which breaks the double strands of DNA and leaves permanent changes to the cell genome, CRISPRoff gives us the ability to <em>silence genes</em> and essentially stop them from affecting the body, by working on an epigenetic level instead of at a genetic level. CRISPRoff also comes with an “undo button” in the form of CRISPR on, which can reverse the changes made by CRISPRoff. In short, CRISPRoff is a recently discovered epigenetic tool that makes reversible and heritable changes in gene expression, without causing double-stranded breaks in DNA, therefore making it a much safer treatment than the CRISPR Cas9 system.</p><p>The first component of the CRISPRoff system is a dCas9 protein. This is a mutated form of Cas9 which is labelled dead because it cannot make double-stranded breaks in DNA but it’s still programmable using a guide RNA (sgRNA), which can guide it to the complement DNA sequence at the desired target site. The next component is KRAB, which can influence what proteins are recruited near the gene. Another component of this technology is Dnmt3A and 3L which are DNA methyltransferase proteins that can methylate DNA and basically alter the epigenome.</p><p>CRISPR on, on the other hand, contains DNA demethylase which can remove methyl groups and turn the gene “on” as well as transactivator domains that can promote gene expression even further.</p><p>The reason why CRISPRoff is safer than CRISPR Cas9 is that CRISPR Cas9 involves making a double-stranded break (DSB) in DNA and the DSB is repaired using the NHEJ or HDR method. The NHEJ method involves putting the ends of DNA together where the break is made, which results in insertion or deletion mutations. The HDR method introduces a donor template into the cell which edits the DNA sequence as the DNA is repaired. In general, DSBs are dangerous for a cell and this system depends on the cell’s ability to repair the DSB properly, which makes the end result somewhat unpredictable.</p><p>The epigenetic changes made by CRISPRoff have also been shown to be heritable and able to be retained even through cell division and differentiation. CRISPRoff combines 3L + Dnmt3A and KRAB to be more effective in retaining epigenetic changes than each of them individually. The paper also indicated that even when CRISPRoff was transiently expressed to silence the H2B gene, the gene silencing effect was still retained in over 90% of cells, 10 days after transfection.</p><p>CRISPRoff also has the ability to silence many genes, even those without CpG islands. Using a sgRNA library designed to target more than 20,000 genes, their research shows that it can silence most genes in the human genome.</p><h3>ENDOCURE: Using CRISPRoff to Silence the NR5A1 and ESR2 Genes Encoding For SF1 and ERβ</h3><p>We propose epigenetic therapy to cure endometriosis by using CRISPRoff to repress the over-expression of NR5A1 and ESR2 genes. Our hypothesis is that silencing these genes, which are correlated with SF1 and ERβ production respectively, will prevent local estrogen and aromatase enzyme production, which have been determined to drive the progression of endometriosis through increased inflammation, resistance to endometriotic cell death and cell proliferation.</p><p>We have determined our hypothesis based on a study done by Bulun et al., 2015 that determined the over-expression of SF1 by 12,000X in endometriotic cells is due to the promoter region being unmethylated, therefore allowing unchecked high levels of expression that is not found in normal cells. SF1 has been shown to be a transcriptional regulator that is involved in moderating the cascade that produces estrogen from cholesterol, where a part of this cascade includes a gene encoding for aromatase. As well, we derive our hypothesis from the study demonstrating that the promoter for ERβ is hypo-methylated, leading to 140X increase in expression, where ERβ further targets signalling proteins such as RERG that oversee the action of estrogen in contributing to the pathology of the disease.</p><p>Another study done by Nasu et. al, 2011, examines the aberrant DNA methylation that contributes to endometriosis and identifies the hypo-methylation of a CpG island on the ERβ promoter contributes to the aberrant expression of ERβ in endometriotic cells. As well, they determine that the SF1 promoter is hypo-methylated in endometriotic cells, which contributes to the upregulation of aromatase.</p><p>We propose the use of CRISPRoff to prevent the DSBs (double-stranded breaks) and the possibility of mutations that arises from random DNA repair when using the CRISPR Cas9 complex, as well as preventing the menopausal side effects of using aromatase inhibitors and hormone therapies as treatment.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/0*gjGwvuFW5NODXUp_.png" /><figcaption>ENDOCURE CRISPRoff Treatment</figcaption></figure><h3>Pre-clinical Study</h3><p>To better understand CRISPRoff and its feasibility for curing endometriosis, we aim to conduct a pre-clinical study to answer the following questions:</p><ul><li>Will the silenced NR5A1 and ESR2 genes stop the progression of endometriosis in the body?</li><li>Should the genes encoding for SF1 and ERβ both be treated with CRISPRoff and repressed, or only one or the other is needed to cure symptoms? Which one is more effective in treating endometriosis?</li><li>How many doses of CRISPRoff are needed to treat cells and in what intervals to maximize the retention of the epigenetic changes made, in future cell generations?</li></ul><p>We aim to use murine models for the pre-clinical study, in 3 rounds of experiment.</p><p><strong>Round 1:</strong></p><ul><li>Menstruation is induced and endometrium tissue is injected into 3 cohorts of mice, to induce endometriotic lesions outside the uterus.</li><li>Cohort 1 is treated with CRISPRoff containing a sgRNA targeting NR5A1, cohort 2 receives CRISPRoff containing a sgRNA targeting ESR2, and cohort 3 is treated with both CRISPRoff treatments targeting NR5A1 and ESR2. The sgRNA guides CRISPRoff to endometriotic cells and AAV, a viral vector, is used to deliver in vivo to endometriotic lesions outside the uterus.</li><li>Mice are tested using Western blotting and qPCR to quantitatively evaluate the mRNA and protein expression levels from the NR5A1 and ESR2 genes of SR1 and ERβ respectively, after CRISPRoff treatment. DNA methylation activity at the promoter regions for the genes is also measured using bisulphite sequencing.</li></ul><p><strong>Round 2:</strong></p><ul><li>The cured endometriotic cells from round 1 of mice will be transferred to this round, to another 3 cohorts of mice that have not been injected with endometriotic cells, to determine if the mice over-express SR1 and ERβ or not.</li></ul><p><strong>Round 3:</strong></p><p>The experiment in round 1 is repeated to determine the following:</p><ul><li>Whether CRISPRoff does again demonstrate that the NR5A1 and ESR2 genes are silenced</li><li>The number of doses of CRISPRoff that are required</li><li>The time interval in which the doses should be administered to ensure epigenetic changes are retained in cell memory</li></ul><p>We will be moving to larger animals for pre-clinical testing if this study is proven to be successful.</p><p>One challenge to acknowledge in carrying out this trial is choosing the correct viral vector to insert CRISPRoff into the murine model to target the desired tissue. We aim to test segmenting the CRISPRoff treatment over 3 AAVs before insertion since VLPs have been shown to not work for inserting CRISPRoff.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/819/0*Q_h8UPcA3nt9H6ma.png" /></figure><h3>Stages For FDA Approval</h3><p><strong>Phase 1:</strong> These trials usually enroll 20 to 100 healthy volunteers or mice with the condition being studied, and last 1–2 years. This phase measures safety by testing for any adverse side effects of the treatment, but not necessarily how effective the drug or device is.</p><p><strong>Phase 2:</strong> Around 70% of potential new drugs enter Phase 2, which continues to measure safety, while also looking at how effective the treatment is and carefully investigating its side effects. Phase 2 trials recruit up to several hundred patients with the condition to take part. This phase typically lasts several months to two years.</p><p><strong>Phase 3:</strong> Just 33% of drugs make it to Phase 3, which tests the potential treatment in the largest number of people. This phase measures both safety and effectiveness with many volunteers, sometimes thousands. Phase 3 trials last from one to four years.</p><p><strong>FDA approval:</strong> After Phase 3, a pharmaceutical company may submit a New Drug Application (NDA) or a biologics license application (BLA) for the treatment to the Food and Drug Administration (FDA). The FDA then reviews results from all stages of the trial to determine whether it will approve the drug and allow the pharmaceutical company to begin marketing it to the public.</p><p><strong>Phase 4:</strong> This phase is often called “Post-Approval Research and Monitoring.” After a new treatment is approved by the FDA, the pharmaceutical or device company may want to continue monitoring patients to learn more about the treatment’s longer-term effects, while comparing it against other already-approved options. It may take time for long-term side effects to appear, making this an important phase.</p><h3>Cost Breakdown</h3><p>The average cost of phase 1, 2, and 3 clinical trials across therapeutic areas is around $3.1 million, $14.6 million, and $17.5 million respectively. Pivotal (phase 3) studies for new drugs approved by the Food and Drug Administration (FDA) of the United States cost a median of $41,117 per patient. FDA approval and phase 4 will cost $2.0 million and $6.8 million respectively. Hence, the total cost of development for EndoCure will be approximately $44 million.</p><h3>The Outcome</h3><p>The cost of current surgery methods to treat endometriosis ranges from $14,564.73 (vaginal hysterectomy) to $26,002. One study estimated that the annual cost of endometriosis was $5200 per patient, with lost productivity and lost leisure time costs being 78%.</p><p>The treatment cost for endometriosis using ENDOCURE is $2 million per person, based on our research. Although expensive, the cost will rapidly decrease as the industry expands and the costs for genetic and epigenetic therapy decrease. To begin our rollout, we start in developed countries as they possess the infrastructure and abilities to implement the process. We aim to target the UK for launching the treatment and cure 675,000 patients, and then take the treatment global and provide a cure for as many women affected as possible, as the costs for CRISPRoff treatment decrease with market growth. As well, more people will get access to our solution when awareness of endometriosis and its symptoms increases.</p><p>The benefits of such a technology are priceless for the well-being of women and are a leap towards advancing femtech. Beyond treatment, we’d like to develop an early detection test for endometriosis using biomarkers, and begin a campaign to raise awareness and reduce stigma through conversation and education.</p><h3>The Opportunity</h3><p>The femtech global market size was $40.2 billion in 2020 and is projected to grow with a CAGR of 13.3% to $75.1 billion by 2025. The endometriosis market in the 5EU (France, Germany, Italy, Spain and the UK) is expected to grow with a CAGR of 12.5% (higher than the US or Japan) from 2020–2030. Europe has 25% of all femtech startups, and the UK specifically has 10%. Europe also has a prominent endometriosis market position as their healthcare sector continues to grow and more $ is put into the industry.</p><h3>ENDOCURE</h3><p>At ENDOCURE, we envision a world where women have the freedom to live with a healthy and high quality of life. Femtech is an advancing industry that is becoming a global priority as more research is being done on women’s health and we’re excited to take a step to be involved in advancing this field. We believe our idea of using breakthrough epigenetic therapy to cure the physical suffering caused by endometriosis in 10% of all women of reproducible age will be a game-changer.</p><p>If this sounds similar to your vision of the future, we’d love to have a chat and see how we can tackle endometriosis together.</p><p>This article was written by Mehr Bains, Arjun Mahes, and Aditya Mahes, on behalf of the ENDOCURE team.</p><p>We’d also like to thank everyone who provided feedback for this article!</p><h3>References</h3><p>Nuñez, J. K., Chen, J., Pommier, G. C., Cogan, J. Z., Replogle, J. M., Adriaens, C., Ramadoss, G. N., Shi, Q., Hung, K. L., Samelson, A. J., Pogson, A. N., Kim, J., Chung, A., Leonetti, M. D., Chang, H. Y., Kampmann, M., Bernstein, B. E., Hovestadt, V., Gilbert, L. A., &amp; Weissman, J. S. (2021). Genome-wide programmable transcriptional memory by CRISPR-based epigenome editing. Cell, S0092–8674(21)00353–6. Advance online publication. <a href="https://doi.org/10.1016/j.cell.2021.03.025">https://doi.org/10.1016/j.cell.2021.03.025</a></p><p>Bulun SE, Monsivais D, Kakinuma T, Furukawa Y, Bernardi L, Pavone ME, Dyson M. Molecular biology of endometriosis: from aromatase to genomic abnormalities. Semin Reprod Med. 2015 May;33(3):220–4. doi: 10.1055/s-0035–1554053. Epub 2015 Jun 2. PMID: 26036904.</p><p>Nasu, K., Kawano, Y., Tsukamoto, Y., Takano, M., Takai, N., Li, H., Furukawa, Y., Abe, W., Moriyama, M. and Narahara, H. (2011), Aberrant DNA methylation status of endometriosis: Epigenetics as the pathogenesis, biomarker and therapeutic target. Journal of Obstetrics and Gynaecology Research, 37: 683–695. <a href="https://doi.org/10.1111/j.1447-0756.2011.01663.x">https://doi.org/10.1111/j.1447-0756.2011.01663.x</a><em>Endometriosis</em>. (2021, March 31). WHO | World Health Organization. Retrieved May 5, 2022, from <a href="https://www.who.int/news-room/fact-sheets/detail/endometriosis">https://www.who.int/news-room/fact-sheets/detail/endometriosis</a></p><p><em>Endometriosis Facts and Figures</em>. (n.d.). Endometriosis UK. Retrieved May 5, 2022, from <a href="https://www.endometriosis-uk.org/endometriosis-facts-and-figures">https://www.endometriosis-uk.org/endometriosis-facts-and-figures</a>Katherine, B., Amelia, P., Jessica, S., Elaine, P., Alicia, S., Nazmin, E., &amp; Richard, B. (2022).</p><p>Endometriosis in the Mouse: Challenges and Progress Toward a ‘Best Fit’ Murine Model. Frontiers in Physiology, 12. 10.3389/fphys.2021.806574Dash PK, Kaminski R, Bella R, et al.</p><p>Sequential LASER ART and CRISPR Treatments Eliminate HIV-1 in a Subset of Infected Humanized Mice. Nat Commun. 2019;10(1):2753. Published 2019 Jul 2. doi:10.1038/s41467–019–10366-yPeng, S., Cai, J., &amp; Bao, S. (2021).</p><p>CMBs carrying PTX and CRISPR/Cas9 targeting &lt;em&gt;C‑erbB‑2&lt;/em&gt; plasmids interfere with endometrial cancer cells. Molecular Medicine Reports, 24, 830. <a href="https://doi.org/10.3892/mmr.2021.12470">https://doi.org/10.3892/mmr.2021.12470</a><em>FemTech Market Overview</em>. (n.d.).</p><p>FemTech Analytics. Retrieved May 5, 2022, from <a href="https://www.femtech.health/femtech-market-overview">https://www.femtech.health/femtech-market-overview</a>Endometriosis market projected to grow at a CAGR of 10.6% between 2020 and 2030. (2022, January 6). Pharmaceutical Technology. Retrieved May 5, 2022, from <a href="https://www.pharmaceutical-technology.com/uncategorised/endometriosis-market-cagr-2020-2030/">https://www.pharmaceutical-technology.com/uncategorised/endometriosis-market-cagr-2020-2030/</a></p><p>Endometriosis Market To Reach USD 2.42 Billion By 2026 | Reports And Data. (2020, March 5). GlobeNewswire. Retrieved May 5, 2022, from <a href="https://www.globenewswire.com/news-release/2020/03/05/1996125/0/en/Endometriosis-Market-To-Reach-USD-2-42-Billion-By-2026-Reports-And-Data.html">https://www.globenewswire.com/news-release/2020/03/05/1996125/0/en/Endometriosis-Market-To-Reach-USD-2-42-Billion-By-2026-Reports-And-Data.html</a>Guildford, A. (2021, March 17).</p><p>Endometriosis: Are there any new treatments on the horizon? Medical News Today. Retrieved May 5, 2022, from <a href="https://www.medicalnewstoday.com/articles/the-latest-in-endometriosis-research-ways-forward#Existing-treatments">https://www.medicalnewstoday.com/articles/the-latest-in-endometriosis-research-ways-forward#Existing-treatments</a></p><p><em>How Much Does a Clinical Trial Cost?</em> (2020, January 2). Sofpromed. Retrieved May 5, 2022, from <a href="https://www.sofpromed.com/how-much-does-a-clinical-trial-cost">https://www.sofpromed.com/how-much-does-a-clinical-trial-cost</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=490f19ce7393" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Dying Kaveri—A River Story]]></title>
            <link>https://studentsxstudents.com/the-dying-kaveri-a-river-story-d5b76614dc8c?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/d5b76614dc8c</guid>
            <category><![CDATA[rivers]]></category>
            <category><![CDATA[science]]></category>
            <category><![CDATA[climate-change]]></category>
            <category><![CDATA[activism]]></category>
            <category><![CDATA[environment]]></category>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Mon, 11 Apr 2022 22:29:42 GMT</pubDate>
            <atom:updated>2022-05-14T00:01:31.515Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1oggeRyqwL8hC097" /><figcaption>Photo by <a href="https://unsplash.com/@mattpalmer?utm_source=medium&amp;utm_medium=referral">Matt Palmer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Chennai has been facing its worst water crisis in the last few years. While residents relied on taps, today, they are struggling as they depend on an unpredictable water tanker.</p><p>The four main reservoirs supplying the bulk of cities drinking water have completely dried up the combined stuff because there is no rain on the ground. Water levels have gone so low that there’s no water coming through the bore wells right now even 1500ft below.</p><p>The reason for this crisis is the drying Kaveri River. For the past decade, the mighty Kaveri river had been running dry. It took just two years of drought and extreme temperatures to impact south India&#39;s major cities.</p><h4>The Kaveri Basin</h4><p>Kaveri is not just 800 kilometers long stretch of water, it’s a complex and interconnected system of water sources that creates and sustains an entire water system called the Kaveri river basin.</p><p>Most of the water in the river relies on monsoon rains. When the rain beats down for 140 days it is easy to preserve Kaveri for the year. However, today Chennai’s rain happens largely between 40 to 75 days.</p><p>With the effects of climate change, this problem has been woefully extended as the entire Kaveri system’s <a href="https://en.wikipedia.org/wiki/Microclimate">micro hydro-climatic</a> region which we had in earlier days is absent.</p><p>In Chennai, rainfall has been reaching all-time highs in the monsoon period, but only for 4 fortnights. Thus, when the rain stops the consequences are not pretty. Drought strikes and then farming, freshwater, and wildlife are drastically reduced.</p><h4>Influencing Factors + Effects</h4><p>Trees play a crucial if hidden role in the ecology of a river system but for them to play that role they actually need to be there a staggering 87 of the Kaveri basin’s native forests have been cut down.</p><p>There is a major reason why the river is running out of water. India is the largest extractor of <strong>groundwater in the world</strong> taking almost three times more than China despite having a similar population in the Kaveri river basin.</p><blockquote>1. Ground Water Depletion</blockquote><p>Even looked at on a global scale, groundwater provides drinking water entirely or in part for as much as 50% of the global population and accounts for 43% of the water used for irrigation. Worldwide, 2.5 billion people depend solely on groundwater resources to satisfy their basic daily water needs.</p><p>If any river basin is getting dried up, it means there is sub-par management of the groundwater table. This is because large bodies of water become shallow from groundwater depletion as a shortage keeps additional water (rain) from flowing into lakes, rivers, and seas.</p><p>As a result of less water in rivers and seas, less food will be produced, and the problem of water scarcity will worsen.</p><p>In the Kaveri basin, the primary agricultural crops are rice paddy and sugarcane — river and ground water-intensive short-term mono-crops. One kg of rice in this soil requires 2500 liters of water.</p><blockquote>For this reason, the river is competing with the farmers for the same groundwater.</blockquote><p>Solutions are not impossible. If 2.4 billion crore saplings are planted (as per the Isha foundation) in 12 to 15 years.</p><p>Collectives of deep-rooted trees in the Kaveri basin helping capture rainwater by making the soil permeable and porous allowing rainwater to percolate and add micronutrients to recharge the groundwater table.</p><p>Today, the basin is dominated by monoculture plantations the river stream which can sustain the water only for six to eight months compared with only 40–50 days of rainfall.</p><p>If this initiative is possible farmers will be able to grow three times the produce for the increase of groundwater in 12 years. Today, farmers can only grow on average one crop once a year because of groundwater shortages increasing debt and reliance on fertilizers — posing their own problems. For some villagers in Karnataka, the issue is extreme. Fifteen farmers committed suicide in the past year and a half.</p><blockquote>2. Farmer Suicide</blockquote><p>Reforestation of the Kaveri river basin to bring water and save farmers relies on millions of people to plant trees and reserve water usage.</p><h4>The Soil Problem</h4><p>— coming up —</p><h3>Before you go…</h3><blockquote><em>Through this article, you have learned a problem that I am passionate about. I have experienced India’s water crisis, and hope we are able to contend the problem.</em></blockquote><blockquote><em>if you enjoyed reading through this article feel free to connect with my socials 🤗<br></em><a href="https://www.linkedin.com/in/arjun-mahes-a46200220/"><em>LinkedIn</em></a><em> | </em><a href="https://arjunmahes.substack.com/"><em>Newsletter</em></a><em> | </em><a href="https://twitter.com/mahes_arjun"><em>Twitter</em></a></blockquote><p><strong><em>We’re providing opportunities for the next generation of student thinkers, inventors, and learners, to publish their thoughts, ideas, and innovation through writing.</em></strong><br><em>Our writers span from all areas of topics — from </em><a href="https://studentsxstudents.com/"><em>Growth to Tech, all the way to Future and World</em></a><em>.</em><br><em>So if you feel like you’re about to jump into a rabbit hole of reading these incredible articles, don’t worry, we feel the same way. ;)</em><br><em>That’s why </em><a href="https://studentsxstudents.com/"><em>students x students</em></a><em> is the place for getting your voice heard!</em><br><em>Sounds interesting? </em><a href="https://studentsxstudents.com/for-students-by-students-becoming-a-contributor-and-expanding-your-impact-f6da9189fa78"><em>Why not join us on this epic journey</em></a>?</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d5b76614dc8c" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/the-dying-kaveri-a-river-story-d5b76614dc8c">The Dying Kaveri—A River Story</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Most Valuable Decision Models]]></title>
            <link>https://medium.com/@arjun.mahes/the-most-valuable-decision-models-ff36d35712fa?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/ff36d35712fa</guid>
            <category><![CDATA[life]]></category>
            <category><![CDATA[growth]]></category>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Sat, 26 Mar 2022 18:46:14 GMT</pubDate>
            <atom:updated>2022-03-29T21:53:39.700Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*D80piBcXEv3r2bca" /><figcaption>Sugar way or disciplined way? | Photo by <a href="https://unsplash.com/@soymeraki?utm_source=medium&amp;utm_medium=referral">Javier Allegue Barros</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>The insights in this blog is the brainchild of Sahil Bloom&#39;s podcast. His insights are brainfood and highly practical.</blockquote><p>I’ve spent the past year relentlessly trying to become a productive person. Yet, one thing so notoriously dispiriting is the excuses along the way.</p><blockquote>There are excuses to stay comfortable. There are excuses to do what I like. There are excuses to flatter myself.</blockquote><p>How can I become deliberate over my decisions to win over excuses and gain more results?</p><ul><li><strong>A desire</strong> to create action</li><li><strong>The techniques</strong> to follow the correct path to reach the most favourable results.</li></ul><blockquote>Through this article, you will be introduced to numerous techniques to create motivation and choose the correct path.</blockquote><h4>TL;DR</h4><ul><li><strong>What techniques?</strong> — How can I quantify my learning? Make better decisions? Create Luck?</li><li><strong>What excuses? </strong>— The Narrative Fallacy,</li></ul><h3><strong>What techniques should I follow?</strong></h3><h4>The Feynman Technique</h4><p>If you can’t explain it to a 5-year-old, you don&#39;t understand the concept. We use the Feynman Technique to recognize complexity and jargon is used to cover lack of understanding.</p><blockquote>If you can’t explain it to a 5-year-old, you don’t really understand it.</blockquote><p>Complexity and jargon are flags that you don’t understand a concept. Consider referring back to the material till you reach the 5-year-old milestone.</p><h4>Choose Discomfort</h4><p>There is always the choice of choosing the uncomfortable path. Either we fail to see opportunity in being uncomfortable or we are accustomed to being comfortable.</p><blockquote>“If you have a choice between entering two rooms, choose the room where you are more likely to be the dumbest one” — Sahil Bloom</blockquote><p>It’s easy to criticize from the sidelines but it’s hard to perform. Growth favours the performers — although it is an uncomfortable and vulnerable activity.</p><p>The key is to choose the future circumstance that is more difficult in the short term to override your instinct to be comfortable — helping you in the long term. Being uncomfortable is bad for the ego, but imperative for growth.</p><h4>Manufacturing Luck</h4><p>Luck in the real world is manufactured. Your daily habits put you in a position where luck is more likely to appear. The more you invest in your passions and career the more luck you will gain.</p><p>Always choose the path that gives you more opportunities to make luck. A simple framework to quantify and increase your luck is to take action around your passion and communicate your brand.</p><blockquote>Luck = Actions towards passion × Communication of brand</blockquote><h4>The Worrying Technique</h4><p>We worry about things we can’t control. Either a circumstance is too daunting to battle or it greatly affects us, yet we have no power.</p><p>Most of our energy divides into worrying about short-term results. It destroys our mental stability, making sub-par decisions.</p><p>Before any decision, always ask yourself:</p><blockquote>— Can I do anything about this situation? If then, is this topic worth my mental energy?</blockquote><p>As an example, if I do not have the ability to control the embarrassments and guilt— <strong><em>past </em></strong>—, then why worry? This framework must only be used as a reality realization tool for further action if necessary.</p><blockquote><strong>Another Perspective:</strong></blockquote><blockquote>The worrying technique can be extended to arguments. If any discussion cannot be settled through experiment or observation, it is only a waste of time. Or even, a discussion that can be asserted without evidence can also be dismissed without evidence.</blockquote><blockquote>It is your choice to choose what to worry about and which arguments to enter.</blockquote><h4>Choose Your Group</h4><p>When choosing who to spend time with, prioritize spending more time with optimists.</p><p>Pessimists see closed doors. Optimists see the open doors — and probably kick down the closed doors.</p><blockquote>Remember: Pessimists sound smart, optimists get rich.</blockquote><p>When intentionally choosing your surroundings, your life will become more enjoyable and growth-fulfilling.</p><h4>The Kat Cole Pygmalion Technique</h4><p>The Pygmalion Effect is a phenomenon where high expectations lead to high performance — and vice-versa.</p><p>When attempting to create a growth setting, see people as their best selves with the most potential. As a result, your team will start to achieve more.</p><p>In another perspective, setting high expectations for ourselves will lead to better self-performance. Soon an unending growth loop will form where you constantly try to beat your past score.</p><h3>What excuses will I face?</h3><h4>Everyone is born the same</h4><p>Every baby has the same intelligence. We all were born the same. The only difference between the successful and the average is a drive to improve.</p><p>There are so many underdogs in this world that didn’t have fair circumstances. Thus, it doesn’t make sense to construct excuses on why we don’t succeed.</p><blockquote>People have the choice to choose their perceptions and to choose to grow.</blockquote><p>We have a habit of creating reasons successful people are successful. If we believe these reasons as a lucky factor we are creating excuses.</p><h4>The Past Blackhole</h4><p>The most common excuse I find is creating self-limitations based on the past. Why do we let the <strong>past</strong> affect our mindsets, our thinking, and our actions.</p><p>If you ever feel you are not able to achieve a specific ideal because of the past, you are limiting your capabilities. Even if you embarrassed yourself, why do you let that stop growth? Even if you don&#39;t have a history of good math marks why do let that stop practice?</p><blockquote>In the end, you yourself are the cause of achievements and failures. The successful choose to grow above staying constant.</blockquote><h3>Before you go…</h3><blockquote><em>Through this article, you have learned the fundamentals of how to be intentional.🎊🎉 We explored design making principles, then looked into excuses we make.</em></blockquote><blockquote>if you enjoyed reading through this article feel free to connect with my socials 🤗<em><br></em><a href="https://www.linkedin.com/in/arjun-mahes-a46200220/"><em>LinkedIn</em></a><em> | </em><a href="https://arjunmahes.substack.com/"><em>Newsletter</em></a><em> | </em><a href="https://twitter.com/mahes_arjun"><em>Twitter</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ff36d35712fa" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Intuition of Recurrent Neural Networks]]></title>
            <link>https://medium.com/geekculture/the-intuition-of-recurrent-neural-networks-906a846e20b0?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/906a846e20b0</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[random-thoughts]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[nlp]]></category>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Mon, 07 Feb 2022 00:16:54 GMT</pubDate>
            <atom:updated>2022-02-08T06:43:52.246Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*b3b-T7pXIhRx7Ph8" /><figcaption>remember those memories? ML does too 🙌 | Photo by <a href="https://unsplash.com/@jontyson?utm_source=medium&amp;utm_medium=referral">Jon Tyson</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>This is an introductory article. I suggest you know the works behind <a href="https://medium.com/geekculture/gradient-descent-simplified-631a7ce38cb6">gradient descent</a>, <a href="https://www.deeplearningbook.org/">some linear algebra</a>, <a href="https://www.deeplearningbook.org/">and basic DL knowledge</a>🙂. However, its quite simple with many visuals, so approach with any level of knowledge!</blockquote><p>There is a magic in recurrent neural networks that I have always cherished. I remember viewing Andrej Karpathy’s <a href="https://github.com/topics/text-prediction">T</a>ypingAssistant LSTM model a while back. Within a few dozen minutes of training his model (with rather arbitrarily-chosen hyperparameters), it started to generate meaning that was on the edge of making sense.</p><blockquote>How is it possible to extract the essence of previous terms to guess future words?</blockquote><p>I was shocked. From my machine learning experience, I was familiar with a model’s competency to find and extract relationships in <strong>linear</strong> data, but what is the magic of understanding the theme, grammar, and style of a sentence?</p><p>Juergen Schmidhuber discovered this magical notion by adding a subtle sense of memory —<strong>or residual </strong>— into the traditional neural network. These are the traditional RNNs we see today.</p><blockquote>Through this article, you will learn about the mathematical operations behind the LSTM and RNN and their varieties.</blockquote><h4>TL;DR</h4><ul><li><strong>RNNs Simplified:</strong> What do the abbreviations stand for? How do RNNs and Feed-Forward nets differ? What are the architectures of the algorithm?</li><li><strong>Going Deeper into the Concept:</strong> What are the varieties of the RNN? How do LSTMs function? What are your next steps?</li></ul><h3>RNNs Simplified</h3><h4>Introductory Example</h4><p>Let’s assume you programmed an object-detection model where the input is a documentary of wild animals.</p><p>The result is accurate, yet in some cases, the model classifies wolf species as dogs — as they fall under the same family.</p><p>In this case, a neural network with residuals will perform well. If the computer understands the given documentary revolves around wild animals — from previous object-detection runs —, it can then simply use this knowledge to correctly predict wolf species. This is what an RNN does.</p><blockquote>In RNNs the current output depends on its present value but also past inputs.</blockquote><p>There is <strong>immense</strong> power in this type of neural network. It can identify the context for sentiment analysis, translate from languages, and other natural language possibilities— by remembering previous word meanings.</p><h4>Grasping Memory from Past Inputs</h4><p>In a traditional dense-layered feed-forward network, there are three distinct layers.</p><ul><li><strong>Input Layer:</strong> number of neurons correlates with the number of data features inputted.</li><li><strong>Hidden Layers: </strong>deep learning computation is done. Hyperparameters such as the size of layers and the number of layers depend on the specific problem.</li><li><strong>Output Layer: </strong>we arrive at the solution or probability after a softmax function.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/494/0*Oq-1PND1xHUS5DnB.png" /><figcaption>Weights (w_ii) are constants that are tuned through gradient descent | <a href="https://matlab4engineers.com/lesson/feed-forward-networks/?lang=en&amp;v=3a52f3c22ed6">Source</a></figcaption></figure><p>RNNs on the other hand allow memory to persist in feedforward neural networks by introducing a loop mechanism. This instrument recurrently passes prior outputs to the current location, acting as a highway for memory.</p><blockquote>Contrary to FeedForward Networks RNNs allow information loops.</blockquote><p>If we were to visualize this information loop the diagram would look as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/proxy/0*V6KRI9e_gnSELUFW.gif" /><figcaption>Information is recurrently recycled back into the hidden layer</figcaption></figure><p>Here, the hidden state is another method to articulate the highway of information. Notice, that this highway will continually be updated if there are multiple pieces of information to be processed through the RNN.</p><p>To get a better glimpse of the loop mechanism let’s use the Text Prediction NLP model as a guide. This model predicts the next words in a sentence based on prior word meaning.</p><blockquote>RNNs are used for NLP as they perform well to predict and analyze sequences of information.</blockquote><blockquote>Be sure to watch this demo to understand what <a href="https://www.youtube.com/watch?v=5DSfFDdybzg">Text Prediction</a> models do. <em>😉</em></blockquote><p>In our model, the first step is to split the input sentence into individual words that are transformed into numerical vectors for computer readability. These vectors are individually entered into the neural network in sequence.</p><p>If the sentence is <em>“Soup is Delicious!”</em>, the vectorized form of<em> “Soup”</em> is calculated and then passed to the hidden layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*LzhedP-I7AZXK8j3HYaBFw.png" /><figcaption>word to vector transformation occurs through the one-hot encoding process</figcaption></figure><p>The second word “in” is passed likewise, despite an additional vector <strong>‘y_soup’</strong>. This sum forms the vector <strong>‘y_in’</strong> that has the current word as well as previous word meanings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/334/1*Aaxw_FEnRhWg7ym3XzmKhA.png" /></figure><p>After numerous such additions for each word in the sentence, we arrive at a vector that depicts the meaning and dependencies between the sentence as a whole, which can be used to predict further words in the sentence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*D3v8Omg-11K6vGa_fP9nsw.png" /><figcaption>y_sentence can then be used for paraphrasing and other NLP uses | tanh is the activation function used</figcaption></figure><p>Note that the hidden layers shown above are not separate layers. They are one layer, in which the residual is cycled. If there were multiple layers the <a href="https://medium.com/geekculture/gradient-descent-simplified-631a7ce38cb6">gradient descent</a> process will be skewed.</p><p>Thus, we know the working processes of the recurrent neural network! However, there are few places where this logic can go wrong.</p><h3>RNN Varieties</h3><p>In fact, using the RNN logic shown for text prediction will not function as expected. This is because <strong>y_sentence</strong> has an uneven distribution of word influence.</p><p>For instance, later words such as “delicious!” and “is” in “Soup is delicious!” have more effect on the model’s future text prediction. Thus, there is a short-term word bias in our model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/430/1*NPtuOC6QpnbOsou7FB27IA.png" /><figcaption>the degree of a sentence’s influence on the model’s prediction is biased</figcaption></figure><p>Introducing long-term memory into the equation can balance the degree of influence of each word. It will also combat the <a href="https://medium.datadriveninvestor.com/how-do-lstm-networks-solve-the-problem-of-vanishing-gradients-a6784971a577">vanishing gradient problem</a> permitting longer sequences of words in which accurate meaning is extracted.</p><blockquote>The technique employing both short and long-term memory is named the LSTM.</blockquote><h4>Long Short Term Memory</h4><p>LSTMs are powerful tools. It is widely used for extended sequences of data — such as paragraphs and DNA — and lays the foundation for the natural language processing field with traditional RNNs.</p><blockquote>Although the architecture of an LSTM differs from a classic RNN, it is considered a RNN itself for its memory capabilities.</blockquote><p>The LSTM architecture is composed of four gates in which long-term and short-term memory — derived from an input sequence — is passed through to obtain a prediction and updated long and short term memory.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/468/1*E9K_laDLIG359ARvnshHvw.png" /><figcaption>note that the text prediction process includes more steps including word embeddings, character embedding, and others.</figcaption></figure><p>The four gates noted include:</p><ul><li>Forget Gate: Useless data is discarded from the <strong>long-term memory</strong> and useful data is kept.</li><li>Learn Gate: In the same way, the <strong>current event</strong> — in the sequence — and the <strong>short-term memory</strong> is joined to remove useless data.</li><li>Remember Gate: The preserved information after the <strong>Forget gate</strong> and <strong>Learn Gate</strong> is combined to form an updated long-term memory. This information is retained for future events.</li><li>Use Gate: Outputs from the <strong>Forget</strong> and <strong>Learn gates</strong> are calculated to use for the following prediction.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nWHA843paYL6ckZJtWfw6Q.png" /><figcaption>and the process continues…</figcaption></figure><h3>Next Steps and Future Readings</h3><p>Now that we comprehend the ideas of <strong>memory</strong> and <strong>recurrent neural networks</strong>, the next step is to understand the mathematical operations behind them.</p><p>Consider reading <a href="https://towardsdatascience.com/lstm-gradients-b3996e6a0296">this</a> article to understand more about the functions inside each of the four gates. If you are curious about LSTM and RNN projects build your own using <a href="https://www.youtube.com/watch?v=y2BaTt1fxJU">this</a> image-captioning tutorial!</p><blockquote><strong>Good luck on your journey to machine learning heights!</strong></blockquote><h3>Before you go…</h3><blockquote><em>Machine learning has always been a hotspot for me. It is used </em><strong><em>everywhere</em></strong><em> whether in snapchat filters or spam classifiers. Today, it’s more of a lifestyle than a buzzword.</em></blockquote><blockquote><em>That is why I got into the field of data-science. Since the beginning, I have been addicted and I hope I will always be.</em></blockquote><blockquote><em>if you enjoyed reading through this article feel free to connect with my socials 🤗 (p.s. looking for some problems to solve: send me some over if you get time)<br></em><a href="https://www.linkedin.com/in/arjun-mahes-a46200220/"><em>LinkedIn</em></a><em> | </em><a href="https://arjunmahes.substack.com/"><em>Newsletter</em></a><em> | </em><a href="https://twitter.com/mahes_arjun"><em>Twitter</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=906a846e20b0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/the-intuition-of-recurrent-neural-networks-906a846e20b0">The Intuition of Recurrent Neural Networks</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Neural Image Style Transfer]]></title>
            <link>https://medium.com/geekculture/neural-image-style-transfer-515fe09f1c0c?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/515fe09f1c0c</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[life]]></category>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Tue, 04 Jan 2022 20:48:34 GMT</pubDate>
            <atom:updated>2022-01-05T07:42:59.740Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SfGh9KVd9rnlSmyqGq2hSw.png" /><figcaption>Claude Monet Painting</figcaption></figure><p>You give a photo from your camera roll and select a design. Then you get a new image that has the content of your input image and the style of the design image. We know this from the Prisma, but how does the technique work? In machine learning, we call this algorithm “<strong>Style Transfer</strong>”.</p><blockquote>Style transfer is combining the style of one image into another.</blockquote><p>Style transfer uses a pre-trained CNN (convolutional neural network) to find the <strong>content</strong> features of an image — the objects — and the <strong>style</strong> features of another image — brush, texture, colour — to mix them.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vSnDYgz9ilbN2B5SY49oOA.png" /><figcaption>I spent minutes on end absorbing wave cat | Source: Intro to Deep learning with Pytorch on Udacity</figcaption></figure><p>The best style transfer models can keep the features of an image while changing the stylistic attributes of it altogether.</p><blockquote>In this article, we will explore the technical processes behind this algorithm.</blockquote><h3>TL; DR</h3><ul><li>Content &amp; Style Representation: How does the machine understand and store aspects from images? What is the VGG 19 CNN? What is the gram matrix?</li><li>Loss Functions: What do we optimize? How do we combine the style and content image? What is style transfer?</li></ul><h3>The Style Transfer Process (to be further explained)</h3><ul><li><strong>The content image </strong>is passed through the VGG-19 network where <strong>the content representation</strong> is extracted.</li><li><strong>The style image </strong>is passed through the VGG-19 network where <strong>the style representation </strong>is extracted and stored using a gram matrix.</li><li>Then the<strong> original content image </strong>is iteratively optimized with gradient descent and the previously calculated content and style representations.</li></ul><h3>Capturing the Content and Style Representation</h3><p>The primary two tasks to address for Style Transfer are capturing the <strong>content representation</strong> of one image and the <strong>style</strong> of another to combine them.</p><p>We capture these representations, using a CNN — the VGG 19 in our case —and the gram matrix respectively</p><h4>An Overview of CNNs</h4><blockquote>In this section I review the basics of CNNs and how they work. If you know the basics feel free to skip ahead <em>🙂.</em> If you aren’t familiar with it please read <a href="https://e2eml.school/how_convolutional_neural_networks_work.html">this in-depth source</a> to learn more about convolutions, layers, and filters.</blockquote><p>A <strong>Convolutional Neural Network (ConvNet/CNN)</strong> is a Deep Learning algorithm that can take in an input image, assign importance (learnable weights and biases) to various aspects/objects in the image and be able to differentiate one from the other.</p><p>Although the architecture of a CNN can vary for its sub-types — VGG-19, Alex-Net, and others — it runs with the same working process. All CNN’s have two parts:</p><ul><li>Convolutional Layers</li><li>Max Pooling Layers</li></ul><p><strong>Convolutional layers</strong> (blue) are the container of “feature maps”. They store the detected features — or the convolved image — in the input. The deeper the layer the more the feature maps or stored features.</p><p><strong>Pooling</strong> <strong>layers </strong>(orange) are used to reduce the dimensions and simplify the convolutional layers. Hence, the number of parameters to learn will be reduced.</p><blockquote>As the input travels through the convolutional and pooling layers, a progressively more comprehensive and detailed representation of the content is generated.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*ZvQFlpK5IpCW5BALpBQRXA.png" /><figcaption>notice including convolution and pooling layers there are also fully connected layers. as style transfer does not require any prediction these fully connected layers are not included in our architecture further in the blog. | VGG-19 CNN 👆</figcaption></figure><p>In our style transfer model, we use the VGG-19 CNN framework. This CNN has 19 weighted layers including 3 dense layers which we remove.</p><blockquote>Using a VGG-19 model is crucial in our style transfer program to understand the style and content images thoroughly.</blockquote><h4>Content Representation</h4><p>As you know, the later layers of the VGG-19 CNN capture the content of the image better — hence called the content representation. The content representation identifies lines and intensities to outline the objects of an image</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ca9CzOXgezpdHhI_9nwWAw.png" /><figcaption>content representation being created | notice the three input channels stand for the colour channels (R, G, B)</figcaption></figure><p>Notice that the content representation discards all irrelevant details including the<strong> style</strong> to preserve the primary objects in an image.</p><p>In our VGG-19 CNN, we extract the content representation in the <strong>second convolution of the fourth convolutional stack</strong> — as used by Gatys L in his paper. This ensures a comprehensive but less condensed representation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/689/1*ZvQFlpK5IpCW5BALpBQRXA.png" /><figcaption>the purple rectangle represents the content representation of the image as said in the ‘Neural Style Transfer’ paper</figcaption></figure><h4>Gram Matrix</h4><p>As we know, to get the content representation, we pass the content image through a CNN — the VGG19 in this case — in which the later layers have better content representations.</p><p><strong>Extracting style is unexpectedly simpler.</strong></p><p>The ‘style’ of an image is the overarching theme of the colours, textures, and emotion used. Or, in a more theoretical view, how does the texture in the cypress tree of ‘Starry Night’ relate with the texture of the moon? If so what are the similarities and differences?</p><blockquote>Style is how each aspect of a painting relates with each other</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UURZ9unZudgovZB9.jpg" /><figcaption>how does the texture in the cypress tree of starry night relate with the texture of the moon?</figcaption></figure><p>To find the style, we begin by inputting the style image through the VGG-19 CNN to observe the correlations between feature maps in convolutional layers. <strong>In other words, we are looking at the similarity between features in an image.</strong> These similarities are the<strong> style</strong> of the image.</p><blockquote>We can store these similarities as a <strong>Style Representation</strong> with a <strong>Gram Matrix</strong>.</blockquote><p>The Gram matrix is calculated by taking the dot product of the unrolled intermediate representation of a convolutional layer and its transpose. In simpler — programmers’ — words, we dot a list of flattened feature maps in a convolutional layer with its transpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*EoRizTzMDs2IOWrwNFsYOQ.png" /><figcaption>and thus the Gram Matrix storing the style features in one convolutional layer is made</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/425/0*YQZWWPmveBqzXmyk.png" /><figcaption>a flattened feature map, the random numbers represent pixel values</figcaption></figure><p>As recommended in Leon Gatys’ paper, we calculate the gram matrix of every first convolutional layer in all convolutional stacks in the VGG-19 network. <strong>The style representation of an image is the list of gram matrices in the VGG-19 network</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/598/1*2mV7Fk3u9PI121fPxWnIyA.png" /><figcaption>calculating the gram matrix at every first layer of each stack</figcaption></figure><p>— and thus we know how to calculate the content and style representations of an image!</p><h3>Loss Functions</h3><p>After obtaining content and style representations, our next step is to create the target image — the combination of calculated representations. We achieve this using loss functions and <a href="https://medium.com/geekculture/gradient-descent-simplified-631a7ce38cb6">gradient descent</a>.</p><blockquote>Loss functions inform the accuracy of a model. The lower the loss the higher the accuracy.</blockquote><p>The loss functions used are Style Loss and Content Loss. Simply they find the error between the target image and style and content images respectively. The target image is first initialized as the original content image and is iteratively optimized to a mixed image that has the least style and content loss.</p><h4>Content Loss</h4><p>As we form our target image, we compare the content representations of the target and content image. A better style transfer model makes these two representations as close as possible even as our target image changes its style.</p><p>We define a content loss to find the difference between representations. Or a loss that calculates the contrast between the content and target image content representations. Here, we use the mean squared difference (MSE) as the loss function.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*XQmX2HTfNN3NULQ2PECc7g.png" /><figcaption>T_C is target image content representation and C_C is content image content representation</figcaption></figure><p>To progressively generate a better target image, we aim to minimize this loss. Although this process is similar to how loss is used in optimization to determine the weights of a CNN, here our aim is not to minimize classification error.</p><p>Our goal is to change only the target image, updating its appearance until its content representation matches that of the content image. We are not using the VGG 19 network in its traditional sense, but only for feature extraction — <a href="http://google.com/">gradient descent</a> is used to lower the loss between our target and content images.</p><blockquote>We are not using the VGG-19 for classification but only for feature extraction</blockquote><h4>Style Loss</h4><p>In the same way, we calculate the difference between the target image and the style image with a style loss. This function like the content loss attempts to make the content and target image <strong>style representations</strong> as close as possible.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/283/1*dmNm2117qsGWmV15zV89eA.png" /><figcaption>T_s is the target image style representation, while S_s is the style image style representation, a is the number of values in each layer</figcaption></figure><p>We find the mean squared distance between the style and target image style representations. Recall both style representations contain five gram matrices that are computed at each first layer of each convolutional stack in the VGG-19 network.</p><p>In the above equation, we call <strong><em>Ss</em></strong> and <strong><em>Ts</em></strong>, and <strong><em>A</em></strong> is a constant that accounts for the number of values in each layer. We’ll multiply these five calculated distances by some style weights <strong><em>w</em></strong> that we specify, to finally sum.</p><blockquote>The style weights are values that vary the effect of the style representation on the target image. The more the weight the higher the effect.</blockquote><p><strong>We only change the target image’s style representations as we minimize this loss over several iterations.</strong></p><h4>Optimization and Next Steps</h4><p>Now that we comprehend the ideas of <strong>representation</strong> and <strong>loss</strong>, the next step is to decrease the total loss.</p><blockquote>Total loss is simply the addition of style loss and content loss.</blockquote><p>We decrease total loss using typical gradient descent and backpropagation by iteratively changing the target image to match our desired content and style.</p><p>Read <a href="https://medium.com/geekculture/gradient-descent-simplified-631a7ce38cb6">this </a>article to learn more about gradient descent and optimization algorithms work and<a href="https://www.tensorflow.org/tutorials/generative/style_transfer"> this one</a> to learn how to code your own using TensorFlow.</p><p>Hope you have a blast coding your own Style Transfer algorithm! Hope you learned something new and are excited to code this model on your own. Cheers 🍻!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kdWvERHfdwdQf9BJGIXDpA.png" /><figcaption>Some Inspiration 🙌 | Made by <a href="https://thushv89.medium.com/">Thushan Ganegedara</a></figcaption></figure><h3>Before you go…</h3><blockquote><em>Through this article, you have learned the fundamentals of how style transfer works! 🎉🎊 We explored the feature extraction, loss functions, and how style transfer optimization works! Good luck on your machine learning journey!</em></blockquote><blockquote><em>Machine learning has always been a hotspot for me. It is used </em><strong><em>everywhere</em></strong><em> whether in snapchat filters or spam classifiers. Today, it’s more of a lifestyle than a buzzword.</em></blockquote><blockquote><em>That is why I got into the field of data-science. Since the beginning, I have been addicted and I hope I will always be.</em></blockquote><blockquote><em>if you enjoyed reading through this article feel free to connect with my socials 🤗<br></em><a href="https://www.linkedin.com/in/arjun-mahes-a46200220/"><em>LinkedIn</em></a><em> | </em><a href="https://arjunmahes.substack.com/"><em>Newsletter</em></a><em> | </em><a href="https://twitter.com/mahes_arjun"><em>Twitter</em></a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=515fe09f1c0c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/neural-image-style-transfer-515fe09f1c0c">Neural Image Style Transfer</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Gradient Descent Simplified]]></title>
            <link>https://medium.com/geekculture/gradient-descent-simplified-631a7ce38cb6?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/631a7ce38cb6</guid>
            <category><![CDATA[gradient-descent]]></category>
            <category><![CDATA[learning-to-code]]></category>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Mon, 27 Dec 2021 00:49:32 GMT</pubDate>
            <atom:updated>2021-12-28T08:17:40.743Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Ba0xWKGMpJ8fireJ" /><figcaption>Photo by <a href="https://unsplash.com/@vorosbenisop?utm_source=medium&amp;utm_medium=referral">Benjamin Voros</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a> | Descending the mountains 🌄</figcaption></figure><blockquote>This is a technical article. I suggest you know some linear algebra, with some knowledge of derivatives <em>🙂</em>. However, its quite simple with many visuals, so approach with any level of knowledge!</blockquote><p>Ultimately, the heart of artificial intelligence techniques is the paradigm of gradient descent. It is precisely the <strong>‘learning’</strong> itself behind machine learning that iteratively improves the accuracy of the model.</p><p>As it turns out, gradient descent is not the only way to train an ML model. It is a part of an overheading group of various optimization functions including Momentum, Nesterov accelerated gradient, Adagrad, and Adadelta. However, the core principles behind these optimization functions are the same.</p><blockquote>Through this article, you will learn about these underlying principles and how exactly they decrease the cost.</blockquote><h4>TL; DR</h4><ul><li>Feed Forward Simplified: How does the feed-forward function work and is there a connection between the parameters (weights + biases) and the cost?</li><li>Gradient Descent Simplified: How can we use this connection between the parameters and the cost to update the parameters themselves? What is the gradient and how do we calculate it? How can we arrive at the global minima?</li></ul><h3>Feed Forward Simplified</h3><h4>Weights &amp; Biases</h4><p>Any machine learning model requires parameters — or weights &amp; biases— to optimize. For example, in a simple linear regression equation, the weights to optimize would be <strong>‘m’</strong> and <strong>‘b’</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*XFZQXSJC8AahKryI.png" /><figcaption>line equation: <strong>y=mx+b</strong></figcaption></figure><p>If we were to manually increase or decrease these parameters we could change or optimize the position of the line to better predict future values. In a more complicated scenario where weights and biases are used for image recognition, increasing or decreasing them to optimize accuracy will detect patterns quicker.</p><blockquote>The goal of gradient descent is to automatically optimize weights for the better accuracy of predictions.</blockquote><p>Let’s package these weights into a column vector (theta) for simpler calculations in the future:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/117/1*aP9NkMxy4hFGe1kulMXteA.png" /><figcaption>Fig 1. column vector of weights. the number of thetas will depend on the machine learning algorithm and the number of input features.</figcaption></figure><h4>Feed Forward</h4><p>The feedforward function is the machine learning component that produces blind predictions. Let’s call this function a perceptron for short.</p><p>The perceptron is simply the weighted sum of the input features plus an optional bias. As the weights in our column vector are iteratively optimized through gradient descent, the output of the function produces more accurate values from a blind start. The perceptron algorithm is represented by the following equation:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/161/1*TudbH_uNjm9jJT4PXe7Omw.png" /><figcaption>Fig 2. feedforward equation. the sigma 👆 is to represent all activation functions not only the sigmoid</figcaption></figure><p>Here alpha is the output prediction, and the sigmoid is any activation function. The general goal for <a href="https://towardsdatascience.com/7-popular-activation-functions-you-should-know-in-deep-learning-and-how-to-use-them-with-keras-and-27b4d838dfe6">activation functions</a> is to primarily simplify input features and introduce non-linearity into the perceptron.</p><blockquote>It is the usage of different activation functions that define the singularity of a machine learning algorithm.</blockquote><p>With the feed-forward function, the perceptron computes the dot product between the input features and weights (plus bias) from which we get a non-linear value as output.</p><p>Let’s take the example of a labelled classification problem: ‘predicting heart disease in people. We would first initialize a weight vector (random or transferred from another model) for each of our input features: ‘blood pressure’, ‘sex’, ‘age’, and ‘BMI’. Then, we will take the dot product and add our bias. In the end, we’ll calculate our activation which is our prediction.</p><blockquote>But, how do we determine the means to which we need to optimize our weights?</blockquote><blockquote>As a refresher, we define a cost function as the ‘difference’ between the output of the feedforward function and the labels — assuming the problem is a supervised learning problem. The higher closer the cost is to zero the better the accuracy.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/75/1*eSosI2mcqvc9EowICAwkrw.png" /><figcaption>The cost function takes the prediction from the feedforward function and the labels. The 2 main cost functions are: cross-entropy (classification problems) and mean squared error (regression problems).</figcaption></figure><p>The answer is to determine the accuracy of our prediction. If we assume to have a model that has been already trained with gradient descent, the weights will be better tuned and will have higher accuracy, compared with a model that has randomly initialized weights.</p><p>Therefore, our goal is to compute the relationships between the weights and the cost to know how to optimize our parameters in the future — this concept will get clearer through the article.</p><h3>Gradient Descent Simplified</h3><h4>Gradient Descent Equation</h4><p>As we know, to decrease the cost, we optimize weights, and to optimize weights, we compute the relationships between the weights and the cost. In this plot you see this relationship graphed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/0*mwjT5aOpRa0JdwwT.png" /><figcaption>‘x’ and ‘y’ are two thetas from our weight vector and ‘z’ is the cost of the prediction. note that only two thetas with their cost are graphed. if the weight vector was graphed, this would be a hyperdimensional space.</figcaption></figure><p>We aim to calculate the global minima of this function or the weight combination where the cost is the lowest.</p><p>This leads us to the concept of steepest descent, where we iteratively descend the function through the steepest path.</p><p>We do this by first calculating the partials between the cost function and each theta or in machine learning terms the ‘directional derivative’. As a result, we create a vector of partial derivatives or the ‘steepness at each point’ — this vector is what we call the gradient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/64/1*fKns8zMwhYov_GAZyKnAhQ.png" /><figcaption>a column vector of partial derivatives for each theta value</figcaption></figure><p>For simplicity the above vector of partial derivatives can be rewritten to this expression:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/70/1*31qPMyK1vv8YUSNc9WPuKg.png" /><figcaption>we take the gradient of the theta cost relationships</figcaption></figure><p>The next step to achieve the optimum weight value is to update the values of the weights themselves! To do this, we subtract the negative gradient vector —going in the opposite direction of the gradient — from the theta vector to produce a better optimized new theta vector<em>. This ensures the descent of the gradient.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/152/1*yXOgW309hu_72khVfchLiw.png" /><figcaption>updating and optimizing weights | one optimization step</figcaption></figure><p>Notice that<em> </em>to get to the minima of the relationship there will be numerous optimization steps. This is because each descending step is taken relative to the partial derivative — the steeper the derivative the larger the step. This is the reason we call gradient descent an iterative process! The more the steps the better the cost — assuming issues such as <a href="https://en.wikipedia.org/wiki/Overfitting">overfitting</a> is not present.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NpPILE0EwZPzCGUZ.gif" /><figcaption>theta is being optimized in each learning step!</figcaption></figure><p>And thus, we have learned the science behind how machines learn by optimizing parameters! However, there are a few places where this logic can go wrong.</p><h4>The Learning Rate Problem</h4><p>What if the gradient had values close to zero? Or more visually, the relationship between the cost and one weight from the theta vector has presumably flat slopes. While optimizing, each step distance will be tiny and as a result, the weights will take time to optimize.</p><p>If we multiply a constant (η) with our gradient, we could tune — increase or decrease the size of the derivative — the rate of learning and the magnitude of each step.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/169/1*2jnHf-_xC8fRRb_cPDhKyA.png" /></figure><blockquote>With the learning rate we set the magnitude of each learning step for better efficiency and accuracy.</blockquote><p>Choosing the optimal size of the learning rate is key. A learning rate that is too large causes the model to converge too quickly causing the model to miss the minima, whereas a learning rate that is too small can cause the process to get too slow.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ps4nAot7XQm8ixybzCA_Bw.png" /></figure><blockquote>It is a general rule of thumb to decrease the learning rate of the model is not working.</blockquote><h4>Momentum and Random Random Restart</h4><p>However, how can we be sure our model is at the global minima, but not the local minima? The gradient descent algorithm chooses the steepest path of descent. Hence, the optimizers could end in local minima, not global minima as shown below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*qRT5NwfH1yfRvoMx.gif" /><figcaption>optimizer ends in local minima</figcaption></figure><p>This problem extends to the fact that landing in the global minima is completely influenced by luck and the random initialization of the theta vector.</p><p>One method to achieve the global minima is to create multiple weight optimizers simultaneously in random positions. Although some may not end in the global minima there is a higher chance of them to. This method is called random restart and it is widely used across machine learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*_t5qVh2_osWAwMgJ.gif" /><figcaption>random restart</figcaption></figure><p>Another way to achieve global minima is descending in the way of momentum. Much like the physics definition momentum takes into account the change in theta of the previous step to accelerate over local minima.</p><p>To incorporate momentum into the gradient descent function, we use the constant <strong>β </strong>a number between 0 and 1 representing the degree of influence of momentum on the optimizer.</p><blockquote>A higher value of <strong>β</strong> signifies less momentum decay, while a lower value signifies higher momentum decay.</blockquote><p>To apply the concept of momentum to our gradient descent algorithm, in addition to the regular gradient, we add on the movement from the previous step. Here is the updated gradient descent algorithm with momentum:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*JfbymBQJGJ5e6AD3Gpkn3w.png" /></figure><p>Although this method is more complicated, its usage has seen incredible results in the machine learning field.</p><h4>Programming the Gradient Descent Theory!</h4><p><strong>Stochastic gradient descent</strong> — a type of gradient descent — can be optimized with the following code:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YvsQ8V08XidY1gaBDmTytA.png" /></figure><p>sgd() takes 4 positional arguments:</p><ul><li>theta_vector : is the input vector of randomly initialized weights. Through this function, these weights will be iteratively optimized.</li><li>learning_rate : is the rate at which the training will run. In more technical terms this is the magnitude of the training step.</li><li>n_iter : is the number of training steps or the number of iterations thetheta_vectorwill be optimized.</li><li>gradient_momentum : the gradient momentum vector is the gradient of the theta-cost relationship plus the previous learning step’s gradient vector (if there is). The calculations to arrive at the gradient are not shown as it depends on what algorithm (ex. logistic regression, regression, etc.) is being used.</li></ul><h3>Before you go…</h3><blockquote>Through this article, you have learned the fundamentals of how gradient descent works! 🎉🎊 We explored the feedforward function, how weights are optimized, and the main obstacles preventing success! Good luck on your machine learning journey!</blockquote><blockquote>Machine learning has always been a hotspot for me. It is used <strong>everywhere</strong> whether in snapchat filters or spam classifiers. Today, it’s more of a lifestyle than a buzzword.</blockquote><blockquote>That is why I got into the field of data-science. Since the beginning, I have been addicted and I hope I will always be.</blockquote><blockquote>if you enjoyed reading through this article feel free to connect with my socials <em>🤗<br></em><a href="https://www.linkedin.com/in/arjun-mahes-a46200220/">LinkedIn</a> | <a href="https://arjunmahes.substack.com/">Newsletter</a> | <a href="https://twitter.com/mahes_arjun">Twitter</a></blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=631a7ce38cb6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/geekculture/gradient-descent-simplified-631a7ce38cb6">Gradient Descent Simplified</a> was originally published in <a href="https://medium.com/geekculture">Geek Culture</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Basic Preprocessing Technique (with the Iris Dataset)]]></title>
            <link>https://medium.com/@arjun.mahes/creating-your-first-ml-model-part-one-preprocessing-the-iris-dataset-70c47caa2087?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/70c47caa2087</guid>
            <category><![CDATA[self-improvement]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Mon, 15 Nov 2021 23:38:18 GMT</pubDate>
            <atom:updated>2022-06-04T15:48:02.480Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*FpMSKPQUFIp3sIba" /><figcaption>Photo by <a href="https://unsplash.com/@jstrippa?utm_source=medium&amp;utm_medium=referral">James Harrison</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>It has been <strong>time </strong>for you to open <a href="https://colab.research.google.com/">Google Colaboratory</a> and finally get into machine-learning code. You have always wanted to learn the magic behind image recognition, self-driving cars, and chatbots but have never found time.</p><p><em>Why is that?</em></p><p>Is programming too difficult to get your hands over? Or is it the mere complexity of advanced mathematics that scares you?</p><p>I am here to tell you these thoughts are <strong>misconceptions</strong>. In reality, machine-learning is an extremely rewarding, easy, and thrilling science.</p><p>In this article, I will be walking through the ML process 🔬 and some code snippets 👨‍💻 along the way with the classic supervised learning Iris dataset! Now that you are prepped for this journey, let’s get right into building your first machine learning model!</p><h3>The Machine Learning Process</h3><p>Let’s do a quick recap. What is machine learning?</p><p>Simply, it is a process where computers find trends in datasets and complete given tasks. For example, in our project we will be finding the <em>similarities and differences</em> between three species of the iris flower to classify a new (hypothetical) iris flower into one of three species -using the scikit-learn library.</p><p><strong>The ML process is the process from prepping our data to making a prediction in the most efficient way. </strong>Although the machine learning process is seven steps we will be going through a modified simpler three step version through this article series! Step 1 (Data Preprocessing) is covered through this article.</p><blockquote>Step 1 (Data Preprocessing)</blockquote><blockquote>Step 2 (Data-Analysis)</blockquote><blockquote>Step 3 (Choosing the Algorithm &amp; Upgrade)</blockquote><blockquote><strong>Enough Prep. Let’s do this. </strong>😅</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*SxSI0iC7iac645M0.gif" /></figure><h4>Step One: Data Pre-Processing</h4><p>The most important step in all of machine-learning is prepping the dataset. It is a crucial aspect of ML to prevent the skewing of a model’s accuracy.</p><p>What does this mean? <strong><em>Four things</em>:</strong></p><ol><li>Fixing missing data-cells in the dataset</li><li>Encoding <em>Categorical </em>Data (ONLY if data is about choosing between categories — <a href="https://www.youtube.com/watch?v=kE5QZ8G_78c">supervised learning</a>)</li><li>Splitting the data set</li><li>Feature Scaling</li></ol><p><strong>Fixing missing data: </strong>Most datasets have missing values/rows. In some situations these datasets can reduce the total accuracy of a model. As developing ML scientists, we aim for more precise models that predict better results. Although the Iris dataset doesn’t face this problem, we should know the intuition behind this sub-step. Here is what you need to know:</p><ul><li>Fixing techniques all surround the idea of removing the no valued cell altogether or substituting values to the no valued cell based on an algorithm such as the mean or the KNN algorithms.</li><li>Check this <a href="https://www.mastersindatascience.org/learning/how-to-deal-with-missing-data/">article</a> to learn more about numerous techniques and this <a href="http://google.com/">article</a> on their implementations.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/737/0*ukIBtqK64oVMMcyo.png" /><figcaption>a missing valued dataset — <a href="https://analyticsindiamag.com/5-ways-handle-missing-values-machine-learning-datasets/">Source</a></figcaption></figure><p><strong>Encoding Categorical Data: </strong>Machine learning models require all data to be in numerical form. This means that if a dataset contains <a href="https://www.formpl.us/blog/categorical-data">categorical</a> data, we <em>must encode it to numbers before running the model</em>.</p><p>There are numerous algorithms to choose from when encoding our variables. As you guessed, we would use the patterns in the dataset to identify what encoder to use. The most used encoders and their use-cases are as followed:</p><ul><li><em>One Hot Encoder:</em> This encoder is used when the dataset has no particular order. It maps each value/cell to a ‘0’ or a ‘1’ through its algorithm.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WV26700V1f-xk5Du.png" /><figcaption>the animals above are assigned a value relative to their index (‘0’ or ‘1’).</figcaption></figure><ul><li>Label/Ordinal Encoding: Generally, label/ordinal encoding is used to retain an order of the dataset (although in some cases we can use it as a useful tool as you will see below). Each cell is mapped with an increasing/decreasing integer.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/858/1*zZqZhgj0G6THSJivwkyNUA.png" /><figcaption>the algorithm orders each academic milestone as a number</figcaption></figure><ul><li>And much more! It is up to you future ML scientists to research more encoders for your models as you will need more in you career. Use <a href="https://towardsdatascience.com/smarter-ways-to-encode-categorical-data-for-machine-learning-part-1-of-3-6dca2f71b159">this</a> article as a starting point 😄!</li></ul><p>In terms of the Iris dataset, we can encode our categorical variables with the Label Encoding method using the LabelEncoder class in the scikit-learn library as follows:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*1OcrtEXGrDUFsf4d.gif" /><figcaption>watch video with <a href="http://data_preprocessing_iris.ipynb - Colaboratory - Watch Video">this</a> link</figcaption></figure><p><strong>Testing/Training Set Split: </strong>The next step to data preprocessing is splitting our dataset into the training and test set. It is as simple as it sounds! The objective here is to use part of the dataset to validate and tune the model after learning and finding trends with the training set. In more complicated scenarios each cycle training and validating increases accuracy rapidly.</p><p>Use this loom video to understand this concept and learn the code to split your dataset!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*7YMhzst0AYTqXkF2.gif" /><figcaption>watch video with <a href="https://www.loom.com/share/be73688b7b314d4ba5f08426c657e6f7">this </a>link</figcaption></figure><p><strong>Feature Scaling: </strong>Feature scaling is all about scaling our data to aid in the data analysis process after data-preprocessing. A lot of <a href="https://machinelearningmastery.com/classification-versus-regression-in-machine-learning/">regression</a> datasets when plotted with seaborn or matplotlib are too large resulting in plotted points to be out of graphs and a tampered gradient descent in neural networks. Although the Iris dataset doesn’t face this issue as it is a <a href="https://machinelearningmastery.com/classification-versus-regression-in-machine-learning/">classification</a> problem, we should know the intuition behind this sub-step. Here is what you need to know:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*pjFJGVA7wr-DemmCsTxMVA.png" /><figcaption>an example of feature scaling in action in a 2D plot</figcaption></figure><p>The two main ways to feature scale a dataset are:</p><ul><li>Normalization: <em>when the plot is scaled to a number between 0 and 1</em>.</li><li>Standardization: <em>when the plot is scaled to a number between -3 and +3 with the average of all points being the average</em>.</li></ul><p>Now the big question is when do you use Standardization and when do you use Normalization?</p><ul><li>Normalization is good to use when you know that the distribution of your data does not follow a <a href="https://en.wikipedia.org/wiki/Normal_distribution">Gaussian distribution</a>. This can be useful in algorithms that do not assume any distribution of the data like K-Nearest Neighbors and Neural Networks.</li><li>Standardization, on the other hand, can be helpful in cases where the data follows a <a href="https://en.wikipedia.org/wiki/Normal_distribution">Gaussian distribution</a> or in most algorithms. Standardization is generally used more than normalization as it is more flexible.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/1*C-61GnjH71AWBMpU6sZjeg.png" /></figure><h3>Before you go…</h3><p>Thanks so much for being curious and reading through this article (Steps 2 and 3 will be coming soon 😉). I really appreciate it. Make sure you comment and leave some claps too if you liked it too!</p><p>My name is Arjun Mahes, a python-developer obsessed with learning and building things. I am now especially interested in machine-learning and bio-tech 😅. Feel free to connect with me. 👇</p><p><a href="https://www.linkedin.com/in/arjun-mahes-a46200220/">LinkedIn</a> | <a href="https://arjunmahes.substack.com/">Newsletter</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70c47caa2087" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ever wished to be a Superhero? You Could -With the 7 Habits of Highly Effective People.]]></title>
            <link>https://studentsxstudents.com/ever-wished-to-be-a-super-hero-you-could-with-the-7-habits-of-effective-people-8faad3842b19?source=rss-9aa34fe9a4a7------2</link>
            <guid isPermaLink="false">https://medium.com/p/8faad3842b19</guid>
            <category><![CDATA[books]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[growth]]></category>
            <category><![CDATA[life]]></category>
            <category><![CDATA[life-lessons]]></category>
            <dc:creator><![CDATA[Arjun Mahes]]></dc:creator>
            <pubDate>Thu, 09 Sep 2021 21:51:50 GMT</pubDate>
            <atom:updated>2021-09-27T17:56:15.892Z</atom:updated>
            <content:encoded><![CDATA[<p>You have to admit you wanted to have powers when you were little. I’d say I definitely did.</p><p>Thanks, Marvel, for all those wonderful dreams!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/498/1*LS3zXUptIQFvkQqpDQF_ug.gif" /><figcaption>Well… you have to admit you wanted to be Tony Stark when you were little.</figcaption></figure><p>Unfortunately, being a superhero with powers won’t happen in the next century or so :( . BUT what can happen is to become highly effective in your daily life, conversations and persona. The real deal…</p><p>So, if you want to change your life and become your best ever version read along!</p><h3>Habits?</h3><p>The one way to be effective in what you do is to develop good habits — because habits are the tools that allow change to happen in the first place! Although developing them is hard, living the fruit will be paradise. In Stephen Covey’s book, <em>The 7 Habits of Highly Effective People</em>, he talks about the top 7 habits to inculcate into your lives.</p><h4>Habit #1: Be proactive not reactive</h4><p>According to Stephen Covey, there are two zones we live in most: the circle of concern and the circle of influence. The circle of concern handles things that affect us but over which we have no control. Have you ever seen (or maybe experienced) constant worry about everything? That happens because people have a lot of stuff in their circle of concern.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/0*aB5lCr-JznbRlB_r" /><figcaption>Don’t worry too much</figcaption></figure><p>On the other hand, the circle of influence deals with all the problems that you have<em> </em>control over (as you probably guessed). The key is that when one is reactive their circle of concern is larger than their circle of influence (bad) and when one is proactive: their circle of influence is larger than their circle of concern (awesome!).</p><p>So, the lesson?</p><p>You shouldn’t spend your energy on things you can’t control but on things you can. It’s life changing!</p><h4>Habit #2: Begin With the end in mind</h4><blockquote>Simply put, habit two is about beginning everything you do with an ultimate goal, which through time will tune distracted thoughts and activity towards the right place. Following this habit will bring clarity to your actions and create valuable insights to reach your goal.</blockquote><p>For the next minute, I challenge you to ponder over <strong>your</strong> ultimate goal. Something that you really desire and would do anything for.</p><p>Mine, is to make wild ideas reality through technology.</p><p>After you’ve found your target, write it on a piece of paper and place it beneath your bed sheet, so that whenever you sleep or wake up the crinkle of the page will remind you of your goal. If you constantly follow this routine, your dreams will start to become reality and your quality of life will improve <strong>a</strong> <strong>lot</strong>.</p><h4>Habit #3: Put first things first</h4><p>A lot of people make goals, however, (as you guessed) most of them are broken within the first few days. Why is this happening?</p><p>According to Covey, most of us live through our lives looking through the telephoto (zoomed) lens. We live our life in a cacophony, shifting from event to event, crisis to crisis, ultimately not improving the capabilities that make us awesome. Seeing through this type of lens makes us more stressed, impulsive, busy, and less likely to achieve our goals.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/600/0*vq-hYqJ8KFG4E2gK" /><figcaption>Types of Lenses</figcaption></figure><p>But, what if we change our lens to a wide angle lens? One that encompasses our passions, purpose and vision for the future. Of course it would be less stressful than the first one. However, if we can’t make these into action, we would become dreamers, neglecting the very details that make our vision come true.</p><p>So how do we make our goals come true? We have to filter <strong>distractions</strong> out of our life and use the immense power of <strong>the week</strong>.</p><p>Why the week?</p><p>Simply because the week is the year in a nutshell. You have weekends, workdays, self-time, etc. all inside seven days. Prioritizing the week can do lots to making your life efficient. The best way to put this habit into action is by planning out your week every week for 30 min.</p><p>Your planning should include “The Big Rocks” (activities that improve capability, build relationships and relax) and the needed short term hustles (try to avoid them if you can). Be sure to reject all the things that digress you from your long-term purpose.</p><p>There is a handy tool called the Management Matrix (created by Dwight Eisenhower) to help you in your prioritization.</p><figure><img alt="Management Matrix" src="https://cdn-images-1.medium.com/max/840/0*8RvmeE6nA9AbTN1l.jpg" /><figcaption>The Management Matrix: Schedule the ‘Big Rocks’ or Q2 first!</figcaption></figure><h4>Habit #4: Think win-win</h4><p>The hard truth is 90% of our relationship problems are the direct results of misunderstandings (Dale Carnegie). It’s crazy 😲. Either you, your coworker(s), your boss or your family fail to feel others point of view and feelings.</p><p>How can we solve this problem? As you certainly guessed with the title 😉, it is by thinking win-win.</p><p>Stephen Covey defines thinking win-win as: understanding the way people view a subject and making a solution where every stakeholder wins.</p><p>Ok, that’s just a theory. How do we make this idea effective in our daily life?</p><p>We would need to develop the abundance mentality. The mindset that there is enough resources, success, prestige, reward or recognition for everyone - not just me. Having this mindset will enable cooperation and dissolve competition in your lives. Your image in the business and personal world will improve and as a result you will live a happy life. Trust me, it actually works!</p><p>Covey also talks about three other paradigms you must know when applying the Win-Win habit. All three of these are traps that you should seldom fall into when on the quest to make thinking win-win a habit.</p><ul><li>The Win-Lose:</li></ul><p><em>The Win-Lose outcome is one of the most common of the three. It circles around the person that feels “There can only be only one winner that is I.” This type of people tend to take advantage of low-esteemed individuals to get their way. In the long-term win lose people lose their reputation, respect and likeability.</em></p><ul><li>The Lose-Win:</li></ul><p><em>Never be the “Step on me again. Everyone does.” or the people pleasing type of person. These people in our context result in Lose-Win situation which is worse than Win-Lose because there is less result, esteem, expectation, courage or goal.</em></p><ul><li>The Lose-Lose:</li></ul><p><em>When two win-lose minded people come together the result will be lose-lose. These are the people that are argumentative and would take revenge on anyone. As Covey says, “Lose-Lose is the philosophy of the highly dependent person without inner direction, who is miserable and thinks everyone else should be too.”</em></p><p>You can learn more about them with this link: <a href="https://www.shortform.com/blog/habit-4-think-win-win-7-habits/">https://www.shortform.com/blog/habit-4-think-win-win-7-habits/</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1jMC4GnRrVtvb3miLHA39Q.png" /></figure><h4>Habit #5: Seek first to understand then to be understood</h4><blockquote>Most of us seek to <strong>be understood</strong> rather than <strong>to understand</strong>. In better words, we seek <strong>to reply</strong> more than <strong>to listen</strong>. If you inculcate habit 5 in your daily lives, your influence, reputation, and respect will rise among people.</blockquote><p>One thing I really admire from elementary teachers is their willingness to make you feel safe. They listen to your problems, empathize with them, teach you the right way and at times get you a few smarties and a Kit Kat bar (how wonderful!).</p><p>How do elementary teachers have so much influence on children?</p><p>Teachers seek first to understand others point of view before teaching or conversing. This leads to connection, respect, and influence all around them. In addition, the best teachers if you observe are the ones that have not only mastered this principle but also avoid living from their own frame of mind.</p><p>In other words, they know how to never fall into the ‘EPAI’ trap:</p><ul><li><strong>Evaluating:</strong> We evaluate if the person is right or wrong first</li><li><strong>Probing:</strong> Then, we probe questions from our frame of mind</li><li><strong>Advising:</strong> We advise from our frame of mind</li><li><strong>Interpreting:</strong> We speculate the person’s motives based on our own frame of mind</li></ul><p>The ‘EPAI’ trap is unfortunately the go to for most people when communicating. It basically says: ‘If I have experienced them it should work for you and everyone else.” When you evaluate without considering, probe unwelcome proofs for your ideas, advise from your own frame of mind, then interpret motives without hearing them out, you leave your partner cranky, angry and revengeful — things that are disastrous to relationships and ideals.</p><p>So what is the final message? Seek first to understand then to be understood.</p><h4>Habit #6: Synergize</h4><p>Have you ever wondered why goose sing (or honk?) while in a ‘V’ in the sky? If you have, here’s an ovation for you!:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/480/0*VePA6QlN5qsHQkRx.gif" /><figcaption>(since nobody in my class knew it in grade 9 😎).</figcaption></figure><p>Okay, let’s start in the beginning. Geese fly in a ‘V’ because the formation increases their productivity in flight duration.</p><p>When the goose at the front of the formation falters — as the bird is facing headwind — the goose behind takes the lead. And when that goose tires the next goose in line gets the leader position (and so on). The cool thing is, the honking we hear are the bird encouraging each other to do more!</p><p>So what is synergy? Geese!</p><p>The teamwork and ideation for collective success is synergy. Or in our language, the secret to creativity, cooperation, efficiency and good relationships 😄.</p><p>Synergy is the powerful outcome of when people with a win-win paradigm and empathy mindset come together. It is the possibility for a third and better alternative, unlike either or situations (win-lose and lose-win). In other words, habit 6 makes you capable of things you never thought you ever could do!</p><p>To craft habit 6 into our mindset, we would need to understand the tool of valuing differences.</p><p><strong>Valuing Differences Between People: </strong>Valuing differences is all about valuing differences. And the key to do so is to understand the way people look at the world.</p><p>They see anything not as it is, but as they are (although they may think otherwise 😀).</p><p>Let’s think about that. If I believe I know the world as it is, would I bother with others ideas and how they feel? I won’t because I already know how the world functions! Would I gain with this mindset? Never! Because, neglecting differences is bound to result in non-cooperation and missing precious insights.</p><p>On the contrary, valuing differences encourages synergy, cooperation and productivity. All of which are things you need in today’s world.</p><h4>Habit #7: Sharpen the saw</h4><blockquote>Yeaaa 🙌 the last habit!</blockquote><p>Life is hectic. We all know that.</p><p>It stretches us, tests us and pushes us to our breaking points. And if there isn’t time to refresh, we will be stressed and lost.</p><p>Unless…</p><p>You deliberately <strong>sharpen the saw</strong>, refocus your lens (habit 3), synergize well (habits 6 &amp; 5 &amp; 4), have a higher goal (habit 2), and understand your capabilities (habit 1), you can be on top of essays, quarterly-reports, launch-deadlines, and any other work.</p><p>So, what is sharpening the saw?</p><p>In simple words, it is all about preserving and enhancing the single greatest asset. You 😁! How?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uSIl4AOW5kVzKho4.jpg" /><figcaption>By freshening the four dimensions of our lives! 😺</figcaption></figure><p>By freshening up the four dimensions of life everyday!</p><ul><li>the body</li><li>the brain</li><li>the heart</li><li>the spirit</li></ul><p><strong><em>Our body:</em></strong> The body defines our energy, focus and capacity to do things in our life. Therefore, it is critical to maintain a competent and healthy body. How do you do this? You know how to do it! Get to to the 🏋️, eat 🥗, and find time to ♻️!</p><p><strong><em>Our brain: </em></strong>A cluttered brain is the most dangerous habit to house. Not only because it reduces your clarity, but also for its bad effects on learning and thinking. If you can renew yourself in this area, you can get better marks and be more productive (no kidding). Check out Jim Kwik’s <a href="https://kwiklearning.com/kwik-tips/">community</a> which will help you upgrade your brain lives with the best methods.</p><p><strong><em>Our heart: </em></strong>Heart defines the quality of our relationships. We can freshen up this area by taking time for people, repairing relationships, and making the world feel appreciated. Think of it as applying habit 4, habit 5, habit 6, with the cherry (of personalization) on top!</p><p><strong><em>Our spirit: </em></strong>Spirit is your identity. Something that is far different from your everyday self. It represents your true unbiased beliefs, values, principles, and purpose. Take time everyday to remember this identity and to be proud of it. Try meditation, spend time in nature, serve people, and be happy!</p><h3>Ending Note!</h3><p>And also, please note that this blog is just a compilation of my thoughts on the book and what I feel were the most important points. As a result some of the ideas in the book may not be included in this summary.</p><p>Hope to see you again 😁❤️✌!</p><blockquote><em>Feel like you’re about to jump into a rabbit-hole of reading these incredible articles?<br>Don’t worry, we feel the same way.<br>Not only can you jump into the rabbit hole with us, but we’ve got more than enough articles that’ll help you jump out ;)<br>For some of the best ideas on Medium from the youngest minds of the generation, visit </em>students x students.</blockquote><p><a href="https://studentsxstudents.com/">students x students</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8faad3842b19" width="1" height="1" alt=""><hr><p><a href="https://studentsxstudents.com/ever-wished-to-be-a-super-hero-you-could-with-the-7-habits-of-effective-people-8faad3842b19">Ever wished to be a Superhero? You Could -With the 7 Habits of Highly Effective People.</a> was originally published in <a href="https://studentsxstudents.com/">students x students</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>