<?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 Ayush Chauhan on Medium]]></title>
        <description><![CDATA[Stories by Ayush Chauhan on Medium]]></description>
        <link>https://medium.com/@ayush96cse?source=rss-2dd6bed61538------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*Dgz-xVO40L-_4bbe0zEZPA.jpeg</url>
            <title>Stories by Ayush Chauhan on Medium</title>
            <link>https://medium.com/@ayush96cse?source=rss-2dd6bed61538------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 10 Jul 2026 02:22:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ayush96cse/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[COVID-19 data analytics and reporting with Azure Databricks and Power BI]]></title>
            <link>https://ayush96cse.medium.com/covid-19-data-analytics-and-reporting-with-azure-databricks-and-power-bi-78ee69358307?source=rss-2dd6bed61538------2</link>
            <guid isPermaLink="false">https://medium.com/p/78ee69358307</guid>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[power-bi]]></category>
            <category><![CDATA[azure]]></category>
            <category><![CDATA[covid19]]></category>
            <category><![CDATA[databricks]]></category>
            <dc:creator><![CDATA[Ayush Chauhan]]></dc:creator>
            <pubDate>Sun, 17 Jan 2021 13:14:16 GMT</pubDate>
            <atom:updated>2021-01-17T13:14:16.455Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/871/1*k-P604fSumbpcifu0nn2UA.png" /></figure><p><strong>Introduction</strong></p><p>In the midst of all of the bad news in the COVID era, there are good news reports of the important work done by data engineers and data scientists to get the data of all COVID cases around the world together and provide useful insights that will be useful for pan professionals.</p><p>The objective of this article is to focus on a use case that demonstrates the integration between daily changing Source, Azure Databricks, and Power BI to deliver insights and data visualizations using a publicly available COVID-19 dataset. While Azure Databricks provides the distributed computing power to process and transform complex datasets, Power BI is a fitting recipient of the transformed dataset that surfaces these insights to business users.</p><p><strong>Source</strong></p><p>The latest available public data on the geographic distribution of COVID-19 cases worldwide from the <a href="https://azure.microsoft.com/en-gb/services/open-datasets/catalog/ecdc-covid-19-cases/#AzureDatabricks">European Center for Disease Prevention and Control (ECDC)</a>. Each row/entry contains the number of new cases reported per day and per country or region.</p><p>Before we start with our exercise, we will need to have the following prerequisites:</p><ol><li>You need to have an active <strong>Azure Subscription.</strong></li><li><strong>Azure Databricks </strong>— You need to set up both Databricks service and cluster in Azure, you can go over the steps in this article. As shown in this article, we have created a Databricks service.</li><li><strong>Power BI Subscription</strong></li></ol><p>Let’s go ahead and demonstrate the data load into Databricks using Python notebooks from the source mentioned above.</p><p><strong>STEP 1: Create Azure Databricks</strong></p><p>The next step is to create a <a href="https://docs.databricks.com/workspace/index.html">Databricks Workspace</a>. You can think of the workspace like an application that you are installing within Azure, where you will access all of your Databricks assets. Follow these steps to create a workspace:</p><ul><li>On the Azure home screen, click <strong>‘Create a Resource’.</strong></li><li>In the ‘<strong>Search the Marketplace’ </strong>search bar, type <strong>‘Databricks’</strong> and you should see<strong> ‘Azure Databricks‘ </strong>pop up as an option. Click that option.</li><li>Click <strong>‘Create’</strong> to begin creating your workspace.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/757/1*2hQhKhZJM0mT_pUCmJ9jrg.png" /></figure><p>Use the same resource group you created or selected earlier. Then, enter a workspace name. Remember to always stick to naming standards when creating Azure resources, but for now, enter whatever you would like. You can keep the location as whatever comes default or switch it to a region closer to you. For the <strong>pricing tier</strong>, select <strong>‘Trial’</strong>. Finally, select <strong>‘Review and Create‘</strong>. We can skip-networking and tags for now which are for more advanced set-ups.</p><ul><li>This should bring you to a validation page where you can click <strong>‘create’ </strong>to deploy your workspace. This will bring you to a deployment page and the creation of the workspace should only take a couple of minutes</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/974/1*AECOHgR2cVxu_yc76OgcDQ.png" /></figure><ul><li>Once the deployment is complete, click <strong>‘Go to resource‘</strong> and then click <strong>‘Launch Workspace’</strong> to get into the Databricks workspace.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*UOldR9fN4b0TPzFVTSy7ZQ.png" /></figure><ul><li>Create a Workspace (Notebook) with Python or your choice of language for performing analysis.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*YgujwXm4UnngQdJe4DG3cg.png" /></figure><p><strong>STEP 2: Start Scripting in Notebook.</strong></p><ul><li>Import relevant libraries and fetch data from the source according to its data type.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*6-qBQHV4QH5S34a6JD0NNg.png" /></figure><ul><li>Digging the data to get useful and relevant analytical data</li></ul><ol><li>Top Countries with cases and deaths.</li></ol><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*DxAGebl2lwUAyoXOBNkM-Q.png" /></figure><p>2. Calculating total cases, deaths, and death rates around the globe.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*iBAIVbbHMQOlOmO5rKXMEA.png" /></figure><p>3. Visualizing total cases and deaths with the timeline.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/879/1*4oJcc8DiPR2FjnvC-QjIoQ.png" /></figure><p>4. Calculating fatality rate with top 8 countries.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/674/1*lnaACwASRb0YgzSxDoXkaA.png" /></figure><p>5. Calculating the global change rate per day.</p><p>5.1 Global Rate Change for cases per day.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*sHNt3ryzIL0uqcbkJTONpQ.png" /></figure><p>5.2 Global Rate Change for deaths per day.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*3czw1npHltWfEmPv74qn6Q.png" /></figure><p>6. Calculating Change rate for top countries only.</p><p>6.1 Top countries Rate Change for cases.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*N-kfY1Kqw0KQv6xiNEJVYw.png" /></figure><p>6.2 Top countries Rate Change for deaths.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*73zHlNNS2R6Sm6PytbeXiw.png" /></figure><p>7. Fetching Country particular data (e.g. INDIA)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/669/1*kFJyWla32piG2koxhkcrkw.png" /></figure><p>8. Fetching Continent particular data.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*J0M_1E4jvLk-Wahk-R7aEw.png" /></figure><p>9. Storing credentials from data bricks clusters. Save SERVER HOSTNAME &amp; HTTP PATH.</p><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/704/1*rMT9_7xtqwp-gzD3Ru0bqg.jpeg" /></figure><p><strong>Step 3: Data brick Job Scheduling</strong></p><p>The very important scope of this article is to capture the daily changing data, then we have to run every other command for every day when new data will be in our source to avoid this, we will automate the whole process and schedule a job to run our notebook with an interval of a day, so it will check for a new file and apply all the commands accordingly.</p><p>Click on <strong>(calendar-like symbol)</strong>, on the top-right corner of your notebook.</p><ul><li>Click on the <strong>‘+New’</strong> button.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/313/1*PHToPGzY6hGDVpAzjtN3fQ.png" /></figure><ul><li>Schedule a job according to your need and then click <strong>’ok’.</strong></li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/838/1*40ChS6D5jJda9jOkX4BnOQ.png" /></figure><p><strong>Step 4: Connecting Power Bi to your Databricks.</strong></p><ul><li>Click on’<strong> Get Data’ a</strong>nd search for<strong> ‘Azure databricks’ </strong>to add databricks credentials that we get from previous steps.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*5YPfELRIH1Ao7CHvTcjE8g.png" /></figure><ul><li>Click on ‘DATA’ to get a view and validation for the tables in Power BI.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*ti0FDbwTBzJY_lkU72JWkw.png" /></figure><ul><li>Start making insightful reports by applying different filters and visuals, a sample report is here to get an overview.</li></ul><figure><img alt="COVID-19 data analytics and reporting with Azure Databricks and Power BI" src="https://cdn-images-1.medium.com/max/1024/1*KAZkRjBiReyP9hDkT4sqcA.png" /></figure><p>Here you can select Individual countries or groups of them to assign them with a particular date with the help of slicers to view analytics accordingly.</p><p>This is the end of this article, we successfully automate the process of Loading, Transforming, and Writing the data process from a web source and then migrating the processed data to Power BI, it will also read new data and apply all the transformations on it with an interval that was defined by the developer.</p><p>Thank you and feel free to try out some different transformations and create some new visuals in the Power BI Report.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=78ee69358307" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Upcoming Human Factors Research]]></title>
            <link>https://ayush96cse.medium.com/upcoming-human-factors-research-4cc652db1f29?source=rss-2dd6bed61538------2</link>
            <guid isPermaLink="false">https://medium.com/p/4cc652db1f29</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[human-factors]]></category>
            <category><![CDATA[next-gen]]></category>
            <category><![CDATA[eeg]]></category>
            <dc:creator><![CDATA[Ayush Chauhan]]></dc:creator>
            <pubDate>Wed, 15 Apr 2020 06:58:47 GMT</pubDate>
            <atom:updated>2020-04-15T06:58:47.139Z</atom:updated>
            <content:encoded><![CDATA[<p>Advances in neuroscience have changed the way social and behavioural sciences are being studied. Considering the brain is the root of all behaviour and decision making, it is only logical that fields focusing on human behaviour, in one form or another, study the brain. The explosion of research conducted in harmony with neuroscience can be seen in the multitudes of emerging fields such as neuroeconomics, neurophysics, neurophilosophy, neuromarketing, and neuroergonomics.</p><p>Neuroergonomics is the study of the human brain in relation to human factors and ergonomics. Specifically, it looks to understand and improve performance through biological measures. Currently, neuroergonomics is an emerging method of research within HF and generally considered outside of standard HF research, but the idea of it being a distinct form of research will not be around forever.</p><p>Just like cognitive neuroscience was once an emerging field within cognitive psychology, cognitive psychology now is deeply reliant on neuroscience. By today’s standards, if cognitive psychology doesn’t use neuroscience techniques it seems outdated. Similarly, I believe that as technology advances HF practitioners will more often use, and rely on, neuroergonomic approaches and just like cognitive psychology, there will come a day when omitting neuroergonomics will make HF research seem dated.</p><h3>Why is neuroergonomics needed?</h3><p>By studying the brain, we are able to collect data that otherwise would have been impossible to collect. During user studies, most of the data we collect from users (specifically the human factors team at Cambridge Consultants, though this is fairly standard) falls into either observable behaviour or subjective feedback, with the occasional body measurement (height, reach, wingspan, grip strength, etc.). Observable behaviour is a great indicator of task performance, but we also strive to understand what participants are thinking as they complete a task. Subjective feedback allows us to understand what participants are thinking, however, most actions and thoughts are unconscious meaning people do not actually know what stimuli initiated a behaviour. Additionally, people are astoundingly bad at describing their thought processes objectively (For more on how cognitive biases affect self-report measures, see this article I wrote).</p><p>Neuroergonomics has immeasurable potential because it adds an additional type of data we can collect, allowing us to gain a greater understanding of the underlying biological and neurological processes driving our actions. Furthermore, it allows us to use biological indicators to measure and assess performance.</p><p>Like traditional data, we can collect and analyze this to better understand operators as they interact with a system. However, unlike traditional data, some of the data collection methods allow us to use the data in real-time, creating adaptive safety measure and the next generation of smart devices.</p><p>I will discuss two major topics being researched in neuroergonomics: mental workload, and human error. In each section, I will provide an overview of the topic, an explanation of how it is beneficial to the HF field and ways the research can practically be implemented in the (near) future.</p><h3>Mental workload</h3><p>One of the most discussed and important topics in HF research is mental workload. Ensuring operators are cognitively able to perform a task is essential for safe and efficient behaviour, regardless of whether the operator is a surgeon or a truck driver. Until recently, the mental workload has been studied using subjective tests like the NASA TLX and secondary task paradigms. However, both of these methods have flaws that limit their applicability and utility.</p><p>While the NASA TLX is fast, cheap, and can be administered anywhere, it is subjective in nature. On the other hand, multitasking studies attempt to be realistic and naturalistic, but often force participants to complete tasks within specific parameters, which can’t always model real-world usage.</p><p>Using a neuroergonomic approach, there are multitudes of different methods to track cognitive workload and multitasking. An fMRI can trace the blood flow in the brain, indicating what region is being used. <a href="http://hal.archives-ouvertes.fr/hal-00998693/document">Causse, Dehais, Péran, Sabatini, &amp; Pastor</a> used fMRI to study pilots’ decision making while landing planes. The researchers assessed whether priming pilots to land quickly due to economic concerns (e.g. fuel costs and trip delays) altered their decision making during non-optimal landing conditions. They concluded that there was a shift in the parts of the brain used once economic concerns entered the equation. The fMRI indicated a shift from the dorsolateral prefrontal cortex to the ventromedial prefrontal cortex, a shift from using the brain area involved in reasoning and logic to a region involved in emotional processing.</p><p>If this study was done using standard human factors methods, it is entirely possible that there would be no difference in observable behaviour, and the results would be the same for both conditions. In real life, maybe there is no difference in outcomes for 99.9% of the time. However, knowing that economic pressure causes the emotional processing region to be activated, it is possible a pilot under preexisting emotional stress when landing can cause compromised outcomes due to higher mental workload. This study allowed researchers to discover safety-critical information that otherwise would have stayed hidden using classic HF techniques.</p><p>Another tool to measure workload is EEG readings. Researchers found that the amount of theta activity, brain activity in the 4–7.5 Hz range, in the frontal lobe is positively correlated to a higher mental workload (<a href="http://www.researchgate.net/publication/248606124_Smith_ME_Neurophysiological_measures_of_cognitive_workload_during_human-computer_interaction_Theor_Issues_Ergonomics_Sci_41-2_113-131">Gevins &amp; Smith 2003</a>). Since EEG machines are portable and minimally intrusive, this can be an integral method to accurately judge workload in naturalistic settings.</p><p>Furthermore, there has also been a wealth of research indicating that mental workload can accurately be assessed using heart rate variability. <a href="http://link.springer.com/chapter/10.1007%2F978-3-642-21852-1_28">Schnell, Postnikov, and Hamel</a>(2011) tested the mental workload of pilots using a low fidelity fighter-jet simulator and pilots flying a real fighter jet. Using EEG and heart rate monitors, they recorded the data and compared it to the estimated cognitive demands each task required. They found that the pilot’s heart rate was an efficient, reliable, and simple method to determine mental workload. This is another example of a cheap and non-intrusive method that can bolster the current methods of assessing mental workload.</p><p>Due to the structure of the FDA guidance on human factors, we often focus on ensuring devices are safe by minimizing risk, as well as intuitive and enjoyable to use. Those are all important, but we rarely, if ever consider is what is going on behind the scenes (i.e. the biological basis of behaviour) For example, how can we really understand what surgeons are experiencing during a robotics surgery without a neuroergonomic approach to mental workload? Is the device presenting an appropriate level of information that surgeons can effectively concentrate for a 2 hour, 6 hours, or 10-hour surgery? Is the device presenting so much unnecessary information that the surgeon is less cognizant of the necessary information? Does the common practice of playing music during surgery increase the mental workload of the surgeon, requiring adapting the UI for the actual use environment?</p><p>These are all important questions to consider when designing and evaluating all types of systems, not just surgical robotics, where operator performance is crucial to outcomes and would otherwise be hidden without neuroergonomic methods.</p><h3>Human Error</h3><p>The next topic looks at creating systems that are less sensitive to human error, and, if an error occurs, are able to minimize the potential effects retroactively. Historically, human error has had catastrophic effects as seen in cases like the Bhopal disaster, the <a href="http://www.nrc.gov/reading-rm/doc-collections/fact-sheets/3mile-isle.html">Three Mile Island accident</a>, and the 1971 Iraq poison grain disaster. Even more recently, events like the <a href="http://en.wikipedia.org/wiki/Costa_Concordia_disaster">Costa Concordia grounding</a> and the <a href="http://www.timeslive.co.za/local/2016/06/24/Human-error-likely-cause-of-Durban-train-collision-Peters">Durban train collision</a> remind us how dangerous errors can be even with our advance systems and technological safeguards in place. Each of these catastrophic events was the result of human error and potentially could have been avoided with better system designs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/45/0*Ty2z5JV89zLdtPHU" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/0*QSuccROFvBzgAdg4.jpg" /></figure><p>Costa Concordia grounding</p><p>Unfortunately, human error isn’t just the cause of rare calamitous events, but something that plagues us daily. Doctors and nurses, some of the few people we entrust our lives to, are notoriously bad at mitigating human error. An <a href="http://journals.lww.com/journalpatientsafety/Fulltext/2013/09000/A_New,_Evidence_based_Estimate_of_Patient_Harms.2.aspx">estimated</a> <strong>400,000 hospital patients die prematurely each year due to preventable harms</strong>. Equally concerning, an estimated <strong>4–8 million patients per year experience serious harm as a result of preventable error</strong>.</p><p>Every task has room for error to occur, which is why this is such an integral field of study. Under some circumstances when an error is about to be performed or an error is detected, regardless of who or what made the error, the brain produces a stereotyped response called error-related negativity (ERN)(<a href="http://econtent.hogrefe.com/doi/abs/10.1027/0269-8803.19.4.281?journalCode=jop">Bates, Patel &amp; Liddle</a>, 2005). Using an EEG, ERN signals can be recorded and used to monitor for errors in order to make corrections in real-time (<a href="http://cdp.sagepub.com/content/20/3/181.full.pdf+html">Parasuraman,</a> 2011).</p><p>While we currently can’t attach an EEG to every person to monitor for errors, knowing that the brain monitors and reacts to errors has far-reaching implications. If we had a headband that had EEG capabilities and could sync with our smartphone, we would be able to monitor for errors in real-time and get a notification any time an error is detected.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/45/0*jswXyyqD-G0LlOrO" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/709/0*UyQ_X1QmJrEebo88.png" /></figure><p>EEG headband currently on the market</p><p>Not only could this improve outcomes in every field by allowing you to correct a mistake before it is too late, but by realizing your mistakes in real-time, you can learn from your mistakes and, over time, potentially decrease the rate of errors.</p><p>The applications for this technology get really interesting when you couple it with existing technologies such as Near Field Communication (NFC) and Bluetooth. Imagine you were working in the ER and accidentally hit the wrong button as you are inputting an order into a Pyxis machine. The EEG could detect the ERN was detected and send an alert to your smartphone. The smartphone, with NFC technology, could know that you were using the Pyxis machine and would instruct the machine to cancel the order so you could start again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/45/0*oz09rdBRBYj9EvqS" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/0*DqkRdSgO_pJgxJt7.png" /></figure><p>Pyxis storage cabinet</p><p>Alternatively, if a nurse accidentally set up the wrong dose or titration schedule on an infusion pump, the EEG could detect an ERN and alert the user to an error.</p><p>The applications for this type of connected devices are essentially endless. The combination of devices interacting with ERN signals could form the next generation of “smart’ products, enabling us to use our unconscious error detection mechanisms to create intelligent machines with built-in safeguards and require less user input.</p><h3>Where does this leave us?</h3><p>While right now none of these applications is practical in industry, hopefully, this shed some light on some of the potential advantages to integrating neuroergonomics into human factors. As these topics continue to be researched and technology advances, there will be a point in time that these tools move from idealistic to attainable and commonplace. When that day comes, it will be interesting to see how these new tools will alter human factors research and implementation of safety measures.</p><h3>If you enjoyed the post, please share this article or click the thumbs up icon below to let me know!</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4cc652db1f29" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Comparison of non-linear activation functions for deep neural networks on multi-classification task]]></title>
            <link>https://medium.com/analytics-vidhya/comparison-of-non-linear-activation-functions-for-deep-neural-networks-on-forest-cover-59379c084442?source=rss-2dd6bed61538------2</link>
            <guid isPermaLink="false">https://medium.com/p/59379c084442</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[activation-functions]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[modeling]]></category>
            <category><![CDATA[neural-networks]]></category>
            <dc:creator><![CDATA[Ayush Chauhan]]></dc:creator>
            <pubDate>Mon, 04 Nov 2019 08:41:00 GMT</pubDate>
            <atom:updated>2019-11-26T08:54:41.755Z</atom:updated>
            <content:encoded><![CDATA[<h3>Comparison of non-linear activation functions for deep neural networks on Forest Cover multi-classification</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*J1tOAJ1o5Go1wQK7DFW5zA.jpeg" /><figcaption>Forest Soil type prediction.</figcaption></figure><p><strong>Objective</strong></p><p>Deep neural networks have been successfully used in diverse emerging domains to solve real-world complex problems with many more deep learning (DL) architectures, being developed to date. To achieve these state-of-the-art performances, the DL architectures use activation functions (AFs), to perform diverse computations between the hidden layers and the output layers of any given DL architecture. Here, we introduce common types of non-linear activation functions that are alternative to the well known sigmoid function and then evaluate their characteristics. Moreover deeper neural networks will be analyzed because they positively influence the final performances compared to shallower networks. They also strictly depend on the weight initialization hence the effect of drawing weights from Gaussian and uniform distribution will be analyzed making particular attention on how the number of incoming and outgoing connection to a node influences the whole network.</p><p><strong>Introduction</strong></p><p>The main activation function that was widely used is the Sigmoid function, however, when the Rectifier Linear Unit (ReLU) (Nair &amp; Hinton, 2010) was introduced, it soon became a better replacement for the Sigmoid function due to its positive impact on the different machine learning tasks. After that, different variants of the ReLU activation function have been introduced and this experiment explores them and their impact on the Forest Cover Type dataset. The forest cover type (the predominant kind of tree cover) from strictly cartographic variables (as opposed to remotely sensed data). The actual forest cover type for a given 30 x 30-meter cell was determined from US Forest Service (USFS) Region 2 Resource Information System data. Independent variables were then derived from data obtained from the US Geological Survey and USFS. The data is in raw form (not scaled) and contains binary columns of data for qualitative independent variables such as wilderness areas and soil type.</p><p>This study area includes four wilderness areas located in the Roosevelt National Forest of northern Colorado. These areas represent forests with minimal human-caused disturbances, so that existing forest cover types are more a result of ecological processes rather than forest management practices.</p><p>· <strong>Introduction to the data set</strong></p><p>The study area includes four wilderness areas located in the Roosevelt National Forest of northern Colorado. Each observation is a 30m x 30m patch. You are asked to predict an integer classification for the forest cover type. The seven types are:</p><p>1 — Spruce/Fir 5 — Aspen<br> 2 — Lodgepole Pine 6 — Douglas-fir<br> 3 — Ponderosa Pine 7 — Krummholz<br> 4 — Cottonwood/Willow</p><p>The training set (15120 observations) contains both features and the Cover_Type. The test set contains only the features. You must predict the Cover_Type for every row in the test set (565892 observations).</p><p>o <strong>Data Fields</strong></p><p>· Elevation — Elevation in meters</p><p>· Aspect — Aspect in degrees azimuth</p><p>· Slope — Slope in degrees</p><p>· Horizontal_Distance_To_Hydrology — Horz Dist to nearest surface water features</p><p>· Vertical_Distance_To_Hydrology — Vert Dist to nearest surface water features</p><p>· Horizontal_Distance_To_Roadways — Horz Dist to the nearest roadway</p><p>· Hillshade_9am (0 to 255 index) — Hillshade index at 9am, summer solstice</p><p>· Hillshade_Noon (0 to 255 index) — Hillshade index at noon, summer solstice</p><p>· Hillshade_3pm (0 to 255 index) — Hillshade index at 3pm, summer solstice</p><p>· Hillshade_3pm (0 to 255 index) — Hillshade index at 3pm, summer solstice</p><p>· Hillshade_3pm (0 to 255 index) — Hillshade index at 3pm, summer solstice</p><p>· Horizontal_Distance_To_Fire_Points — Horz Dist to nearest wildfire ignition points</p><p>· Wilderness_Area (4 binary columns, 0 = absence or 1 = presence) — Wilderness area designation</p><p>· Soil_Type (40 binary columns, 0 = absence or 1 = presence) — Soil Type designation</p><p>· Cover_Type (7 types, integers 1 to 7) — Forest Cover Type designation</p><p>o <strong>The wilderness areas are:</strong></p><p>· Rawah Wilderness Area</p><p>· Neota Wilderness Area</p><p>· Comanche Peak Wilderness Area</p><p>· Cache la Poudre Wilderness Area</p><p>o <strong>The soil types are:</strong></p><p>1) Cathedral family — Rock outcrop complex, extremely stony.<br> 2) Vanet — Retake families complex, very stony.<br> 3) Haploborolis — Rock outcrop complex, rubbly.<br> 4) Ratake family — Rock outcrop complex, rubbly.<br> 5) Vanet family — Rock outcrop complex, rubbly.<br> 6) Vanet — Wetmore families — Rock outcrop complex, stony.<br> 7) Gothic family.<br> 8) Supervisor — Limber families complex.<br> 9) Troutville family, very stony.<br> 10) Bullwark — Catamount families — Rock outcrop complex, rubbly.<br> 11) Bullwark — Catamount families — Rock land complex, rubbly.<br> 12) Legault family — Rock land complex, stony.<br> 13) Catamount family — Rock land — Bullwark family complex, rubbly.<br> 14) Pachic Argiborolis — Aquolis complex.<br> 15) Unspecified in the USFS Soil and ELU Survey.<br> 16) Cryaquolis — Cryoborolis complex.<br> 17) Gateview family — Cryaquolis complex.<br> 18) Rogert family, very stony.<br> 19) Typic Cryaquolis — Borohemists complex.<br> 20) Typic Cryaquepts — Typic Cryaquolls complex.<br> 21) Typic Cryaquolls — Leighcan family, till substratum complex.<br> 22) Leighcan family, till substratum, extremely bouldery.<br> 23) Leighcan family, till substratum — Typic Cryaquolls complex.<br> 24) Leighcan family, extremely stony.<br> 25) Leigh can family, warm, extremely stony.<br> 26) Granile — Catamount families’ complex, very stony.<br> 27) Leigh can family, warm — Rock outcrop complex, extremely stony.<br> 28) Leigh can family — Rock outcrop complex, extremely stony.<br> 29) Como — Legault families’ complex, extremely stony.<br> 30) Como family — Rock land — Legault family complex, extremely stony.<br> 31) Leigh can — Catamount families’ complex, extremely stony.<br> 32) Catamount family — Rock outcrop — Leigh can family complex, extremely stony.<br> 33) Leigh can — Catamount families — Rock outcrop complex, extremely stony.<br> 34) Cryorthents — Rock land complex, extremely stony.<br> 35) Cryumbrepts — Rock outcrop — Cryaquepts complex.<br> 36) Bross family — Rock land — Cryumbrepts complex, extremely stony.<br> 37) Rock outcrop — Cryumbrepts — Cryorthents complex, extremely stony.<br> 38) Leigh can — Moran families — Cryaquolls complex, extremely stony.<br> 39) Moran family — Cryorthents — Leigh can family complex, extremely stony.<br> 40) Moran family — Cryorthents — Rock land complex, extremely stony.</p><p><strong>An exploratory study on feature selection</strong></p><p>Feature engineering is a process of transforming the given data into a form which is easier to interpret. Here, we are interested in making it more transparent for an ML &amp; DL model, but some features can be generated so that the data visualization prepared for people without a data-related background can be more digestible. However, the concept of transparency for the learning models is a complicated thing as different models often require different approaches for the different kinds of data.</p><p>· <strong>LOADING OF DATASET</strong></p><p>This dataset includes information on tree type, shadow coverage, distance to nearby landmarks (roads etcetera), soil type, and local topography. Here, are loading our data set and importing all the python packages that will be useful in exploration, visualization of our data and predicting our model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vbTKr6Q2aB8F89xi8XBsdA.png" /><figcaption>Forest Soil type prediction-loading dataset -Ayush</figcaption></figure><p>· <strong>Data Statistics</strong></p><ol><li><strong>Head: </strong>This is another python function head () which gives the overview of our dataset with 5 initial rows along with all the columns available.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Mf9oUdtJOkfa-GLr3ahFRw.png" /><figcaption>Forest Soil type prediction-<strong>Data Statistics: head()</strong>-Ayush</figcaption></figure><p><strong>2.</strong> <strong>Shape: </strong>This is a python function shape () which determines the size of the data frame, as we can see 581012 instances are having 54 attributes. This also gives an evident confirmation that our dataset is successfully loaded as it matches with the data description.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ohs5PpG6Se474VIVa8194Q.png" /><figcaption>Forest Soil type prediction-<strong>Data Statistics: shape()- Ayush</strong></figcaption></figure><p><strong>3.</strong> <strong>Data types:</strong> Exploring data types through the function info () which gives a lot of other insights about our dataset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yxJku4ZEwb94bI2IoEz8qg.png" /><figcaption>Forest Soil type prediction-<strong>Data Statistics: info() -Ayush</strong></figcaption></figure><p>· There are 581012 entries in each column</p><p>· We can see all columns has been inferred as int64.</p><p>· There are no null values, so it’s no sense to use any missing value techniques (e.g. Imputer).</p><p>· Total memory usage of our dataset is 243.8 Mb.</p><p><strong>4.</strong> <strong>Statistical description:</strong> This can be explored through describe () function which computes the summary of statistics pertaining to the Data-Frame columns. This function gives the mean, std and IQR( interquartile range) values. This function excludes the character columns (although our dataset doesn’t have any) and given summary about numeric columns.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0vx_o5po6lP-xpYS5MLCLg.png" /><figcaption>Forest Soil type prediction-<strong>Data Statistics: statistical description — Ayush</strong></figcaption></figure><p>· No attribute is missing as the count is 581012 for all attributes. Hence, all rows can be used.</p><p>· Negative value(s) present in Vertical_Distance_To_Hydrology. Hence, some tests such as chi-sq can’t be used.</p><p>· Wilderness_Area and Soil_type are one-hot encoded. Hence, they could be converted back for some analysis</p><p>· All attributes have some distinct values and no constant attributes, so there is no sense in removing any columns.</p><p>· Scales are not the same for all, hence, rescaling and standardization may be necessary for some algorithm.</p><p><strong>5.</strong> <strong>Skew:</strong> In probability theory and statistics, skewness is a measure of the asymmetry of the probability distribution of a real-valued random variable about its mean. The skewness value can be positive or negative, or undefined. Skewness is asymmetry in a statistical distribution, in which the curve appears distorted or skewed either to the left or to the right. Skewness can be quantified to define the extent to which a distribution differs from a normal distribution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*cLRdTBqGy-vK5vNhRgZ7sg.png" /><figcaption>Forest Soil type prediction-<strong>Data Statistics: skewness -Ayush</strong></figcaption></figure><p>· Values close to 0 show less skew</p><p>· Several attributes in Soil_Type show a large skew. Hence, some algos may benefit if the skew is corrected.</p><p><strong>6.</strong> <strong>Class Distribution: </strong>Class distribution is the way to determine whether all the classes are having the same number of instances or not. Imbalanced class distribution, it’s a scenario where the number of observations belonging to one class is significantly lower than those belonging to the other classes.</p><p>Learning algorithms tend to produce unsatisfactory classifiers when faced with imbalanced datasets. For any imbalanced data set, if the event to be predicted belongs to the minority class and the event rate is less than 5%, it is usually referred to as a rare event.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LyCJrzoJUIPFoFfzDMW8wQ.png" /><figcaption>Forest Soil type prediction-<strong>Data Statistics: class distribution (1)- ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*j3hWBD4pCACtinVYqlACrg.png" /><figcaption>Forest Soil type prediction-<strong>Data Statistics: class distribution (2)- Ayush</strong></figcaption></figure><p>Class 4 (having lowest appearances of a class in ‘Cover_type’): 2747</p><p>Total no. of observation: 581,102</p><p>% of Class 4: 0.47</p><p>· Class 4 is having the &lt;1 percentage of presence.</p><p>· Classes 3, 4, 5, 6, 7 are having a very low presence in comparison to Classes 1 &amp; 2 in ‘Cover_type’.</p><p>Here, we distributed each class with the same number of rows &amp; columns to make imbalance class distribution ineffective.</p><p><strong>Exploratory Data Analysis</strong></p><p>· <strong>PCA ( Principal Component Analysis)</strong></p><p>One of the common problems in the analysis of complex data comes from a large number of variables, which requires a large amount of memory and computation power. This is where Principal Component Analysis (PCA) comes in. It is a technique to reduce the dimension of the feature space by <a href="https://en.wikipedia.org/wiki/Feature_extraction">feature extraction</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KFO98oiDL-W0SN1JI9hhaA.png" /><figcaption>Forest Soil type prediction-Exploratory<strong> Data Analysis: PCA- Ayush</strong></figcaption></figure><p>· <strong>Data Integration</strong></p><p><strong>1.</strong> <strong>Correlation:</strong></p><p>· Correlation tells the relation between two attributes.</p><p>· Correlation requires continuous data. Hence, ignore Wilderness_Area and Soil_Type as they are binary.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AerqjvoNvEUito63J6jCrQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*X0ORwRn3kNUQExpgmAZ7fg.png" /><figcaption>Forest Soil type prediction-<strong>Data Integration: Correlation- Ayush</strong></figcaption></figure><p>2. <strong>Scatter Plot (pair plot):</strong> Scatter plot is extremely intuitive yet powerful. Just plot the vertical coordinate and horizontal coordinate of each data point in the sample to get its scatter plot. If the relationship is non-linear, or there may be the presence of an outlier, these targets will be visible in the scatter plot. In the case of many features i.e. dimensions, a scatter-plot matrix can be used.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m_ekGfL7zGmA8atbu2a4eQ.png" /><figcaption>Forest Soil type prediction-<strong>Data Integration: Scatter plot(1)- Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZBQEO3Un-8UmwZprv0Mhg.png" /><figcaption>Forest Soil type prediction-<strong>Data Integration: Scatter plot(2)- Ayush</strong></figcaption></figure><p>· The plots show to which class a point belongs to. The class distribution overlaps in the plots.</p><p>· Hill shade patterns give nice ellipsoid patterns with each other.</p><p>· Aspect and Hill shades attribute to form a sigmoid pattern.</p><p>· Horizontal and vertical distance to hydrology give an almost linear pattern.</p><p>· <strong>Data Visualization</strong></p><p><strong>1.</strong> <strong>HEAT MAP: </strong>Heat map will feature variables as row headers and column headers, and the variable vs. itself on the diagonal — is an extremely powerful way to visualize relationships between variables in high dimensional space.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JcHOpENb2lA3zS4BEmECRg.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: Heat Map- Ayush</strong></figcaption></figure><p><strong>2.</strong> <strong>BOX PLOT:</strong> t displays essential stats about distribution in a concise visual form. Aka candlestick plot. Also popular in finance. This is known as the box and whisker graph too. It’s popular among statisticians. Used to visualize range. It can be drawn horizontally.</p><p>· Max, 3rd Quartile, Median, 1st Quartile, min are the feature can be easily detectable through box plot.</p><p>· Box whisker plot displays outliers as a dot!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*L9u-foj0HM2rnHlhwivrfw.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: </strong>Box Plot -<strong>Ayush</strong></figcaption></figure><p><strong>3.</strong> <strong>PAIR PLOT:</strong> If we want 4d visualization for scatter plot, this is when Pair plot from seaborn package comes into play. Let’s say we have n number of features in a data, Pair plot will create us a (n x n) figure where the diagonal plots will be histogram plot of the feature corresponding to that row and rest of the plots are the combination of feature from each row in y-axis and feature from each column in x-axis.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rYImRd9t_JnYIrufYMrxyw.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: Pair</strong> Plot -<strong>Ayush</strong></figcaption></figure><p><strong>4.</strong> <strong>LM PLOT:</strong> Every plot in Seaborn has a set of fixed parameters. We have three mandatory parameters and the rest are optional that we may use as per our requirements. These 3 parameters are values for X-axis, values for Y-axis and reference to the dataset. These 3 are pre-dominantly visible in almost all of Seaborn plots and besides, there is an optional parameter which I would like you to memorize as it comes in very handy. This is a <strong>hue</strong> parameter and it takes in categorical columns and kind of helps us to group our data plot as per hue parameter values.</p><p>· Horizontal_Distance_To_Hydrology &amp; Vertical_Distance_To_Hydrology with Soil_Type2.</p><p>· Horizontal_Distance_To_Hydrology &amp; Vertical_Distance_To_Hydrology with Wilderness_Area1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jsr4wY8WDVw1qJ1oFkZjXw.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: LM</strong> Plot -<strong>Ayush</strong></figcaption></figure><p><strong>5.</strong> <strong>VIOLIN PLOT: </strong>The violin plots can be inferred as a combination of Box plot at the middle and distribution /density plots(Kernel Density Estimation ) on both side of the data. This can give us the details of distribution like whether the distribution is multimodal, skewness etc. It also gives us the useful info like 95% confidence interval.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1EouMhFPH7dU3tKBUsu8Eg.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: Violin </strong>Plot(1) -<strong>Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jkNovd5kLwYGwPxdnskHPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A1GYbV2YN6LQIvH4RESH-Q.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: Violin </strong>Plot(2) -<strong>Ayush</strong></figcaption></figure><p>· Elevation is has a separate distribution for most classes. Highly correlated with the target and hence an important attribute.</p><p>· Aspect contains a couple of normal distribution for several classes</p><p>· Horizontal distance to road and hydrology have a similar distribution.</p><p>· Hillshade 9 am and 12 pm display left skew.</p><p>· Hillshade 3 pm is normal.</p><p>· Lots of 0s in the vertical distance to hydrology.</p><p>· Wilderness_Area3 gives no class distinction. As values are not present, others give some scope to distinguish.</p><p>· Soil_Type, 1,5,8,9,12,14,18–22, 25–30 and 35–40 offer class distinction as values are not present for many classes.</p><p><strong>Grouping of one hot encoded attributes:</strong> For categorical variables where no such ordinal relationship exists, the integer encoding is not enough. In this case, a one-hot encoding can be applied to the integer representation. This is where the integer encoded variable is removed and a new binary variable is added for each unique integer value.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IUgsqIQwjWzc-dZL4EhO7g.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: One hot encoded(1)</strong>-<strong>Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xMI3PI_sbC4sDkIOH_50xg.png" /><figcaption>Forest Soil type prediction-<strong>Data Visualization: One hot encoded(2)</strong>-<strong>Ayush</strong></figcaption></figure><p>· WildernessArea_4 has a lot of presence for cover_type 4. Good class distinction.</p><p>· WildernessArea_3 has not much class distinction.</p><p>· SoilType 1–6,10–14,17, 22–23, 29–33,35,38–40 offer lot of class distinction as counts for some are very high.</p><p>· <strong>Data Cleaning</strong></p><p>Removing Unnecessary Columns: There are maybe some columns in our data set which will not help in any prediction because they don’t have any specific distinct values to make them even considerable and just creating some noises here. This can be determined by calculating the standard deviation of each column, which we already did through the <strong>s</strong>tatistical description.</p><p>· Add constant columns as they don’t help in the prediction process.</p><p>· Removing the ones which have the standard deviation equals to zero.</p><p>· No columns have that standard, so there is no need to remove any column.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XQwPBQ0K_uE5HLfXQlSwhg.png" /><figcaption>Forest Soil type prediction-<strong>Data Cleaning</strong>-<strong>Ayush</strong></figcaption></figure><p>· <strong>Data Preparation</strong></p><ol><li><strong>Standardization(Standard Scalar): </strong>The idea behind Standard Scalar is that it will transform your data such that its distribution will have a mean value 0 and standard deviation of 1. Given the distribution of the data, each value in the dataset will have the sample mean value subtracted and then divided by the standard deviation of the whole dataset.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3JGLSq0oteZiObL8nVIt6Q.png" /><figcaption>Forest Soil type prediction-<strong>Data Preparation: Standardization (1)</strong>-<strong>Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bDo3aZjUsCS98b3qJKUYag.png" /><figcaption>Forest Soil type prediction-<strong>Data Preparation: Standardization (2)</strong>-<strong>Ayush</strong></figcaption></figure><p><strong>2.</strong> <strong>Normalization:</strong> Normalization is one of the methods used in data science to bring features in a dataset to the same scale. When you normalize a feature, all feature values will be in the range of 0 to 1.</p><p>· Select numerical columns which need to be normalized.</p><p>· Normalize Training Data.</p><p>· Converting numpy array to a data frame.</p><p>· Normalize Testing Data by using the mean and SD of the training set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ahn3mpNg8D_M-4UmUPYgqQ.png" /><figcaption>Forest Soil type prediction-<strong>Data Preparation: Normalization(1)</strong>-<strong>Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UpHXIglqI1AasFp7zy5F9A.png" /><figcaption>Forest Soil type prediction-<strong>Data Preparation: Normalization(2)</strong>-<strong>Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dVBa9m4HWNU4JzFPF8QNKQ.png" /><figcaption>Forest Soil type prediction-<strong>Data Preparation: Normalization(3)</strong>-<strong>Ayush</strong></figcaption></figure><p><strong>Evaluation, prediction, and analysis</strong></p><p>This study aims to analyze the performance of generalized MLP architectures which has a back-propagation algorithm using various activation functions for the neurons of hidden and output layers. For experimental comparisons Sigmoid, Tanh, ReLU &amp; Softmax.</p><p>The activation function used to transform the activation level of a unit (neuron) into an output signal. There are several common activation functions in use with artificial neural networks (ANN). The most common choice of activation functions for multi-layered perceptron (MLP) is used as transfer functions in research and engineering. Among the reasons for this popularity is its boundedness in the unit interval, the function’s and it’s derivative’s fast computability and several amenable mathematical properties in the realm of approximation theory. However, considering the huge variety of problem domains MLP is applied in, it is intriguing to suspect that specific problems call for single or a set of specific activation functions.</p><p>· Here, we can’t use the sigmoid activation function. Our dataset output layer has 7 different classes to determine, which means it’s a multi-classification task but sigmoid is a binary classification algorithm as it just transforms the output to either 0 or 1.</p><p>· The sigmoid and hyperbolic tangent activation functions cannot be used in networks with many layers due to the vanishing gradient problem.</p><p>· Instead of sigmoid activation, we can use softmax activation function which significantly great in building a multi classifier as it a form of logistic regression that normalizes an input value into a vector of values that follows a probability distribution whose total sums up to 1.</p><p>· It should be noted that softmax is not ideally used as an activation function like Sigmoid, Tanh &amp; ReLU (Rectified Linear Units) between layers which may be multiple or just a single one but as an output layer.</p><p><strong>1.</strong> <strong>Validating Data Through</strong><em> </em><strong>ReLU (Rectified Linear Units): </strong>The solution of gradient descent is to use the rectified linear activation function, or ReL for short, the main idea is to let the gradient be non zero and recover during training eventually. A node or unit that implements this activation function is referred to as a rectified linear activation unit or ReLU for short. Often, networks that use the rectifier function for the hidden layers are referred to as rectified networks. ReLU is less computationally expensive than tanh and sigmoid because it involves simpler mathematical operations. That is a good point to consider when we are designing deep neural nets. The rectified linear activation function is a simple calculation that returns the value provided as input directly, or the value 0.0 if the input is 0.0 or less.</p><p>· Softmax activation is great to use as output layer (as it normalizes an input value into a vector of values that follows a probability distribution whose total sums up to 1) in neural networks with ReLU as the middle layer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tBMwKQxxhb3gHxxoWx0gNQ.png" /><figcaption>Forest Soil type prediction-<strong>Data Prediction: Validating ReLU</strong>-<strong>Ayush</strong></figcaption></figure><p>· As Y variable is multi-class categorical variable, hence using softmax as activation function and sparse-categorical cross-entropy as the loss function.</p><p>· Using 2 layers with 64 neurons on both hidden layers and 8 neurons on the output layer.</p><p>· We use 26 epochs, one forward passes and one backward pass of all the training examples.</p><p>· Here we take batch_size of 60 for this model, the number of training examples in one forward/backwards pass. The higher the batch size, the more memory space you’ll need.</p><p><em>Visualize Training History</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*t3C_6UNa-sH4WdljU_CDcg.png" /><figcaption>Forest Soil type prediction-<strong>Data Prediction: Visualizing ReLU(1)</strong>-<strong>Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*y_-tfj7mLqE9qRZqb449dg.png" /><figcaption>Forest Soil type prediction-<strong>Data Prediction: Visualizing ReLU(2)</strong>-<strong>Ayush</strong></figcaption></figure><p><strong>2.</strong> <strong>Validating Data Through Tanh: </strong>The Hyperbolic Tangent Activation Function. This is due in part to the fact that if a strongly-negative input is provided to the logistic sigmoid, it outputs values very near zero. Like the logistic sigmoid, the tanh function is also sigmoid (“s”-shaped), but instead outputs values that range. Its outputs range from 0 to 1 and are often interpreted as probabilities (in, say, logistic regression). The tanh function, a.k.a. hyperbolic tangent function, is a rescaling of the logistic sigmoid, such that its outputs range from -1 to 1.</p><p>The advantage is that the negative inputs will be mapped strongly negative and the zero inputs will be mapped near zero in the tanh graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6R9-syoV7nn5kLYCxVENlg.png" /><figcaption>Forest Soil type prediction-<strong>Data Prediction: Validating TanH(1)</strong>-<strong>Ayush</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6Acc8VEIjO0SaddE7zYt4A.png" /><figcaption>Forest Soil type prediction-<strong>Data Prediction: Validating TanH(2)</strong>-<strong>Ayush</strong></figcaption></figure><p>· The function is differentiable.</p><p>· The function is monotonic while its derivative is not monotonic.</p><p>· We use 54 neurons on the input layer as the total columns are of the same size.</p><p>· Here 100 neurons are placed with 4 hidden layers &amp; softmax function is used in the output layer.</p><p>· We used dropout function with a value of 0.2 to deal regularization in the deep learning model.</p><p>· The tanh function is mainly used classification between two classes.</p><p>No. Of Epochs, Loss on validation, Accuracy on validation, Actual loss on Model &amp; Actual accuracy on Model.</p><p><em>Training and Validation Accuracy</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9nvWS0RjNCB6QwR86SC1IA.png" /><figcaption>Forest Soil type prediction-<strong>Data Prediction: <em>Training and Validation Accuracy</em> TanH</strong>-<strong>Ayush</strong></figcaption></figure><p><em>Model Accuracy</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NdrbyaBlsQEvpYobjHvdGg.png" /><figcaption>Forest Soil type prediction-<strong>Data Prediction: Visualizing/ Model Accuracy TanH</strong>-<strong>Ayush</strong></figcaption></figure><p><strong>Conclusion</strong></p><p>In this study, we have used 3 conventional differentiable and monotonic activation functions for the evolution of MLP architecture along with Generalized Delta rule learning. These proposed well-known and effective activation functions are TanH, ReLU &amp; Softmax. Having compared their performances, simulation results show that ReLU(rectified linear unit) function performs better recognition accuracy than those of the other functions. In other words, the neural network computed good results when “ReLU-Softmax” combination of activation functions was used for neurons (or nodes) of hidden and output layers. The use softmax layer as a hidden layer is not possible as we have to keep all our nodes (hidden variables) linearly dependent which may result in many problems and poor generalization.</p><ul><li>ReLu is less computationally expensive than tanh because it involves simpler mathematical operations.</li><li>Softmax were used in output layers instead of the hidden layer.</li><li>‘Tanh-Softmax ‘combination gives good results instead of ‘Tanh-Tanh’ combination with an accuracy of 61%.</li><li>‘ReLU-Softmax’ combination gives the best results with perfect accuracy of 100%.</li><li>Normalization and Standardization help the algorithm to achieve these good accuracies.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=59379c084442" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/comparison-of-non-linear-activation-functions-for-deep-neural-networks-on-forest-cover-59379c084442">Comparison of non-linear activation functions for deep neural networks on multi-classification task</a> was originally published in <a href="https://medium.com/analytics-vidhya">Analytics Vidhya</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>