<?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 Thenuja Sinthujan on Medium]]></title>
        <description><![CDATA[Stories by Thenuja Sinthujan on Medium]]></description>
        <link>https://medium.com/@Thenuja?source=rss-de7881d24746------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*GAP2KWXkYx8EteUEHl5teQ@2x.jpeg</url>
            <title>Stories by Thenuja Sinthujan on Medium</title>
            <link>https://medium.com/@Thenuja?source=rss-de7881d24746------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 04:08:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Thenuja/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[Stock price prediction using LSTM (Long Short-Term Memory)]]></title>
            <link>https://medium.com/analytics-vidhya/stock-price-prediction-using-lstm-long-short-term-memory-e8c125a853e4?source=rss-de7881d24746------2</link>
            <guid isPermaLink="false">https://medium.com/p/e8c125a853e4</guid>
            <category><![CDATA[rnn]]></category>
            <category><![CDATA[lstm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[stock-market]]></category>
            <category><![CDATA[machıne]]></category>
            <dc:creator><![CDATA[Thenuja Sinthujan]]></dc:creator>
            <pubDate>Sun, 07 Jun 2020 16:06:41 GMT</pubDate>
            <atom:updated>2020-06-13T17:26:24.466Z</atom:updated>
            <content:encoded><![CDATA[<p>In this article, I am going to show how to write python code that predicts the price of stock using Machine Learning technique that Long Short-Term Memory (LSTM).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*opzxrBna63YDbd8_pM5trw.png" /><figcaption><a href="https://www.google.com/url?sa=i&amp;url=https%3A%2F%2Fsundeeppothula1993.github.io%2FARTML%2F%2Fblog%2FAdaptive-Online-Learning-for-Stock-Price-Prediction%2F&amp;psig=AOvVaw3WQrHZLfZvMloxgwBWlUrc&amp;ust=1590901075825000&amp;source=images&amp;cd=vfe&amp;ved=0CA0QjhxqFwoTCODigMPm2ukCFQAAAAAdAAAAABAJ">Adaptive online learning for stock price prediction</a></figcaption></figure><h3>Algorithm Selection</h3><p>LSTM could not process a single data point. it needs a sequence of data for processing and able to store historical information. LSTM is an appropriate algorithm to make prediction and process based-on time-series data. It’s better to work on the regression problem.</p><p>The stock market has enormously historical data that varies with trade date, which is time-series data, but the LSTM model predicts future price of stock within a short-time period with higher accuracy when the dataset has a huge amount of data.</p><h3>Data set</h3><p>The historical stock price data set of <a href="https://finance.yahoo.com/quote/AAPL/">Apple Inc was gathered from Yahoo</a>! Financial web page. Which contains about stock prices from 2009–01–01 to 2020–04–20 with comma-separated value(.csv) format also it has a different type of price in a particular stock. By obtaining a data set, then come up with finalized characteristics and behavior of the stock prices. Seven features are obtained.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/570/1*N-diVnKJsoA2rr1c7jPR6Q.png" /></figure><h3>Description of each attribute</h3><p>Describe the attribute of the data set given below. Attribute values are in floating point expect to date and volume.</p><p><strong><em>Date</em>: </strong>— Trading date of the stock.</p><p><strong><em>Open</em>: </strong>— This price of stock’s opening price which means the very beginning price of particular trading day, but which is not be the same price of precious’s day ending price.</p><p><strong><em>High</em>: </strong>— This is the highest price of the stock on a particular trading day.</p><p><strong><em>Low</em>: </strong>— This is the lowest stock price during trade day.</p><p><strong><em>Close</em>: </strong>— This is the closing price of the stock during trade-in particular day.</p><p><strong><em>Adj Close:</em> </strong>— This is the ending or closing price of the stock which was changed to contain any corporations’ actions and distribution that is occurred during trade time of the day.</p><p><strong><em>Volume</em>: </strong>— This is the number of stocks traded on a particular day.</p><h3>Data pre-processing</h3><p>The first stage we need to import all necessary libraries. The gathered data set was read using the panda library in python and display the records for understanding the data set for pre-processing. At this point, we able to identify the behaviors and characteristics of the data set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/1*VTt_30yVirG0z6eUXiWR3w.png" /><figcaption>import libraries</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*ONNSSnLEd7cfTuDwhYE49Q.png" /><figcaption>First five rows of the data set</figcaption></figure><p>Visualizing given data into a plot graph format for growth and decrease behavior of stock prices. Besides only showing the changes in the closing price of the stock against that trading date. Other attributes are having stock prices, even though the close stock’s price is deciding the trading price of trading day. Matplotlib is the fabulous library in python for plotting any types of graphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_dWwhfSbc_odnFUW4Osm5A.png" /><figcaption>Visualization of the data set</figcaption></figure><h3>Normalization</h3><p>Feature scaling and normalizing data are the best way to reduce the error rate and improve the accuracy of the model. There are various types of data in a given data set. Here, I am putting all selected features on the same scale. Therefore, none of the features are dominating others. Below code, a snapshot is used to scale the data.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TDttJCg03Z3YuWd2uB0V2Q.png" /></figure><p>feature scaled data into tabular form. From this format, we could easily identify the trading rate of a particular rate. The feature scaling range should be between 0 and 1.</p><h3>Visualization of Feature Distribution.</h3><p>Below figure illustrates a visualization of the feature distribution. Through this graph, getting a better understanding of features and coefficient of the determination score. A heat map is created by over-index features. Here, we able to see the co-relation in between the given features of the data set such as <strong>Open</strong>, <strong>High</strong>, <strong>Low</strong>, <strong>Close</strong> and <strong>Adj Close. </strong>When we see at <strong>Volume</strong> point in heat map which is another feature but that does not show any correlation between other features. Therefore, it should be excluded in prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/787/1*DOyvbXIfidJidCe2kcvaOw.png" /><figcaption>Visualization of feature distribution</figcaption></figure><p>Extract the necessary feature, once it did then splitting data set into two parts training and testing. We never use the testing data for training. Below figure shows the code snapshot of splitting data for training.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/770/1*xlcp37PyMzW7HcmDSUJHfA.png" /></figure><p>Here, I extract the ‘Close’ price of the given scaled data frame. I have been separated 80 percentage data for model training and 20 percentage data for testing. 2275 samples using for training out of 2843 samples, remaining for testing and validation.</p><h3>Implementation of Algorithm</h3><p>Once finish the pre-processing stage let us move on to the implementation of LSTM algorithm. Before moving on that, create a training data set that contains the past six days close price of stock then predicts the close price of stock at day sixty-one. Split the training data set into two parts <em>Xtrain</em> and <em>Ytrain</em>. Here, <em>Xtrain</em> dataset is an independent dataset and <em>Ytrain</em> data set is a dependent data set.</p><p>Convert the Xtrain and Ytrain data set into <strong>NumPy</strong> array because it will take for training the LSTM model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*Ywbq_GnOCVF9YyqVtKKSGA.png" /></figure><p>LSTM model has a 3-Dimensional data set [number of samples, time steps, features]. Therefore, we need to reshape the data from 2-Dimensional to 3-Dimensional. (NumPy array has 2-dimensional data). Below the code, snapshot illustrates a clear idea about reshaping the data set.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*q54Vr8QIh60TbSInm7QU0Q.png" /></figure><p>Create the LSTM model which has two LSTM layers that contain fifty neurons also it has 2 Dense layers that one layer contains twenty-five neurons and the other has one neuron. In order to create a model that sequential input of the LSTM model which creates by using Keras library on DNN (Deep Neural Network).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*2441pA1B31a9L7jW8AQvCQ.png" /></figure><p>The compile LSTM model is using MSE (Mean Squared Error) for loss function and the optimizer to be the “adam”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*TPZBL1rN3W_DBv0zidagvA.png" /></figure><p>In order to train a LSTM model by using the created training data set. Here, fit the trained model with a batch- size that is a number of training examples that present a single batch, epochs are another parameter which means the number of iteration in the train model, if the epoch value is increasing then you will get the much accuracy of your model output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1022/1*DWMbvoKHxOCda6xZbJ0xjg.png" /></figure><h3>Testing</h3><p>In this testing stage, test the created model. Here, we are going to get the stock close price of the next day of Apple Inc. it will be 21–04–2020. (Training data set values contain between 2009–01–01 and 20–04–2020).</p><p>We have to create an empty array list and assigned the last sixty days close price data into it. Convert that array list into <strong>NumPy</strong> and again reshape the data. It will be the input data of the model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0NKv-hsRfoQQeB3c72PDVg.png" /></figure><p>Get actual price of the stock at particular trading day from Yahoo Finance page directly.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*biDmrYXQfyvKPeO4Aw2Vwg.png" /></figure><h3>Result and Discussion</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*CZFBgoxizwYCZpSfslgx0g.png" /><figcaption>Predicting Stock Price Vs trading day</figcaption></figure><p>Above the plot graph shows the result of predicting stock price against the trading day. Here, validation and prediction are much the same. Obtained the error rate of the training model is specified as Root Mean Squared Error (RSME) which is 6.65%. it evaluates the prediction accuracy.</p><h3>Conclusion</h3><p>We should follow below strategies to increase the accuracy of the model in the Long-Short Term Memory (LSTM) algorithm.</p><ul><li>Allocating more time-series data for training and testing (80% and 20%). It is a very important strategy to get higher accuracy results.</li><li>Feature Scaling and Normalizing data to represent the independent features into a fixed range. Here, I put all the features on the same scale.</li><li>Identifying the most important features from the given data set before training. It would be increasing the accuracy of the model.</li></ul><p>I hope every one get clear understanding of stock price prediction using machine learning. Here, I share my gits <a href="https://github.com/SThenuja/ML">repository</a> with you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e8c125a853e4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/analytics-vidhya/stock-price-prediction-using-lstm-long-short-term-memory-e8c125a853e4">Stock price prediction using LSTM (Long Short-Term Memory)</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>
        <item>
            <title><![CDATA[Fundamentals of AWS (Amazon Web Services)]]></title>
            <link>https://medium.com/@Thenuja/fundamentals-of-aws-amazon-web-services-40d806e32ffb?source=rss-de7881d24746------2</link>
            <guid isPermaLink="false">https://medium.com/p/40d806e32ffb</guid>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-instance]]></category>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[aws-lambda]]></category>
            <dc:creator><![CDATA[Thenuja Sinthujan]]></dc:creator>
            <pubDate>Wed, 13 May 2020 05:58:16 GMT</pubDate>
            <atom:updated>2020-06-02T16:08:03.033Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3PTrJei3zFAylve2qnUglg.png" /><figcaption>Amazon Web Service (AWS)</figcaption></figure><p>In this tutorial we are going to learn about basic concept and infrastructure of Amazon Web Service (AWS) and cloud computing.</p><p><strong>What Is Cloud Computing?</strong></p><p><a href="https://aws.amazon.com/what-is-cloud-computing/">Cloud computing</a> is the on-demand delivery of compute power, database storage, applications, and other IT resources through a cloud services platform via the internet with pay-as-you-go pricing. Below six Advantages and Benefits of Cloud Computing.</p><ul><li>Trade capital expenses for variable expense</li><li>Benefit from massive economies of scale</li><li>Stop guessing capacity</li><li>Increase speed and agility</li><li>Stop spending money on running and maintaining data centers</li><li>Go global in minutes</li></ul><p><strong>Deployment Models</strong></p><p>There is a range of deployment models, from all on-premises to fully deployed in the cloud. Many users begin with a new project in the cloud, and they might integrate some on-premises applications with these new projects in a hybrid architecture. They might decide to keep some legacy systems on-premises. Over time, they might migrate more and more of their infrastructure to the cloud, and they might eventually reach an all-in-the-cloud deployment. Besides divide cloud computing into three <a href="https://aws.amazon.com/types-of-cloud-computing/">types</a> such as IaaS, PaaS, SaaS.</p><p><strong>Products and Services</strong></p><p>AWS offers a broad set of global cloud-based <a href="https://aws.amazon.com/products/">products</a>, including compute, storage, databases, analytics, networking, mobile, developer tools, management tools, Internet of Things (IoT), security, and enterprise applications.</p><p><strong>AWS Partner Network (APN)</strong></p><p>APN Partners are focused on your success, and they help customers take full advantage of all the business benefits that AWS has to offer. If you want know more details about accessing the AWS Partner Network or becoming an AWS Partner <a href="https://aws.amazon.com/partners/">click here</a>.</p><p><strong>AWS Marketplace</strong></p><p>The <a href="https://aws.amazon.com/marketplace">AWS Marketplace</a> is a digital catalog with thousands of software listings from independent software vendors, where you can find, test, buy, and deploy software to run on AWS. These offerings can range from simple web server applications to security, networking business intelligence, databases, DevOps, and media. Many of these applications offer pay-as-you-go or Bring Your Own License (BYOL) models.</p><p><strong>AWS Cloud Infrastructure</strong></p><p>The AWS Cloud infrastructure is built around Regions and Availability Zones. AWS Regions provide multiple, physically separated, and isolated Availability Zones that are connected with low latency, high throughput, and highly redundant networking.</p><p>As of the time of publication, the AWS Cloud spans 55 Availability Zones within 18 geographic Regions and 1 Local Region around the world. There are announced plans for 15 more Availability Zones and five more Regions in Bahrain, Hong Kong SAR, Sweden, and South Africa; and a second AWS GovCloud Region in the US.</p><blockquote>Simple explain with an example: There is a<em> Local Region</em> in Osaka, Japan (<strong>Osaka-Local</strong>). An AWS Local Region is a single data center that is designed to complement an existing AWS Region. It is available to select AWS customers who request access. Customers who want to use the Asia Pacific (Osaka) Local Region should speak with their sales representative. Like all AWS Regions, AWS Local Regions are completely isolated from other AWS Regions. Go through for <a href="https://aws.amazon.com/about-aws/global-infrastructure/">more current information</a> about global infrastructure.</blockquote><p>Each AWS Region has multiple, isolated locations that are known as Availability Zones. Amazon Relational Database Service (Amazon RDS) provides you with the ability to place resources (such as instances) and data in multiple locations. Resources aren’t replicated across AWS Regions unless you do so specifically. If you want to more about detailed information of Availability Zones read this <a href="https://docs.aws.amazon.com/AmazonRDS/latest/UserGuide/Concepts.RegionsAndAvailabilityZones.html">website</a>.</p><p>Below the capture explains build a Social Media application (Facebook) with Amazon Web Services (AWS) instances.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pQUGEElHFAqfShOdu4HyCQ.png" /><figcaption>Infrastructure of Facebook application</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yqso5l7swsQAeJd-b9DcKg.png" /><figcaption>Infrastructure of Facebook application on AWS</figcaption></figure><h3><strong>AWS compute service</strong></h3><p>Building and running your application starts with compute, whether you are building enterprise, cloud-native, or mobile applications; or running massive clusters to sequence the human genome. AWS offers a comprehensive portfolio of compute services that allow you to develop, deploy, run, and scale your applications and workloads in the world’s most powerful, secure, and innovative compute cloud. Details about the full range of AWS compute services can be found <a href="https://aws.amazon.com/products/compute/">here.</a> Later in my next tutorial, you will learn about both Amazon Elastic Compute Cloud (Amazon EC2) and Amazon Light sail. See those sections for <a href="https://aws.amazon.com/products/compute/">more details</a>.</p><p>Both server-less computing and container services are beyond the scope of this class. We will cover these topics in subsequent courses, but the following descriptions provide an introduction to some of the key services for server-less computing and containers.</p><p><strong>AWS Lambda</strong></p><p>AWS <a href="https://aws.amazon.com/lambda/">Lambda</a> lets you run code without provisioning or managing servers. You pay only for the compute time you consume — there is no charge when your code is not running. We can run code for virtually any types of application or back end service all zero administration.</p><p><strong>AWS Container Services</strong></p><p><a href="https://aws.amazon.com/ecs/">Amazon Elastic Container Service</a> (Amazon ECS) is a highly scalable, high-performance container orchestration service that supports Docker containers. It allows you to run and scale containerized applications on AWS. <a href="https://aws.amazon.com/eks/">Amazon Elastic Container Service for Kubernetes</a> (Amazon EKS) makes it straight forward to deploy, manage, and scale containerized applications that use Kubernetes on AWS. <a href="https://aws.amazon.com/fargate/">AWS Fargate</a> is a compute engine for Amazon ECS and Amazon EKS that allows you to run containers without having to manage servers or clusters. Note that before you use any of these services, you should check whether they are eligible for the <a href="https://aws.amazon.com/free/?all-free-tier.sort-by=item.additionalFields.SortRank&amp;all-free-tier.sort-order=asc">AWS Free Tier</a>.</p><p><strong>Amazon Elastic Compute Cloud (EC2)</strong></p><p>Now that we are going to discuss at a high level what compute services AWS has to offer. <a href="https://aws.amazon.com/ec2/">Amazon Elastic Compute Cloud</a> (Amazon EC2) is a web service that provides secure and re-sizable compute capacity in the cloud. It is designed to make web-scale cloud computing easier for developers. Amazon EC2 presents a true virtual computing environment, and it allows you to use web service interfaces to launch instances with a variety of operating systems, load them with your custom application environment, manage your network’s access permissions, and run your image by using as many or few systems as you want.</p><p>Besides, Amazon EC2 provides a wide selection of <a href="https://aws.amazon.com/ec2/instance-types/">instance types</a> that are optimized to fit different use cases. Instance types comprise varying combinations of CPU, memory, storage, and networking capacity. They give you the flexibility to choose the appropriate mix of resources for your applications. Each instance type includes one or more instance sizes, which allows you to scale your resources to the requirements of your target workload.</p><p><strong>Amazon Lightsail</strong></p><p>Amazon Lightsail is the easiest way to get started with AWS for developers, small businesses, students, and other users who need a simple virtual private server (VPS) solution. Lightsail provides developers compute, storage, and networking capacity, and it also provides capabilities to deploy and manage websites and web applications in the cloud. Lightsail includes everything you need to launch your project quickly — a virtual machine, solid state drive (SSD)-based storage, data transfer, Domain Name System (DNS) management, and a static IP — for a low, predictable monthly price.</p><p>A more detailed introduction from AWS re: Invent 2019. Keynote is available here:</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F7-31KgImGgU%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D7-31KgImGgU&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F7-31KgImGgU%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/467d258530b00ee2c981115b8f59d0ae/href">https://medium.com/media/467d258530b00ee2c981115b8f59d0ae/href</a></iframe><p>Note that pricing has changed (decreased) since this video was created. Specific details are on the Lightsail web page. Check for details on Lightsail and the <a href="https://aws.amazon.com/lightsail/">30 day trial</a>. Also the Lightsail pricing <a href="https://aws.amazon.com/lightsail/pricing">here</a>. Hope every one gets clear under standing of cloud computing and fundamental of Amazon Web Service (AWS).</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40d806e32ffb" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>