<?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 Payal Das on Medium]]></title>
        <description><![CDATA[Stories by Payal Das on Medium]]></description>
        <link>https://medium.com/@payal-das?source=rss-c855321e3b8c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*pqav0gJ2eJY10W20y2bwQA.jpeg</url>
            <title>Stories by Payal Das on Medium</title>
            <link>https://medium.com/@payal-das?source=rss-c855321e3b8c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 18:45:29 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@payal-das/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[Time Series for Actuaries]]></title>
            <link>https://payal-das.medium.com/time-series-for-actuaries-2e619f46639a?source=rss-c855321e3b8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/2e619f46639a</guid>
            <category><![CDATA[arima]]></category>
            <category><![CDATA[time-series-analysis]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Payal Das]]></dc:creator>
            <pubDate>Thu, 07 Oct 2021 19:39:58 GMT</pubDate>
            <atom:updated>2021-10-07T19:45:10.810Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_nDLlUtS8qvAjbxnXUzHEA.png" /></figure><h3><strong>What is a Time Series?</strong></h3><p>A <strong>time series</strong> is a series of data points ordered in time. Time series adds an explicit order dependence between observations: a time dimension. In a normal machine learning dataset, the dataset is a collection of observations that are treated equally when future is being predicted. In time series the order of observations provides a source of additional information that should be analyzed and used in the prediction process.</p><p>Time series are typically assumed to be generated at regularly spaced interval of time (e.g. daily temperature), and so are called <strong>regular time series</strong>. But the data in a time series doesn’t have to come in regular time intervals. In that case it is called <strong>irregular time series</strong>. In irregular time series the data follows a temporal sequence, but the measurements might not occur at a regular time intervals. For example, the data might be generated as a burst or with varying time intervals. Account deposits or withdrawals from an ATM are examples of an irregular time series. Time series can have one or more variables that change over time. If there is only one variable varying over time, we call it <strong>Univariate time series</strong>. If there is more than one variable it is called <strong>Multivariate time series. </strong>For example, a tri-axial accelerometer. There are three accelerations variables, one for each axis (<em>x,y,z</em>) and they vary simultaneously over time.</p><p>Some major purposes of the statistical analysis of time series are:</p><blockquote>To understand the variability of the time series.</blockquote><blockquote>To identify the regular and irregular oscillations of the time series.</blockquote><blockquote>To describe the characteristics of these oscillations.</blockquote><blockquote>To understand the physical processes that give rise to each of these oscillations.</blockquote><h3><strong>The Stationary and Markov Property</strong></h3><h4>Stationary Property</h4><p>In the most intuitive sense, stationarity means that the statistical properties of a process generating a time series do not change over time. It does not mean that the series does not change over time, just that the <em>way</em> it changes does not itself change over time. The algebraic equivalent is thus a linear function, perhaps, and not a constant one; the value of a linear function changes as 𝒙 grows, but the <em>way</em> it changes remains constant — it has a constant slope; one value that captures that rate of change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gc1u9IKftyFoIY29GlTVCA.png" /><figcaption><strong>Fig 1. Stationary time series graph</strong></figcaption></figure><h4><strong>Markov Property</strong></h4><p>There exists some well-known families of random processes: gaussian processes, poisson processes, autoregressive models, moving-average models, Markov chains and others. These particular cases have, each, specific properties that allow us to better study and understand them.</p><p>“Markov property” makes the study of a random process much easier. In a very informal way, the Markov property says, for a random process, that if we know the value taken by the process at a given time, we won’t get any additional information about the future behaviour of the process by gathering more knowledge about the past. Stated in slightly more mathematical terms, for any given time, the conditional distribution of future states of the process given present and past states depends only on the present state and not at all on the past states (<strong>memory less property</strong>). A random process with the Markov property is called <strong>Markov process</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*aGK9Wek99Od73_iUBWdFDw@2x.png" /><figcaption><strong>Fig 2. The Markov property expresses the fact that at a given time step and knowing the current state, we won’t get any additional information about the future by gathering information about the past.</strong></figcaption></figure><h3><strong>Autocovariance and Autocorrelation functions</strong></h3><h4>Autocovariance function</h4><p>Given a <a href="https://en.wikipedia.org/wiki/Stochastic_process">stochastic process</a>, the <strong>autocovariance</strong> is a function that gives the <a href="https://en.wikipedia.org/wiki/Covariance">covariance</a> of the process with itself at pairs of time points. Autocovariance is closely related to the <a href="https://en.wikipedia.org/wiki/Autocorrelation">autocorrelation</a> of the process in question. Autocovariance is defined as the covariance between the present value with the previous value (xt-1) and the present value (xt) with (xt-2). And it is denoted as <em>ϒ</em>. Here Mean will not change if it is a stationary time series. So the formula becomes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/223/1*p1IfGJG3C_RxQ7kFgXdZaQ.png" /><figcaption>Eq 1. Autocovariance for time series data</figcaption></figure><h4><strong>Autocorrelation function</strong></h4><p>In time series we will deal with variables w.r.t time like sales of a company over the years (predicting feature temperature, ozone level etc) . While predicting the feature sales of a company the past sales will impact more on the feature sales than the previous one. Then finding a correlation between the present(xt) and the previous sales(xt-1) and then with (xt) and (xt-2), (xt-3) etc… to find correlation in the same column we use autocorrelation.</p><p>Autocorrelation can be defined as a the correlation between itself and the other values of same variable(features) (in our case correlation between (Xt and Xt-1) (Xt and Xt-2). etc…) and it is denoted as ρ.</p><p>Autocorrelation function<strong>(ACF)</strong> of time series is defined as:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/340/1*xO5z-SMdI1HVjoBtafeSVQ.png" /><figcaption>Eq 2. Autocorrelation for time series data</figcaption></figure><h3><strong>ARIMA</strong></h3><p>The Autoregressive Integrated Moving Average (ARIMA) model uses time-series data and statistical analysis to interpret the data and make future predictions. The ARIMA model aims to explain data by using time series data on its past values and uses <a href="https://corporatefinanceinstitute.com/resources/knowledge/other/multiple-linear-regression/">linear regression</a> to make predictions.</p><h4>Understanding the ARIMA Model</h4><blockquote>The “AR” in ARIMA stands for autoregression, indicating that the model uses the dependent relationship between current data and its past values. In other words, it shows that the data is regressed on its past values.</blockquote><blockquote>This technique is similar to the moving average technique, except that the forecast of the next observation is based on a regression equation that uses past observations (and not past errors as with the MA model). Just like with MA-models, the order of the AR model also indicates how many previous observations are used for the forecast.</blockquote><blockquote>The “<strong>I</strong>” stands for <strong>integrated</strong>, which means that the data is stationary. Stationary data refers to time-series data that’s been made “stationary” by subtracting the observations from the previous values.</blockquote><blockquote>The “<strong>MA</strong>” stands for <strong>moving average model, </strong>indicating that the forecast or outcome of the model depends linearly on the past values. Also, it means that the errors in forecasting are linear functions of past errors. Note that the moving average models are different from statistical moving averages.</blockquote><blockquote>With this time-series technique, the next observation (i.e. forecast) is based on the weighted average of one or more past observations. Mathematically, in an MA model, a forecast will be based on a regression equation based on past errors (also called ‘noise’). An MA(1) model is a first order MA model in which the forecast is based on only the last error, in an MA(2) model it is based on the last two errors, and an an MA(n) model the forecast is based on the last n errors.</blockquote><p>Each of the AR, I, and MA components are included in the model as a parameter. The parameters are assigned specific integer values that indicate the type of ARIMA model.</p><h3><strong>Fitting Time Series Model to Data</strong></h3><p>Similarly to <a href="https://modelassist.epixanalytics.com/display/EA/Fitting+a+first+order+parametric+discrete+distribution+to+observed+data">fitting parametric distribution to data</a>, it is also possible to fit parametric time-series models to historical data to create forecasts. The main difference is that when fitting a distribution to data, we assumed that they are randomly sampled from independent, identical distributions. In plain words, we assume the data points come from the same distribution and are not correlated. For example, if we have measurements of heights of 100 people, each of such measurements is assumed to be the measurement of a randomly selected individual from a single population distribution of heights. In contrast, time-series data is by nature sequential as the value in the next period is linked to that of previous periods. For example, the daily price of a commodity is highly dependent on its price in prior days. This type of dependency is called autocorrelation or serial correlation, and must be incorporated in a time-series fit.</p><h4><strong>GARCH models for measuring volatility</strong></h4><p>GARCH models describe financial markets in which volatility can change, becoming more volatile during periods of financial crises or world events and less volatile during periods of relative calm and steady economic growth.</p><h3><strong>Conclusion</strong></h3><p>Time series analysis is a must for every company to understand seasonality, cyclicality, trend and randomness in the sales and other attributes. In the coming blogs we will learn more on how to perform time series analysis with R, python and Hadoop.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2e619f46639a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Containerization in Cloud Computing]]></title>
            <link>https://payal-das.medium.com/containerization-in-cloud-computing-21d63c0a8368?source=rss-c855321e3b8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/21d63c0a8368</guid>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[virtual-machine]]></category>
            <category><![CDATA[containerization]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[containers]]></category>
            <dc:creator><![CDATA[Payal Das]]></dc:creator>
            <pubDate>Mon, 10 May 2021 14:48:07 GMT</pubDate>
            <atom:updated>2021-05-10T14:48:07.293Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*IB1wXz1u2KheZaTSav_xGA.png" /></figure><p>Nowadays, containers are a hot topic, and why not? Application containers certainly cover all the buzzwords: they are cloud-based, server less, lightweight, highly scalable and agile. More than 50% of organizations worldwide are running containerized applications. Containers have many benefits for application management, and they can only play their best role if they make full use of the cloud. Learn why containers are becoming more popular than virtual machines and how to create a path to the cloud for containers.</p><h3><strong>What do you mean by Containerization?</strong></h3><p>Containers are a solution to the problem of how to make software run reliably when it is transferred from one computing environment to another. This may be from a developer’s PC to a test environment, from a transitional environment to a production environment, or to a virtual machine in a public or private cloud from a physical machine in a data center.</p><p>In short, a container contains a complete runtime environment: an application and all of its dependencies, libraries and other binary files as well as the configuration files required to run it packaged in a bundle. Through containerizing application platform and its dependencies, the differences in operating system distributions and underlying infrastructure can be abstracted.</p><h3>How does Containerization work?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*JTuvg_EJAUI97tstV3zbLg.png" /><figcaption>Fig 1. Architectural Overview of Containers</figcaption></figure><p>Each container is an executable software package that runs on top of a host OS. A host can support thousands of containers. Think of a containerized application as the top layer of a multi-layered cake:</p><p><strong>1. </strong>At the bottom, there is the hardware of the infrastructure, including its CPU, disk storage and network interface. It may exist physically, virtually or in the cloud.</p><p><strong>2.</strong> Atop of that comes the host OS (Windows, Mac OS or Linux) and its kernel — the latter acts as a bridge between the software of the OS and the hardware of the underlying system.</p><p><strong>3.</strong> The container engine specific to the containerization technology used and its smallest guest OS are located on top of the host OS.</p><p><strong>4.</strong> At the top are the binaries and libraries (bins/lib) of each application and the application itself, which run in their respective user spaces (containers).</p><h3>Why are Containers better than Virtual Machines?</h3><p>Virtual Machines were the first method to deploy multiple applications on a single platform. It was achieved by running software on top of physical servers to simulate a hardware system. A hypervisor is required to run VMs, because each virtual machine has its own operating system and hardware support requirements. The figure below shows the other layers required in the VM setup, which tends to slow down the development time and incur more costs than containers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/628/1*v0e5MAG7G6WfFLdJiTaUxw.png" /><figcaption>Fig 2. Difference in Architecture between VMs and Containers</figcaption></figure><p>A Virtual Machine virtualizes hardware whereas container virtualizes Operating System. The functions performed by the two are basically the same, but the space and effort required by the container are much less than VM.</p><p>In virtualization technology, a virtual machine is passed around, which includes an entire operating system and applications. A physical server running three virtual machines will have a hypervisor and three separate OS running on top of it. In contrast, a server running three containerized applications runs a single OS, and each container shares the operating system kernel with other containers. This means that containers are much lighter than virtual machines and use far fewer resources.</p><h3>What Applications and Services are Commonly Containerized?</h3><p>Containers can support almost all types of applications, which was virtualized traditionally or run natively on a machine in the previous era. At the same time, there are several computing examples that are particularly suitable for containerization, including:</p><p><strong>• Microservices:</strong> The microservice architecture can be effectively configured as a set of containers which run in series and are decommissioned and spun-up as required.</p><p><strong>• Databases:</strong> The database shards can be containerized, and each application has its own dedicated database without connecting them all to the overall database.</p><p><strong>•Web server:</strong> Starting the web server in the container requires only a few command line inputs and it avoids the need to run the server directly on the host.</p><p><strong>• Containers within VMs:</strong> Containers can run in VMs, usually to improve security, maximize hardware utilization and to be able to talk to specific services in the VM.</p><h3>Conclusion</h3><p>Containers have multiple benefits and also excel in many aspects when compared with Virtual Machines. It is an advanced technological solution which improves the application management and makes the architectural system lighter and more performing. The prominent advantages that container has to offer such as the portability between different platforms and clouds; efficiency through using far few resources than Virtual Machines and delivering higher utilization of compute resources; higher speed; improved security by isolating applications from the host system and from each other; flexibility to work on virtualized infrastructures and easier management has prompted the growing trend for container based development. Alongside, it has proven to provide the agility required for today’s continuous build, integrate and deployment model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=21d63c0a8368" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning and Data Visualization using Orange]]></title>
            <link>https://payal-das.medium.com/machine-learning-and-data-visualization-using-orange-5defcaacc40?source=rss-c855321e3b8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/5defcaacc40</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[data-visualization]]></category>
            <category><![CDATA[orange]]></category>
            <dc:creator><![CDATA[Payal Das]]></dc:creator>
            <pubDate>Tue, 22 Dec 2020 16:22:07 GMT</pubDate>
            <atom:updated>2020-12-22T16:22:07.533Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>In this blog, we will be discussing about <strong>Orange</strong>, an open source tool which provides machine learning and data visualization capabilities for novice and expert users.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*-80PdxCfw3AMxS1H5qmvmg.png" /></figure><p><strong>Introduction to Orange</strong></p><p>Orange is an <strong>open source component-based visual programming software package</strong> used for <strong>machine learning</strong>, <strong>data visualization,</strong> <strong>data analysis and data mining</strong>. Components of Orange are called <strong>widgets </strong>and they range from simple data visualization, pre-processing and subset selection, to practical evaluation of learning algorithms and predictive modeling.</p><p>In Orange, visual programming is achieved through an interface in which workflows are created by linking predefined or user-designed widgets, and advanced users can use Orange as a Python library for data processing and widget changes.</p><p><strong>Features of Orange</strong></p><p>Following are the eye-catching features of Orange:</p><blockquote><strong>1. Open source</strong></blockquote><p>The best part of Orange is that it is open source, so you can get its code and even modify the tool as needed. In addition, you can also get the source code of almost all machine learning algorithms. Therefore, you can modify the algorithm according to the application, and then you can add the modified algorithm in Orange and get the result.</p><blockquote><strong>2. Visual Programming</strong></blockquote><p>This tool is not only suitable for computer science professionals, but even novice users can use it because it provides visual programming. There is no need to learn any programming language, such as JAVA, C, C++ or Python, etc. The only thing you should understand is the concept of data mining, and you should know which algorithm should be used in a specific situation.</p><p>It provides drag and drop functionality. It even provides connecting wires. Charting has never been as fun as Orange. When you experience the flexible visual environment of this tool, you will love this tool. If the connection is not correct, it will provide a dotted line. If you are not using the correct machine learning algorithm or prediction algorithm, then it will not allow you to connect to the data.</p><p>In short, visual programming provides an interactive data browsing function, which enables quick qualitative analysis through clear visualization. The GUI allows users to focus on exploratory data analysis instead of coding, and smart default settings make prototyping of any data analysis workflow very fast and easy.</p><blockquote>Just place the widget on the canvas, connect, load the dataset and generate insights.</blockquote><blockquote><strong>3. Add-ons are available to extend the functionality</strong></blockquote><p>The functionality of Orange can be expanded through the add-ons provided online. In fact, Orange never provides a way to process biometric data as an essential toolbox; rather than it has always been an add-on. Last year, the exact process of distributing add-ons has changed a lot to simplify the process for add-ons authors and make them more standards-compliant. Among other things, this allows system administrators to install add-ons directly from PyPi system-wide using easy_install or pip.</p><blockquote><strong>4. Create Dataset from any Graph you want</strong></blockquote><p>You can use the paint data function to draw your graph, and by using this paint data utility, you will be able to generate a data set for the graph.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/1*52vrGw-xAjo9Rl82rx_j5g.png" /><figcaption>Fig 1. Visualizing graph using ‘Paint Data’</figcaption></figure><p>The biggest beauty of Orange is that you can perform reverse processing. In general, we have seen that we draw graphs from existing data, but the opposite is also possible here! Below we have the dataset generated from the graph shown above.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/499/1*oIF12trMsQh4qsyszJBJ3Q.png" /><figcaption>Fig 2. Generated Dataset from the graph shown above</figcaption></figure><p><strong>Working with Data</strong></p><p>Orange provides you many options to do almost everything with your dataset. As shown in following figure there are almost <strong>26 options to organize your dataset</strong> in any manner as you wish.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*TgUfZBnwyG2oQlXXgBRdAQ.png" /><figcaption>Fig 3. Widgets to organize your dataset</figcaption></figure><p><strong>Visualizing Data</strong></p><p>You can visualize data in about <strong>16 different types of plots and graphs</strong>. A very simple and interesting feature of Orange, you only need to connect the data set to the desired plot or graph you want and things are done.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/265/1*HiR0WJmW2RsthrCQPjzF2w.png" /><figcaption>Fig 4. Widgets for Data Visualization</figcaption></figure><p><strong>Supervised Data Model</strong></p><p>Orange provides nearly 12 built-in machine learning models. You can use them to directly train the data set. Built-in models include the most popular machine learning algorithms, such as <strong>SVM</strong>, <strong>KNN</strong>, <strong>Logistic regression</strong>, <strong>Navies Bayes</strong>, etc., as shown in the figure below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/264/1*aAuAvFIUP8k82rT503A_wg.png" /><figcaption>Fig 5. In-built Supervised Machine Learning Model Widgets</figcaption></figure><p><strong>Unsupervised Model</strong></p><p>Orange provides inbuilt model for both supervised as well as unsupervised learning methods. It provides direct implementation of algorithms like <strong>K-Means, PCA</strong> etc. It also provides the access to other models as shown in given figure:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/266/1*z6QE8AsC7oNESdRJOIjnYw.png" /><figcaption>Fig 6. In-built Unsupervised Machine Learning Model Widgets</figcaption></figure><p><strong>Evaluation of Performance of Models</strong></p><p>Orange is not only a powerful implementation tool, but also an excellent tool for evaluating the performance of different models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/268/1*YcnmD8PFuSnghGaNbYQr0A.png" /><figcaption>Fig 7. Widgets for Evaluating the performance of Models</figcaption></figure><p><strong>Test and score</strong> is one of the most commonly used widgets in Orange.</p><p>The widget mainly accepts 2 inputs-<strong>Data</strong> and <strong>Learners</strong>.</p><p>The <strong>Data</strong> is the data set we use for modeling, such as titanic.tab, which has been pre-loaded in the File widget.</p><p>The <strong>Learner</strong> is any kind of learning algorithm, for example, it can be, KNN, Logistic regression or SVM. You can only use those learners who support your task type. If you want to perform classification, you must not use linear regression, and for regression, you cannot use logistic regression.</p><p>Most other learners support both tasks. You can connect more than one learner to test and scores.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*HFR_ITVm9oiJepAoVfBSdQ.png" /><figcaption>Fig 8. Using the Test &amp; Score Widget</figcaption></figure><p>As you can see in the above diagram we have used <strong>Test &amp; Score</strong> from the Evaluate options, connected it to a dataset file and also connected multiple learners to it which are Navies Bayes, Logistic Regression and Random Forest.</p><p>Below, you can see various options available which you can choose for evaluation based on your requirements. Based upon the selection, in the right pane you can see the results.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/486/1*RhIsEXPNw3-HhVk03zrF7g.png" /><figcaption>Fig 9. Evaluation Results for Test &amp; Score</figcaption></figure><p>Therefore, it is very easy for users to use the test and score feature to evaluate multiple models at the same time.</p><p><strong>Conclusion</strong></p><p>Orange is an open source data visualization and data analysis tool for data mining through visual programming or Python scripting. The tool has components for almost all well-known machine learning algorithms, add-ons for bioinformatics and text mining as well as features for data analytics also. So, for researchers it is a one stop solution for pre-processing of dataset, visualization of dataset using graphs, all inbuilt machine learning algorithms, test and score feature for measuring accuracy of algorithm on different datasets along with many more fantastic features.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5defcaacc40" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Fault Tolerance in HDFS]]></title>
            <link>https://payal-das.medium.com/fault-tolerance-in-hdfs-35cc66b265ce?source=rss-c855321e3b8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/35cc66b265ce</guid>
            <category><![CDATA[fault-tolerance]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[hadoop]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[hdfs]]></category>
            <dc:creator><![CDATA[Payal Das]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 19:22:58 GMT</pubDate>
            <atom:updated>2020-11-24T03:37:38.068Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*qpUiCauPAtEWNpypPF-LFA.png" /></figure><p>Fault tolerance refers to the ability of the system to work or run even under adverse conditions (such as component failure). In this article, we will learn how HDFS in Hadoop achieves fault tolerance. First let us look at what big data is.</p><h3><strong>Introduction to Big Data</strong></h3><p>In the early years, organizations or applications were using only structured data i.e. in the form of rows and columns only. It was very simple to use relational databases (RDBMS) and traditional tools for storing, managing and processing this type of data.</p><p>However, the nature and rate of generation of data has drastically changed over the years. With the evolving technology, the data took an exponential increase in its volume and velocity. Systems and applications started generating huge amount of data in variety of formats at a very fast rate. This change resulted in un-structured and semi-structured data. At this point, it became difficult or near to impossible to use old technologies, traditional database and tools to store, manage, process or analyze this kind of data. This is when Big Data came into picture.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/451/1*F5wrz82A0YpFiOeKgEjrfg.png" /><figcaption>Fig 1. Word cloud of big data</figcaption></figure><p>To define the term, Big Data is a technique to Store, Process, Manage, Analyze and Report a huge amount of variety data, at the required speed, and within the required time to allow Real-time Analysis and Reaction.</p><h3><strong>Issues in legacy systems</strong></h3><p>In traditional systems such as relational databases, all read and write operations are done on one machine. If any adverse conditions such as RAM crash, computer failure, hard disk failure, power failure, etc. occur, the user must wait until the problem is manually solved. Therefore, during a computer crash or malfunction, users will be unable to access their data until the error in the computer is recovered. Additionally, in the old systems, we can only store data in the GB range. So, in order to increase the data storage capacity, a new server computer must be purchased. Therefore, to store a large amount of data, several server computers must be added, which increases costs. The Hadoop distributed file system overcomes these problems. There are many systems that can be used to store and process big data, but instead of relying on any other expensive systems, HDFS is very convenient when processing as well as storing enormous data.</p><h3><strong>HDFS</strong></h3><p>HDFS is the main data storage system used by Hadoop applications. It can be deployed in low-cost software, and its architecture is in such a manner that it detects the faults and provide fast and automatic failure recovery. It uses a NameNode and DataNode architecture to implement a distributed file system that can provide high performance and efficient storage management.</p><h3><strong>Main components of HDFS</strong></h3><p>Apache HDFS is a block-structured file system in which each file is divided into blocks of predetermined size. These blocks are stored in a cluster of one or more systems. The Hadoop HDFS architecture follows a master/slave architecture, where the cluster consists of a single NameNode (master node), and all other nodes are DataNodes (slave nodes). Although one person can run multiple DataNodes on one machine, in actual applications, these DataNodes are distributed on various machines.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/465/1*JRjL_QHlzXxneZiRu6BvOA.png" /><figcaption>Fig 2. HDFS Architecture</figcaption></figure><h4><strong>NameNode</strong></h4><p>NameNode is the master node in the Hadoop HDFS Architecture that maintains and manages the blocks present on the DataNodes, NameNode is a very highly available server that manages the File System Namespace and controls access to files by clients. The HDFS architecture is built in such a way that the user data never resides on the NameNode. The data resides on DataNodes only.</p><h4>Functions of NameNode</h4><p>NameNode is the master daemon that maintains and manages the DataNodes (slave nodes). It records the metadata of all the files stored in the cluster, e.g. the location of blocks stored, the size of the files, permissions, hierarchy, etc. There are two files associated with the metadata. First is <strong>FsImage</strong> which contains the complete state of the file system namespace since the start of the NameNode. And second is <strong>EditLogs</strong> which contains all the recent modifications made to the file system with respect to the most recent FsImage.</p><p>NameNode records each change that takes place to the file system metadata. For example, if a file is deleted in HDFS, the NameNode will immediately record this in the EditLog. It regularly receives a Heartbeat and a block report from all the DataNodes in the cluster to ensure that the DataNodes are live. It keeps a record of all the blocks in HDFS and in which nodes these blocks are located. The NameNode is also responsible to take care of the <strong>replication factor </strong>of all the blocks which we will discuss in detail later. In <strong>case of the DataNode failure</strong>, the NameNode chooses new DataNodes for new replicas, balance disk usage and manages the communication traffic to the DataNodes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/432/1*kuOwKWJjPjQ9y6NFxRbiRQ.png" /><figcaption>Fig 3. NameNode receiving Heartbeat message from DataNode</figcaption></figure><h4><strong>DataNode</strong></h4><p>DataNodes are the slave nodes in HDFS. Unlike NameNode, DataNode is a commodity hardware, that is, a non-expensive system which is not of high quality or high-availability. The DataNode is a block server that stores the data in the local file ext3 or ext4.</p><h4>Functions of DataNode</h4><p>DataNodes are slave daemons or process which runs on each slave machine. The actual data is stored on DataNodes. The DataNodes perform the low-level read and write requests from the file system’s clients. They send heartbeats to the NameNode periodically to report the overall health of HDFS, by default; this frequency is set to 3 seconds.</p><p>NameNode is of great importance. It is the single point of failure in Hadoop version 1. If the single NameNode fails, all communication will stop and the whole Hadoop cluster will stop working. To handle the single point of failure in Hadoop 1, another setup configuration is used which is used to backup NameNode metadata. If the primary NameNode fails, our setup can switch to secondary (backup) and no type of shutdown will happen in the Hadoop cluster.</p><p><a href="http://data-flair.training/blogs/hadoop-hdfs-namenode-high-availability/">HDFS High Availability</a> of NameNode is introduced with Hadoop 2. In this, two separate machines have been configured as NameNodes, where one NameNode is always in working state and another is in standby state. Working Name node handles all clients request in the cluster where standby behaves as the slave and maintains enough state to provide a fast failover on Working Name node.</p><h3><strong>How HDFS achieves Fault Tolerance</strong></h3><p>Fault tolerance in Hadoop HDFS refers to the work intensity of the system under adverse conditions and how the system handles the situation. HDFS is extremely fault-tolerant. Before Hadoop 3, it handled failures through the process of replica creation. Later, Hadoop 3 introduced erasure coding to provide fault tolerance.</p><h4><strong>1) Replication Mechanism</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/483/1*sV_YXqj0O3DA2djJkVq-1w.png" /><figcaption>Fig 4. Replication in HDFS</figcaption></figure><p>Before Hadoop 3 came into play, fault tolerance in Hadoop HDFS was attained by creating replicas. HDFS creates copies of data blocks and stores them on multiple machines (data nodes). The number of copies created depends on the replication factor, which by default is 3. If any machine fails, the data block can be accessed from another computer that contains a copy of the same data. Therefore, there is no data loss because of replicas stored on different machines.</p><h4><strong>Example of HDFS Replication Mechanism</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/1*XqGWRiIqp7qTXGzHbQYOPw.png" /><figcaption>Fig 5. Replication Mechanism example</figcaption></figure><p>Suppose the user stores a file. HDFS breaks this file into blocks; say B1, B2, B3, B4, and B5. Let’s assume there are five Data Nodes, say D1, D2, D3, D4 and D5. HDFS creates replicas of each block and stores them on different nodes to achieve fault tolerance. For each original block, there will be three replicas stored on different nodes (replication factor 3).</p><p>Let the block 1 be stored on Data Nodes D1, D2, and D3, block 2 stored on Data Nodes D1, D4, and D5, and similarly the other 3 blocks.</p><p>If Data Node 1 fails, the blocks 1, 2 and 4 present in D1 are still available to the user from Data Nodes (D2, D3 for B1), (D4, D5 for B2) and (D2, D5 for B4). Hence even in unfavorable conditions, there is no data loss.</p><h4><strong>2)</strong> <strong>Erasure Coding</strong></h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/475/1*aqW6vN3ZlLpNa9E_sGuhFg.png" /><figcaption>Fig 6. Erasure Coding in HDFS</figcaption></figure><p>Erasure coding is a method for fault tolerance. Compared with replication, this method stores data persistently and saves a lot of space. RAID (Redundant Array of Independent Disks) uses erasure coding. Erasure coding works by dividing files into small pieces and storing them on various disks. For each strip of the original data set, a certain number of parity cells are calculated and stored. If any machine fails, the block can be recovered from the parity unit. Erasure coding reduces storage up to 50%.</p><h4>There are two algorithms available in Erasure Coding:</h4><h4>I) XOR Algorithm (Simple EC Algorithm)</h4><p>This is the simplest implementation of HDFS Erasure Coding. Let’s assume X and Y are data cells; the parity cell is the XOR of these two data cells.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/216/1*nvLbVRlDUV40ulpCcZML7A.png" /><figcaption>Fig 7. Erasure Coding example using XOR Algorithm</figcaption></figure><p>Here, data durability is 1 as if can handle 1 simultaneous failure and storage efficiency is 75% (as we are using only one extra block, i.e. 3/4).</p><p>X ⊕ Y is XOR by which only one parity bit is generated and if any bit is lost, it can be recovered by the remaining data cells and a parity bit. It is very limited since it produces one parity bit, so XOR operations can tolerate only one failure with n group size but we get the benefit of better storage efficiency by using XOR algorithm.</p><h4><strong>II) Reed-Solomon Algorithm (Improved EC Algorithm)</strong></h4><p>The limitation of XOR operations is solved by improved EC algorithm, commonly known as the Reed-Solomon algorithm. Reed-Solomon uses linear algebra operations to generate multiple parity cells where, instead of getting only one fault tolerance at a time, we can tolerate multiple failures per group. It works by multiplying a Generator Matrix (<strong>GT</strong>) with <strong>d</strong> data cells to generate codeword with <strong>d</strong> data cells and <strong>p</strong> parity cells. In Reed-Solomon, fault tolerance is up to <strong>p</strong>, i.e. (number of parity cells) cells and storage efficiency is <strong>d</strong>/<strong>d</strong>+<strong>p</strong> where <strong>d</strong> is data cells and <strong>p</strong> is parity cells.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/362/1*Uf01kPoWyYGF6Q2U04-QBA.png" /><figcaption>Fig 8. Erasure Coding example using Reed-Solomon Algorithm</figcaption></figure><p>In this particular example, when you look at the codeword, 6 (blue cells) are the actual data cells and 3 (red cells) are the parity cells, which are simply obtained by multiplying our data cells to generation matrix. Storage failure can be recovered by multiplying the inverse of generator matrix with the extended code words as long as <strong>k</strong> out of <strong>k</strong>+<strong>m</strong> cells are available. Therefore, data durability is 3 (as it can handle two simultaneous failures), storage efficiency is 67% (as we are using only one extra block, i.e. 6/9), and we only need to store half the number of cells compared to the original number of cells. We can conclude that we also have only 50% overhead in it.</p><h3><strong>Conclusion</strong></h3><p>In spite of some of the failures and breakdown of NameNode, Hadoop provides better way of handling fault tolerance. In this article, firstly, we saw the factors which resulted in the emergence of big data and the drawbacks of the old technology for storing and processing it. After that, we have seen the main components of HDFS and its functions. We have enlisted two different mechanisms to achieve fault tolerance in Hadoop and also explained them with suitable examples. We also discussed the advantages of Erasure Coding over Replication Mechanism. Fault tolerance is of great importance for Big Data Systems.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=35cc66b265ce" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[‘Linux vs. Windows’: Which is better, and why?]]></title>
            <link>https://payal-das.medium.com/linux-vs-windows-which-is-better-and-why-8fefae679ef9?source=rss-c855321e3b8c------2</link>
            <guid isPermaLink="false">https://medium.com/p/8fefae679ef9</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[windows]]></category>
            <category><![CDATA[operating-systems]]></category>
            <dc:creator><![CDATA[Payal Das]]></dc:creator>
            <pubDate>Fri, 21 Feb 2020 09:33:59 GMT</pubDate>
            <atom:updated>2020-02-28T04:17:54.684Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*kSMVNLhPjCKMz_vZ5cDeFg.png" /></figure><p>Before beginning with the comparison, let us know about operating systems.</p><blockquote><strong>A</strong>n <strong>Operating system</strong> is the primary software that manages all the hardware and other software on your computer. The operating system (also called as “OS”) connects to the computer’s hardware and provides services that can be used by applications.</blockquote><p><strong>Windows</strong> is a series of operating systems developed by Microsoft for personal desktops / devices or computers (PCs). Each operating system comes with a graphical user interface (GUI) with a desktop that allows users to view all files, videos, etc. It is designed to run on x86 hardware (e.g. AMD, Intel processors). Therefore, almost all companies that make PCs or laptops come with Windows OS.</p><p><strong>Linux</strong> is an open source operating system based on UNIX. This software is located underneath all other software on your computer. Because it is an open source operating system, users can modify existing code and create distributions from it. Linux is primarily used as a server- as most web pages on the Internet are generated from Linux servers.</p><p>Below are the comparisons between Linux vs. Windows on the basis of following factors from which we can understand better and thus shall know that which one is better.</p><blockquote><strong>1. Access:</strong></blockquote><p>• <strong>Linux</strong>- Users can access the source code of the kernel and change the code as needed. It has its own advantages, such as errors in the operating system are quickly fixed, but the disadvantage is that developers can take advantage of any weaknesses in the operating system after discovering any defects.</p><p>• <strong>Windows</strong>- Everyone cannot access the source code; only members of the selected group can access it.</p><blockquote><strong>2. Taste or variety:</strong></blockquote><p>• <strong>Linux</strong>- It comes in various distributions and can be highly customized based on user needs.</p><p>• <strong>Windows</strong>- It has few customization options available.</p><blockquote><strong>3. License:</strong></blockquote><p>•<strong>Linux</strong>- In Linux, with a GPL-licensed operating system, users are free to modify the software, reuse it in any number of systems, and even sell modified versions.</p><p>•<strong>Windows</strong>- In Windows, with a Microsoft license, users will not have access to the source code, which means that they cannot modify the software and are based on multiple licenses-we can only install on these number of computers.</p><blockquote><strong>4. Command line:</strong></blockquote><p>•<strong>Linux</strong>- The command line is a very useful tool for management and daily tasks, but it doesn’t make much difference to the end user.</p><p>•<strong>Windows</strong>- Here we have the command line but cannot be used as a Linux command line. We need to run and enter cmd, and then the command line will open.</p><blockquote><strong>5. Run level:</strong></blockquote><p>•<strong>Linux</strong>-It has built-in features that can be stopped at different run levels, and if someone encounters a problem, we can use the command line and GUI to operate.</p><ul><li><strong>Windows</strong>-If we encounter any issues to fix, we need to restart at run level 3 as administrator / root to find and resolve the issue.</li></ul><blockquote><strong>6. Availability:</strong></blockquote><p>• <strong>Linux</strong>- Complex installation, but it has the ability to easily complete complex tasks.</p><p>• <strong>Windows</strong>- This provides users with a simple system but takes longer to install.</p><blockquote><strong>7. Update:</strong></blockquote><p>•<strong>Linux</strong>- Users have full control over the updates; we can install them when needed, and spend less time without restarting.</p><p>•<strong>Windows</strong>- Updates occur at inconvenient times, for example, if you are printing a printer, but an update pop-up window appears suddenly, this may frustrate you and require more time to install.</p><blockquote><strong>8. Security:</strong></blockquote><p>•<strong>Linux</strong>- It is more secure than Windows, because it is difficult for hackers or virus developers to break through Linux.</p><p>•<strong>Windows</strong>- Windows is the main target of virus and malware developers, and it is most vulnerable to attack without antivirus software.</p><h3>These are some of the differences between Linux and Windows operating systems and as in my opinion; I feel that<strong> Linux has more advantages</strong> than Windows operating system.</h3><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8fefae679ef9" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>