<?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 Rohan Sawant on Medium]]></title>
        <description><![CDATA[Stories by Rohan Sawant on Medium]]></description>
        <link>https://medium.com/@rohansawant7978?source=rss-30110933211e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cwzsv01OWd8mURrpu5a7-A.png</url>
            <title>Stories by Rohan Sawant on Medium</title>
            <link>https://medium.com/@rohansawant7978?source=rss-30110933211e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 07:24:51 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rohansawant7978/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[Grammatical Error Correction using Deep Learning]]></title>
            <link>https://medium.com/@rohansawant7978/grammatical-error-correction-using-deep-learning-ad53044c0977?source=rss-30110933211e------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad53044c0977</guid>
            <dc:creator><![CDATA[Rohan Sawant]]></dc:creator>
            <pubDate>Tue, 30 Nov 2021 03:59:03 GMT</pubDate>
            <atom:updated>2021-11-30T04:18:13.164Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/498/0*KYtAiVdVWiPmRlvp.gif" /><figcaption>Ref: <a href="https://www.pinterest.com/pin/77827899784823723/">1. You correct other people’s grammar.</a></figcaption></figure><h3>Table of content</h3><ol><li>Introduction</li><li>Business problem Formulation</li><li>DL problem formulation</li><li>Data Collection</li><li>Data Cleaning &amp; Exploratory Data Analysis</li><li>Data preparation for model</li><li>Model Training</li><li>Post Training Analysis</li><li>Deployment</li><li>Future work</li><li>References</li></ol><h3>1. Introduction</h3><p>We have always found it quirky when Ross Geller from F.R.I.E.N.D.S. corrected grammar errors of people surrounding him. Although it was intimidating for his friends at times, but this is definitely very useful in day-to-day tasks be it writing a mail, an article or professional chats. In fact, while writing this article, I have got 2 to 3 browser add-ons for grammar correction.</p><p>Natural language processing is a subfield of Deep learning concerned with the interactions between computers and human language, i.e., making computers understand human languages similar to programming languages like python, C, Java, etc. Typical NLP problems are like machine translation, Named Entity recognition, Part of Speech tagging.</p><p>In this article, we explore how grammatical correction can be achieved using neural networks. Grammatical error correction is a problem similar to machine translation where given an input ‘x’ of length ‘i’ the output ‘y’ is a sentence of length ‘j’.</p><h3>2. Business Problem Formulation</h3><h4>2.1 Problem Statement</h4><p>This is a problem of grammatically detecting grammar errors in the input sequence and providing the correct sentence as output.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/823/1*bQW8HMxP3k2tD-Am2MfwEA.png" /><figcaption>Incorrect and Correct Sentences Overview</figcaption></figure><h4>2.2 Business Applications</h4><p>This can be used as a browser add-on which will detect any possible text input from any website, e.g., Email, article writing websites, etc.</p><p>It can be incorporated with various document creating applications such as Microsoft Word, Google Docs, etc.</p><h3>3. DL problem formulation</h3><p>In NLP problem statement context, Grammatical error correction is a sequence to sequence problem. Here, the input will be an erroneous sentence and the output will be a correct sentence. Such problems are solved using encoder decoder model architecture.</p><p>In layman terms, encode takes an input sentence and represents it in some vector which consists of number. The decoder takes this encoded vector as input and attempts to provide the output sentence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*X8n1Cb-iwmdagJAiV1sFyA.png" /><figcaption>Encoder Decoder Architecture</figcaption></figure><p>We are trying to minimize Categorical Cross-Entropy loss.</p><p>We will measure the performance of the model by GLEU (Generalized Language Understanding Evaluation) score. It is a variant of BLEU proposed for evaluating grammatical error corrections using n-gram overlap with a set of reference sentences which is calculated as follows,</p><p>1. All sub-sequences of 1, 2, 3 or 4 tokens in output and target sequence (n-grams) are recorded.</p><p>2. Then recall is calculated as number of matching n-grams<br> to the number of total n-grams in the target (ground truth) sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*nxkae5umMz0mG7cAqUoH5g.png" /><figcaption>Recall Formula</figcaption></figure><p>3. Then precision is computed as a ratio of the number of matching n-grams<br> to the number of total n-grams in the generated output sequence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/584/1*TyezjvFWwPfcyZm7Ma0EFQ.png" /><figcaption>Precision Formula</figcaption></figure><p>4. GLEU score is minimum of recall and precision. Its range is always between 0 (no matches) and 1 (all match).</p><h3>4. Data Collection</h3><p>We are using lang-8 dataset, which can be procured from <a href="https://sites.google.com/site/naistlang8corpora/">NAIST Lang-8 Learner Corpora.</a> To download, it has to be collected from <a href="https://docs.google.com/forms/d/17gZZsC_rnaACMXmPiab3kjqBEtRHPMz0UG9Dk-x_F0k/viewform?edit_requested=true">Download Form of the NAIST Lang-8 Learner Corpora.</a></p><p>The data is in “m2” file format. First line(Starting with S) is the incorrect sentence and second line (Starting with A) are annotated sentence or a correct sentence.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*zObSNlfTYf-YCWuH6NVm_A.png" /><figcaption>M2 file overview</figcaption></figure><p>Above data has to be converted into pandas dataframe format for subsequent processing. The following code snippet converts m2 file to pandas dataframe. The code is referred from <a href="https://www.cl.cam.ac.uk/research/nl/bea2019st/data/corr_from_m2.py">here</a>.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d33f7b8dbf45214c0ee326c586112054/href">https://medium.com/media/d33f7b8dbf45214c0ee326c586112054/href</a></iframe><h3>5. Data Cleaning &amp; Exploratory Data Analysis</h3><h4>5.1 Data Cleaning</h4><p>In this step, all missing and duplicate rows were removed. We also removed all rows where input and output sequences were the same. Additionally, sentences having word count less than 2 were removed.</p><p>After reducing size of dataset, preprocessing steps such as de-contraction, removing special characters were performed.</p><h4>5.2 Univariate Analysis</h4><p><strong>5.2.1 Character count of correct sentences</strong></p><p>The following plots show KDE and percentile distribution of length of correct sentences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*thVl6JdKMHdgv30thR4Kjg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*VVuldE82miP_m0xbGQ7C4w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/868/1*pbFJ4s1_kj8hzzYdnAADDQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/825/1*EUmoadzv0y4vMAQarBwo7A.png" /></figure><p><strong>5.2.2 Character count of incorrect sentences</strong></p><p>The following plots show KDE and percentile distribution of length of incorrect sentences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7xfGtvIZsovGfW4x8ejmLg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3n7NGRUHWkdpntgiFcLIjA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/888/1*TTMH6xjw3h-ZouROsE-ojA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/818/1*4nRKBlRjP3lAy8RupdWAwQ.png" /></figure><p><strong>5.2.3 Word count of correct sentences</strong></p><p>The following plots show KDE and percentile distribution of word count for correct sentences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I9HY2Jj6fPBtzGm8jOQ3QQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IDaXZ2nQGuBdH3hqkR0u4Q.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/773/1*W_L8HCYNoksvdgmUPg5R3g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/772/1*b954kNDCIlQV9eFKr-Tqeg.png" /></figure><p><strong>5.2.4 Word count of correct sentences</strong></p><p>The following plots show KDE and percentile distribution of word count for incorrect sentences.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I9HY2Jj6fPBtzGm8jOQ3QQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7mVHVoooIndyXGYwq4juGg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/793/1*GvrBYChLMqlYlrs11NayFA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/777/1*UQgd9HD65BIVRzG2kSocbw.png" /></figure><h4>Observations</h4><ol><li>The character distribution for correct and incorrect sentences shows mostly character length is between 50 and 80.</li><li>The word count distribution tells most sentences are having 12 to 37 words.</li><li>The distributions are heavily skewed, which indicates there are extreme outliers present.</li></ol><h4>5.3 Bivariate Analysis</h4><p><strong>5.3.1 Correct sentence character count vs Incorrect sentence character count</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/619/1*pbOAbub1CpxDI0lVEHWPhg.png" /></figure><p><strong>5.3.2 Correct sentence word count vs Incorrect sentence word count</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/613/1*9kCGvYNlYM55EUv92tfrvg.png" /></figure><h4>Observations</h4><ol><li>The character lengths and word counts for correct and incorrect sentences shows a very linear correlation with each other, which tells distributions for correct and incorrect sentences are closely similar to each other.</li><li>Prima facie, we can state that there are not heavy edits made while correcting the sentence.</li></ol><h4>5.4 Stop word Analysis</h4><p>Stop words are the most commonly used words in any language such as <em>“the”,” a”,” an</em>” etc. As these words are probably small, these words may have caused the above graph to be skewed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nohEFSd5ZesfUYp8N-7Nkg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NjkylBkLC_P4cTU63VRawA.png" /></figure><h4>Observations</h4><ol><li>Around 46% of stop words are to, the, is, a, and, in, of, my, not and it where the distribution lies from 2.57% to 7.96% in both correct and incorrect sentences.</li></ol><h4>5.5 Word Cloud</h4><p>A word cloud represents an input corpus such that the size and color of each word indicate its frequency or importance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*tngr2XLYa59gwuvMWK9XqQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*MwQk0yPP4sIqbY7yFDDCHQ.png" /></figure><h4>Observations</h4><ol><li>We can observe words like But, Also, elderly, One, need, Japan, think are frequently used words in Correct &amp; Incorrect Sentence</li></ol><h4>5.7 Sentiment analysis</h4><p>Sentiment analysis is used for determining if the text is positive, negative, or neutral<strong>.</strong> We have used Textblob library for calculating the polarity scores.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/608/1*HJp4uJbiwJukbjwSHystTg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*TqBIo5anfEjn-8UNK1a7Jw.png" /></figure><h4>5.8 Text complexity using Flesch Reading Ease (FRE)</h4><p>FRE score represents readability of the text. The score is interpreted as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*vqzdexhfA0JOuO6K32xbPg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EwDO9e7Ri7ZTtLlDeEKoQg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9md6-WEJySNYKuYvDpDbCg.png" /></figure><h4>Observations</h4><ol><li>Around 67 % of the text is categorized as suitable for above 5th grade or FRE score above</li></ol><h3>6. Data preparation for model</h3><h4><strong>6.1 Start and End token to decoder input and output</strong></h4><p>As we will be using encoder decoder architecture for modelling. For decoder, the data has to be prepared as follows.</p><p>The ground truth will be sent as input to the decoder with ‘&lt;start&gt;’ token added at beginning, and the output will be ground truth with ‘&lt;end&gt;’ token added at the end. This is called at teacher forcing technique where we are giving ground truth as input to decoder along with states learned by encoder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/595/1*FGNuvZi1cXm1lhTKVUNRVw.png" /><figcaption>Decoder Overview</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/3f13ba4cdd07eabea87874ce80e485f7/href">https://medium.com/media/3f13ba4cdd07eabea87874ce80e485f7/href</a></iframe><h4>6.2 Tokenizing and padding</h4><p>The raw text data can’t be directly sent to the model. The model will accept the numerical representation of text. We have to first tokenize the data so that each unique word in the corpus gets an unique representation. This will be performed using TensorFlow tokenizer API.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b0b32bcb4732f1e6adf28825ac37fab/href">https://medium.com/media/0b0b32bcb4732f1e6adf28825ac37fab/href</a></iframe><p>Here, encoder tokenizer is learning from incorrect sentence corpus and decoder tokenizer is learning from correct sentences. There are 51949 words represented by encoder tokenizer and 43124 in decoder tokenizer.</p><h3>7. Model Training</h3><h4>7.1 Encoder Decoder</h4><p>The model architecture consists of LSTM, GRU, RNN. The encoder takes incorrect sentence as input and represents it in form of hidden and cell state. While initiating the decoder model which also consists of LSTM, GRU or RNN cells, the encoder representation is fed along with ground truth. Given ‘&lt;start&gt;’ token, it attempts to predict the next word in the sentence. It iteratively tries to minimize the loss and updating weights.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/940/1*X8n1Cb-iwmdagJAiV1sFyA.png" /><figcaption>Encoder Decoder Architecture</figcaption></figure><blockquote>GLEU Score-0.226</blockquote><h4>7.2 Attention mechanism</h4><p>Attention mechanism is incorporated with neural networks to replicate human behavior of grasping and transforming information. While correcting any sentence grammatically, we will focus on a specific part of the sentence which needs “Attention” while correcting it. E.g., while correcting sentence “I had a English class” we will focus on “a” as in the context of word “English” It should be “an”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/905/0*zSdwFQp-je8nOSrS.JPG" /><figcaption>Ref- <a href="https://blog.floydhub.com/attention-mechanism/">https://blog.floydhub.com/attention-mechanism/</a></figcaption></figure><p>The encoder part remains the same as in encoder decoder architecture. In the decoder, for every time step we compute a context vector which holds relevant information from the encoder such that more weight will be given to the states of words to which more attention should be given. It is calculated as follows,</p><ol><li>First, we compute all encoder hidden states(ht) and all decoder hidden states till previous time step(hs), and we calculate attention scores. Following formula is basically a softmax formula which makes sure the attention values ranges from 0 to 1 and has probabilistic representation. For this case study we have implemneted “Dot” scoring function.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/360/0*vclqn6Qf8VEZqT1L.png" /></figure><p>There are following ways for calculating the score provided by Luong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/488/0*OP5d_ACb40pqfdi3.png" /></figure><p>2. Once we compute the attention scores we calculate context vector by multiplting encoder hidden states with attention scores.</p><p>3. For decoder input at time step ‘t’ , the context vector and output state from at previous time step ‘t-1’ is concatenated.</p><p>4. This process is iteratively repeated till it reached &lt;end&gt; token.</p><blockquote>GLEU Score-0.412</blockquote><h3>8. Post Training Analysis</h3><p>Now we will analyze the best model’s predictions and correspond GLEU score.</p><h4>8.1 Box Plot and percentile values of GLUE Score</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_b9nz4c7xMfGSX8VCO_EsQ.png" /><figcaption>Box Plot of GLEU Score</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MxXzdqOS6rsh8ovmVS7grg.png" /></figure><h3>Observations</h3><ol><li>Min &amp; Max GLEU score is 0 &amp; 1</li><li>Median GLEU score is 0.346 whereas IQR ranges from 0.20 to 0.529</li></ol><p>Now we will divide the data into 3 sub datasets: low, medium and high score predictions. All the sentences having GLEU score less than 0.3 were considered in low dataset. The scores between 0.3 and 0.6 is in medium dataset. All scores more than 0.6 are considered as high score.</p><h4>8.2 Count plot of word count</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dG_VYquinFx8lhQ9bNMJ_g.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*b8Senzjm3QOvh9M-5Fnyjw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ox8nhfIoQl99JOYVfk9yjw.png" /></figure><p>As the word count in a sentence increase, the metric drops. We can observe maximum sentences in low score dataset has word count of 11 or 12. For medium score dataset, Maximum files are around 9. In case of high score dataset, most files belong word count of 8 or 9.</p><h4>8.3 Word Cloud</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*ZgxPp-daWRnPa-OYeXMgPA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*xR-LhGJztGTaOkGqDPHJuQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*a7dvUUE0cbtfRbppAD1e0Q.png" /></figure><h3>9. Deployment</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOZ8g8BnM8BI%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOZ8g8BnM8BI&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOZ8g8BnM8BI%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/cd38b1dbfe169b4755d68978bc2a755a/href">https://medium.com/media/cd38b1dbfe169b4755d68978bc2a755a/href</a></iframe><p>Github Repository-</p><p><a href="https://github.com/rohansawant7978/grammar_correction">GitHub - rohansawant7978/grammar_correction</a></p><p>Linkedin Profile-</p><p><a href="https://www.linkedin.com/in/rohan-sawant7978/">Rohan Sawant - Data Scientist - Krisopia | LinkedIn</a></p><h3>11. Future Work</h3><ol><li>We can attempt to improve the score further by using other attention mechanisms</li><li>Training model with more diverse dataset.</li><li>Transformer based models can be utilized.</li></ol><h3>10. References</h3><ol><li><a href="https://www.appliedaicourse.com/">Applied AI Course</a></li><li><a href="https://towardsdatascience.com/word-level-english-to-marathi-neural-machine-translation-using-seq2seq-encoder-decoder-lstm-model-1a913f2dc4a7">Word Level English to Marathi Neural Machine Translation using Encoder-Decoder Model | by Harshall Lamba | Towards Data Science</a></li><li><a href="http://Intuitive Understanding of Attention Mechanism in Deep Learning | by Harshall Lamba | Towards Data Science">Intuitive Understanding of Attention Mechanism in Deep Learning | by Harshall Lamba | Towards Data Science</a></li><li><a href="https://docs.google.com/forms/d/e/1FAIpQLSflRX3h5QYxegivjHN7SJ194OxZ4XN_7Rt0cNpR2YbmNV-7Ag/viewform">Lang-8 Corpus of Learner English Dataset</a></li><li><a href="https://arxiv.org/pdf/1508.04025.pdf">https://arxiv.org/pdf/1508.04025.pdf</a></li><li><a href="https://blog.floydhub.com/attention-mechanism/">Attention Mechanism</a></li><li><a href="https://neptune.ai/blog/exploratory-data-analysis-natural-language-processing-tools">Exploratory Data Analysis for Natural Language Processing: A Complete Guide to Python Tools — neptune.ai</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad53044c0977" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Forecasting of Bitcoin price using Machine Learning & Deep Learning techniques.]]></title>
            <link>https://medium.com/@rohansawant7978/forecasting-of-bitcoin-price-using-machine-learning-deep-learning-techniques-93bf662f46ab?source=rss-30110933211e------2</link>
            <guid isPermaLink="false">https://medium.com/p/93bf662f46ab</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[deep-learning]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Rohan Sawant]]></dc:creator>
            <pubDate>Wed, 22 Sep 2021 15:54:07 GMT</pubDate>
            <atom:updated>2021-10-12T07:39:52.825Z</atom:updated>
            <content:encoded><![CDATA[<h3>Bitcoin price prediction using Machine Learning</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dKeQbf8VjwWtRSoSxdrCsw.jpeg" /><figcaption>Ref-<a href="https://currency.com/bitcoin-price-analysis-march-23-to-29">https://currency.com/bitcoin-price-analysis-march-23-to-29</a></figcaption></figure><h3>Table of content</h3><ol><li>What is Bitcoin?</li><li>Problem Statement</li><li>Performance metrics</li><li>Data Collection</li><li>Exploratory Data Analysis (EDA)</li><li>Feature Engineering</li><li>Feature Scaling</li><li>Feature Selection</li><li>Training Methodology</li><li>Model Training</li><li>Deployment</li><li>References</li><li>Future Work</li></ol><h3><strong>1. What is bitcoin?</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tYiAYfV53a9TwktN.png" /><figcaption>Ref-<a href="https://theblockpro.com/what-is-bitcoin/">https://theblockpro.com/what-is-bitcoin/</a></figcaption></figure><p>Bitcoin is a decentralized digital currency without any central administrator and can be sent directly from user to user on the bitcoin network. Network nodes verify transactions through cryptography and are recorded in a public distributed ledger called a blockchain which also track ownership, prevent tampering of transaction records, prevent double spending.</p><p>Bitcoin gains value based on the community involvement. i.e. Demand and Supply. Currently, demand is more than supply, which impacts price and increases volatility. E.g., In Jan 2017 prices were around 1000 USD which later increased to 16000 USD by December 2017. Then it again saw some gain and fall, but in recent times the prices skyrocketed to 63000 USD.</p><h3><strong>2. Problem Statement.</strong></h3><p>One of the main problems with bitcoin is price volatility, which indicates the need for studying the underlying price model.</p><p>This case study is based on <a href="https://link.springer.com/content/pdf/10.1007/s00521-020-05129-6.pdf">Time-series forecasting of Bitcoin prices</a>. The paper considered bitcoin data from April 2013 to December 2019. It proposed this as both regression and classification problem. For regression the paper was predicting prices &amp; for classification task where an attempt was made to predict increase/decrease in price. It was performed to predict next day, 30th day &amp; 90th day price.</p><p>In this case study, we attempt to predict next day prices based on features of previous day using machine learning &amp; deep learning regression algorithms.</p><h3><strong>3. Performance Metrics.</strong></h3><p>As the target variable is highly volatile, we want to penalize the model when the error is higher. Root Mean Squared Error (RMSE) squares the errors before averaging, and thus RMSE gives a relatively high weight to large errors. We have also considered Mean Absolute Error (MAE) because of its easy interpretability.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*JaeMyJnMogh9-RZhxsLytw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/434/1*C5b1RW5QoMjdWJEQlW-_UQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/541/1*zhFxG8COCbgy7TiQ9Yuq8Q.png" /><figcaption>Metrics</figcaption></figure><h3><strong>4. Data Collection &amp; Imputation</strong></h3><h4>4.1 Web Scraping using <a href="https://bitinfocharts.com/comparison/bitcoin-price.html#alltime">bitinfocharts.com</a></h4><p>Bitinfocharts provides following 17 raw features. The features were retrieved using a custom python script.</p><p><strong>i) Number of transactions in blockchain per day</strong></p><p>Bitcoin transactions are messages digitally signed using cryptography and sent to the entire Bitcoin Network for verification. The number of daily transactions highlights the value of the Bitcoin network to securely transfer funds.</p><p><strong>ii) Average block size (KB)</strong></p><p>Blocks are files which permanently records most recent transactional information related to the Bitcoin network. It cannot be altered or removed after writing. Each time a block is ‘completed’, the next block comes in the blockchain. The maximum block size is currently set at 1 megabyte.</p><p><strong>iii) Number of sent by addresses</strong></p><p>These are distinct addresses from which payments are made every day.</p><p><strong>iv) Number of active addresses</strong></p><p>These are number of unique addresses taking part in a transaction by either sending or receiving Bitcoins.</p><p><strong>v) Average mining difficulty (Hash/day)</strong></p><p>It reflects how difficult the proof of work calculation with respect to the difficulty value set at the beginning (1). A higher difficulty means that it will take more computing power to mine the same number of blocks, making the network more secure against attacks. The difficulty is adjusted every 2016 blocks (every 2 weeks approximately) so that the average time between each block remains 10 minutes. It is increased if a greater number of blocks are being created within a 2-week period, and will be reduced if less blocks are created.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/804/1*YBg0VV1Cu6bwkCQj8XGhlg.png" /><figcaption>Mining Difficulty Formula</figcaption></figure><p><strong>vi) Average hash rate (hash/s)</strong></p><p>Hash rate is a measure of the mining computational power per second used. It is measured as how many calculations per second can be performed. Machines with a high hash power are highly efficient and can process a lot of data in a single second.</p><p><strong>Vii) Mining Profitability (USD)</strong></p><p>It is mining profitability for 1 Hash/s</p><p><strong>Viii) Sent coins (USD)</strong></p><p>It is the total value of Bitcoins sent daily.</p><p><strong>ix) Average &amp; Median transaction fee (USD)</strong></p><p>Each transaction can have a transaction fee determined by the sender and paid to miners who verify the transaction. Transactions with higher fees reward the Bitcoin miners to process them sooner than transactions with lower fees.</p><p><strong>x) Average block time (minutes)</strong></p><p>Block time is the time required to create the next block in a chain. It is a time taken by a blockchain miner to find a solution to the hash. Usually, it is around 10 minutes, but can fluctuate depending on the hash rate of the network.</p><p><strong>xi) Average &amp; Median Transaction Value (USD)</strong></p><p>The average &amp; median value of the transactions in Bitcoin</p><p><strong>xii) Tweets &amp; Google Trends to “Bitcoin” per day</strong></p><p>Number of tweets &amp; google trends. These features represent impact of social media on bitcoin price.</p><p><strong>xiii) Average Fee Percentage in Total Block Reward</strong></p><p>Bitcoin block rewards are new bitcoins awarded to miners for being the first to solve a complex math problem and creating a new block of verified bitcoin transactions. Rewards were started at 50 BTC and it halves every 210,000 blocks. The current reward lies at 6.25. This feature is the ratio of the fee sent in a transaction to the reward for verifying that transaction by the other users.</p><p><strong>xiv) Top 100 Richest Addresses to Total coins</strong></p><p>This is the ratio between top 100 rich addresses to total coins.</p><h4>4.2 Using Quandl</h4><p>Following Two Features were collected using Quandl API</p><p><strong>i) Miner Revenue (USD)</strong></p><p>Total value of coin base block rewards and transaction fees paid to miners.</p><p><strong>ii) Number of coins in circulation</strong></p><p>It is a total number of mined bitcoins that are currently circulating on the network. The total supply of BTC is limited to 21 million.</p><h4>4.2 Using investpy</h4><p>The OHLC features &amp; target variable is mined using investpy API, which retrieves data from <a href="http://investing.com/">investing.com</a>. Values of the previous day are used to predict next day closing price.</p><p>i) Opening Price</p><p>ii) Highest Price</p><p>iii) Lowest Price</p><p>iv) Closing Price</p><p>Final dataset was considered from 1 April 2013 to 18 September 2021 having 3093 rows, 23 features, date &amp; target variable. We imputed missing values using a simple moving average. Window size for SMA was selected based on the feature.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2FdA681v7%2Fbtc-raw-features%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2FdA681v7%2Fbtc-raw-features%2F&amp;image=https%3A%2F%2Fdatapane.com%2Fstatic%2Fpython_report_illustration.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/275670926ef7d0b1d60a45ff2b18703f/href">https://medium.com/media/275670926ef7d0b1d60a45ff2b18703f/href</a></iframe><h3>5. Exploratory Data Analysis.</h3><p><strong>5.1 Univariate analysis of Target variable</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F53.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F53%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/5fe50e3af40b05d5e65df7d0d7579413/href">https://medium.com/media/5fe50e3af40b05d5e65df7d0d7579413/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F55.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F55%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/bb436627353100f65671b9e940c439cb/href">https://medium.com/media/bb436627353100f65671b9e940c439cb/href</a></iframe><p>We can observe price volatility from skewed KDE distribution &amp; line chart. There are two big spikes in distribution. From April 2013 to April 2017, prices were stable between 100 USD to 1000 USD. From May 2017, the trend started increasing and reached 19345 USD by Dec 2017. From Then to Sep 2020, prices were stable, but having some increasing/decreasing trends but not huge spikes. In Oct 2020. Prices started to increase heavily and reached 63500 USD by April 2021. It continued to have some increase/decrease, but fell down sharply to 30000 USD by July 2021. After July to September 2021, the prices are increasing and currently are in range, from 40000 USD to 50000 USD.</p><p><strong>5.2 Target variable Pearson Correlation vector &amp; Bivariate analysis of high correlated features</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HHxyiwoeeIls6Pll8MuyMg.png" /><figcaption>Correlation of target variable with other features</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F57.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F57%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/9992c6efb026c1bd735cb760b6b95d9f/href">https://medium.com/media/9992c6efb026c1bd735cb760b6b95d9f/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F61.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F61%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/ee8be7b29553d0513dc0450b7be225c0/href">https://medium.com/media/ee8be7b29553d0513dc0450b7be225c0/href</a></iframe><p>It shows very good correlation with OHLC features and scatter plot also gives a linear relationship. These features will be very useful for prediction. Other well correlated features are Miner revenue, average transaction value. They do show good positive correlation, but lacks a good linear relationship.</p><p><strong>5.3 Pearson Correlation Matrix of Features</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W5M3LlhHyqLkfy_wWjoBUA.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2FdA9bon3%2Ffeature-to-feature-correlation%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2FdA9bon3%2Ffeature-to-feature-correlation%2F&amp;image=https%3A%2F%2Fdatapane.com%2Fstatic%2Fpython_report_illustration.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/83c64c07c1f7c6a26c01d6d74481c53f/href">https://medium.com/media/83c64c07c1f7c6a26c01d6d74481c53f/href</a></iframe><p>We can observe that there is very good correlation between OHLC features, as distribution will be closely similar to each other.</p><p>As the difficulty increase more processing power, i.e., hash rate is required thus it shows a high correlation with hash rate.</p><p>Average fee and median fee follow a very similar distribution, which implies that on a single day, neither the fees are paid heavily nor they are too less.</p><p>There is a good correlation between sending address &amp; active addresses, as sent address is a subset of active addresses.</p><p>Miner revenue generates new bitcoins as a reward, thus increasing supply of bitcoins, which ultimately impacts the price.</p><h3><strong>6. Feature Engineering- Technical Indicators.</strong></h3><p>Technical traders or investors use technical indicators to predict future price trends and make trading decisions. Technical indicators are calculated from historical data, which provides insights about data pattern. There are different indicators which show trend, momentum, volatility, volume. e.g., Moving averages, Rate of change, Bollinger bands, Moving Average Convergence Divergence, standard deviation, etc.</p><p>We are considering following technical indicators of each feature for a period of past 7 days, 30 days &amp; 90 days. Python library <a href="https://github.com/twopirllc/pandas-ta">Pandas-ta</a> was used to calculate all features.</p><p><strong>6.1 Simple Moving Average</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F197.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F197%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1897ba46e89abd94e9b42fcacbb39ea/href">https://medium.com/media/c1897ba46e89abd94e9b42fcacbb39ea/href</a></iframe><p>SMA calculates the average of a selected range of feature values for a number of periods in that range. It determines if a price will follow a bull or bear trend.</p><p><strong>6.2 Weighted Moving Average</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F203.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F203%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/d79e3ed7488bf6356ac3cc0539b583e8/href">https://medium.com/media/d79e3ed7488bf6356ac3cc0539b583e8/href</a></iframe><p>WMA assigns a greater weighting to the most recent data points, and less weighting to data points in the distant past. The sum of the weighting should add up to 1 (or 100 percent)</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*osn8qKs5qUuEE115VkvAGA.png" /></figure><p><strong>6.3 Exponential Moving Average</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F201.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F201%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/77f89a48bf566de0c68d48161d5af01b/href">https://medium.com/media/77f89a48bf566de0c68d48161d5af01b/href</a></iframe><p>The EMA also places a greater weight on the most recent data points like WMA but the rate of decrease between one price and its preceding price is not consistent. The difference in the decrease is exponential.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NJW-hfMOGkBNQxaN" /></figure><p><strong>6.4 Double Exponential Moving Average</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F209.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F209%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/09498b100aaeac60fcfdc2a54aa3d505/href">https://medium.com/media/09498b100aaeac60fcfdc2a54aa3d505/href</a></iframe><p>DEMA responds more quickly to near-term price changes than a normal exponential moving average (EMA). It helps to filter out noise.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5YhXMszlwGUwqKoR4qycwQ.png" /></figure><p><strong>6.5 Triple Exponential Moving Average</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F216.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F216%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/12376d70a8bab3ae09668d2aa19e8e60/href">https://medium.com/media/12376d70a8bab3ae09668d2aa19e8e60/href</a></iframe><p>It uses multiple EMA calculations and subtracts the lag to create a trend following indicator that reacts quickly to price changes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/663/1*PylGKY-9lEGrCI3ZmMbAIA.png" /></figure><p><strong>6.6 Standard Deviation</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F218.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F218%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/97316e14212b5d70227d1d7690fc5691/href">https://medium.com/media/97316e14212b5d70227d1d7690fc5691/href</a></iframe><p>Standard deviation is the statistical measure of market volatility, measuring how widely feature values are dispersed from the average feature values. If feature values trade in a narrow trading range, the standard deviation will return a low value that indicates low volatility. Conversely, if feature values swing wildly up and down, then the standard deviation returns a higher value that indicates high volatility.</p><p><strong>6.7 Variance</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F220.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F220%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/2f2b45e94951559c6d7883346a894dcf/href">https://medium.com/media/2f2b45e94951559c6d7883346a894dcf/href</a></iframe><p>Variance is another statistical measure of market volatility, measuring how widely feature values are dispersed from the average feature values. It is interpreted similarly to standard deviation, variance is square of standard deviation.</p><p><strong>6.8 Relative Strength Index</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F222.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F222%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/16de42769da91b248b97a2a6558bbcbd/href">https://medium.com/media/16de42769da91b248b97a2a6558bbcbd/href</a></iframe><p>An asset is considered oversold or undervalued when the RSI drops below 30. On the other hand, it’s deemed to be overbought if the RSI goes above 70.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/528/1*ocdvc37zIxGl_g2NpczZDA.png" /></figure><p><strong>6.9 Rate of Change</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F226.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F226%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/91e9e994489a1db6cc171894df83b8ad/href">https://medium.com/media/91e9e994489a1db6cc171894df83b8ad/href</a></iframe><p>Measures the percentage change in price between the current feature value and the feature a certain number of periods ago. A rising ROC above zero typically confirms an uptrend, while a falling ROC below zero indicates a downtrend.</p><p><strong>6.10 Bollinger Bands</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F228.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F228%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/76da7048d9d09821b380376597745ae6/href">https://medium.com/media/76da7048d9d09821b380376597745ae6/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F230.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F230%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/4ada739a4f45f83cbdb87fcb1aec4859/href">https://medium.com/media/4ada739a4f45f83cbdb87fcb1aec4859/href</a></iframe><p>Bollinger Bands are envelopes (Upper and Lower range levels) plotted at a standard deviation level above and below a simple moving average of the price. Because the distance of the bands is based on standard deviation, they adjust to volatility swings in the underlying price. Bollinger bands help determine whether values are high or low on a relative basis. They are used in pairs, both upper and lower bands, and in conjunction with a moving average.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*RrSGRtoRAyzkeYnegJ4MGA.png" /></figure><p><strong>6.11 Moving Average Convergence Divergence</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F234.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F234%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/a88fc512c3a0a8507a2f4fcfa40d04e7/href">https://medium.com/media/a88fc512c3a0a8507a2f4fcfa40d04e7/href</a></iframe><p>The MACD represents a trend following indicator that highlights whether the short-term price momentum is moving in the same direction as the long-term price momentum, and in cases where it’s not, then it’s used to determine if a trend change is near. The MACD consists of four components.</p><p>MACD line- shows the variation between the slow-moving average and the fast-moving average</p><p>Signal line-for signaling fluctuations in price momentum</p><p>Histogram- indicates the difference between the signal line and the MACD line.</p><p>After feature engineering, total number of features increased to 851.</p><h3><strong>7. Feature Scaling</strong></h3><p>For scaling the features, robust scalar followed by min-max scalar was used. Robust scalar is similar to min max scalar, but it uses the interquartile range, so that it is robust to outliers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/671/1*5u1oGgaS5IhbykFJPt-D-Q.png" /></figure><h3><strong>8. Feature Selection</strong></h3><p>On all the features, feature selection had to be performed to select top important features. Random forest regressor was used to select the top 10 important features.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F116.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F116%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/e521f0db955b32edcc1d28dc5322418b/href">https://medium.com/media/e521f0db955b32edcc1d28dc5322418b/href</a></iframe><h3><strong>9.Training Methodology</strong></h3><p>The target variable is highly volatile where prices are ranging from 100 USD to 63500 USD. Initially, we tried with time series split cross validation, random split cross validation, but results were mostly overfitting.</p><p>Thus, we decided to create multiple splits and train model for each split separately. Each train Split will consist of 500 data points &amp; next 100 data points will be used for testing. E.g., If there are 10 splits, 10 models will be trained and each model will predict 100 data points. To summarize, prediction of the next 100 days will be based on data considered of last 500 days. The final metric will be mean over metric reported by each split.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ce2ef35773ca5502ca83365d492dcb24/href">https://medium.com/media/ce2ef35773ca5502ca83365d492dcb24/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/970/1*-9zaUPkUG_08WE9nyEKoRQ.gif" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2FW3DznPk%2Ftrain-test-split%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2FW3DznPk%2Ftrain-test-split%2F&amp;image=https%3A%2F%2Fdatapane.com%2Fstatic%2Fpython_report_illustration.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/a60e29255712bf75162c9418b1306135/href">https://medium.com/media/a60e29255712bf75162c9418b1306135/href</a></iframe><h3><strong>10. Model Training</strong></h3><p><strong>10.1 Baseline Model</strong></p><p>As a baseline, for each split, predictions were made using 90th percentile.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F134.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F134%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/b1c05e8cd68e83b53c7d46fcf9ee3a57/href">https://medium.com/media/b1c05e8cd68e83b53c7d46fcf9ee3a57/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F153.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F153%2F&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/dec8dc7d494daa432762813e77e64fe5/href">https://medium.com/media/dec8dc7d494daa432762813e77e64fe5/href</a></iframe><p><strong>10.2 Support Vector Regression</strong></p><p>Unlike Linear Regression models that try to minimize the error between the real and predicted value, the SVR tries to fit the best line within a threshold value. The threshold value is the distance between the hyperplane and boundary line. SVR performs well on small datasets.</p><p>Here we have used SVR with Regularization parameter C =10000 with RBF Kernel with kernel coefficient gamma set to auto = 1 / n_features</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/2d0b97e1466d6897acf9287c25cab399/href">https://medium.com/media/2d0b97e1466d6897acf9287c25cab399/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F138.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F138%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/39e4a066271c352c55a61486874d17df/href">https://medium.com/media/39e4a066271c352c55a61486874d17df/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F184.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F184%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/8cb31cf70dc8ccaccfcd7eb10470181d/href">https://medium.com/media/8cb31cf70dc8ccaccfcd7eb10470181d/href</a></iframe><p>SVR is able to predict good results and capture the trend, even when there is a sudden spike in prices.</p><p><strong>10.3 Extreme Gradient Boosting Regression</strong></p><p>It is a boosting ensemble model which is constructed from decision tree models. Trees are added sequentially to the ensemble and fit to correct the prediction errors made by prior models.</p><p>Here we have used 500 trees which tries to minimize squared errors.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ae05d86fdc55157184bf320369df09db/href">https://medium.com/media/ae05d86fdc55157184bf320369df09db/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F143.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F143%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/8bed539a31c4028c2c65ecc60d6ffc76/href">https://medium.com/media/8bed539a31c4028c2c65ecc60d6ffc76/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F186.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F186%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/5832d4b7a8043edff022db0637e1e8be/href">https://medium.com/media/5832d4b7a8043edff022db0637e1e8be/href</a></iframe><p>XGBoost is highly overfitting. We can observe that when there is a sudden spike in prices, It predicts unsatisfactory results.</p><p><strong>10.4 Linear Regression using Stochastic gradient descent</strong></p><p>Linear regression attempts to build a linear relationship between the input variables and target variable by fitting a linear equation to observed data by minimizing the least squares. It needs some regularization, as weights can grow exponentially to minimize errors.</p><p>We can use gradient descent to iteratively minimize the error of the model. It works by starting with random values for each coefficient. A learning rate is used as a scale factor, and the coefficients are updated in the direction towards minimizing the error. The process is repeated until a minimum sum squared error is achieved, or no further improvement is possible.</p><p>We are using squared epsilon insensitive as loss function which squares beyond ε-region where epsilon was set to 0.01. Elastic net was used for regularization. Initial learning rate was set to 0.01, and it was decreased adaptively per epoch. The input data were shuffled in every epoch to show more data to model.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*LW79SMoYmK6i4K5qUhlOPg.gif" /><figcaption>Comparison of various loss functions(Ref- <a href="https://aws.amazon.com/blogs/machine-learning/train-faster-more-flexible-models-with-amazon-sagemaker-linear-learner/">https://aws.amazon.com/blogs/machine-learning/train-faster-more-flexible-models-with-amazon-sagemaker-linear-learner/</a>)</figcaption></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a200ead8435c849df2d38602930af102/href">https://medium.com/media/a200ead8435c849df2d38602930af102/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F146.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F146%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/27b41d6d30551fec65e0c722f07f0de3/href">https://medium.com/media/27b41d6d30551fec65e0c722f07f0de3/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F189.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F189%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/62b52479082f63119a83a19242da9b67/href">https://medium.com/media/62b52479082f63119a83a19242da9b67/href</a></iframe><p>This model performs significantly better than SVR and XGBoost. As observed earlier in correlation, there was a very good linear relationship between some features and target variable. This ultimately has made linear models like SVR &amp; Linear regression fit a good hyperplane on data.</p><p><strong>10.5 Long Short-Term Memory (LSTM)</strong></p><p>Long Short-Term Memory networks are a type of recurrent neural network capable of learning order dependence in sequence prediction problems. It has the ability to remove or add information to the cell state, carefully regulated by structures called gates. Gates are a way to optionally let information through. They are composed out of a sigmoid neural net layer and a point wise multiplication operation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZbQDxr_y5DJG9Dqo.png" /><figcaption>LSTM (Ref-<a href="https://colah.github.io/posts/2015-08-Understanding-LSTMs/">https://colah.github.io/posts/2015-08-Understanding-LSTMs/</a>)</figcaption></figure><p>We are feeding input to a bidirectional layer of 400 cells, followed by a dropout of 25%. This output is fed to a bidirectional layer of 500 cells, which is followed by dropout of 30%. RELU activation function was used to avoid vanishing or exploding gradient problem. Adam optimizer was used for updating the weights.</p><p>The loss function used is the logarithm of the hyperbolic cosine of the prediction error. log(cosh(x)) is approximately equal to (x ** 2)/2 for small x and to abs(x)-log(2) for large x. It works mostly like the mean squared error, but will not be so strongly affected by the occasional wildly incorrect prediction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/436/0*gbMr0ybqOvoeKCLc.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/504/0*fi7z5izL3NYkmJCt.png" /><figcaption>Logcosh Loss Function(Ref-<a href="https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0">https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0</a>)</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*uM3Elmv6339uLOXY4qi1ow.png" /><figcaption>LSTM Model Architecture</figcaption></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F192.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F192%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/c65edbbf0375b9c47095d628a47a33e8/href">https://medium.com/media/c65edbbf0375b9c47095d628a47a33e8/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F194.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F194%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/0b704abe8793cd2eb86fa5b81a6e51b0/href">https://medium.com/media/0b704abe8793cd2eb86fa5b81a6e51b0/href</a></iframe><p><strong>10.6 Bidirectional Long Short-Term Memory (LSTM)</strong></p><p>Bidirectional long-short term memory (bi-lstm) is the process of making neural network to have the sequence information in both directions backwards (future to past) or forward (past to future).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/766/0*MoQMhigoIVo09W2W.jpeg" /><figcaption>Bidirectional LSTM(Ref-<a href="https://analyticsindiamag.com/complete-guide-to-bidirectional-lstm-with-python-codes/">https://analyticsindiamag.com/complete-guide-to-bidirectional-lstm-with-python-codes/</a>)</figcaption></figure><p>The model architecture was kept same as LSTM with LSTM cells replaced as</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/545/1*MpFo5XYyk0Lv-NnNeH7nng.png" /></figure><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F258.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F258%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/b3e238b1d73164d3a07231b92c0344bc/href">https://medium.com/media/b3e238b1d73164d3a07231b92c0344bc/href</a></iframe><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fplotly.com%2F%7Erohansawant7978%2F256.embed%3Fautosize%3Dtrue&amp;display_name=Plotly&amp;url=https%3A%2F%2Fchart-studio.plotly.com%2F%7Erohansawant7978%2F256%2F&amp;image=https%3A%2F%2Fchart-studio.plotly.com%2Fstatic%2Fwebapp%2Fimages%2Fplotly-logo.8d56a320dbb8.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=plotly" width="600" height="400" frameborder="0" scrolling="no"><a href="https://medium.com/media/417d4f648cda1f549f79d9af4483ad2d/href">https://medium.com/media/417d4f648cda1f549f79d9af4483ad2d/href</a></iframe><p><strong>10.7 Comparison of all models</strong></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2F63OwW83%2Fmodel-comparison%2Fembed%2F&amp;display_name=Datapane&amp;url=https%3A%2F%2Fdatapane.com%2Fu%2Frohan7978%2Freports%2F63OwW83%2Fmodel-comparison%2F&amp;image=https%3A%2F%2Fdatapane.com%2Fstatic%2Fpython_report_illustration.png&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=datapane" width="960" height="700" frameborder="0" scrolling="no"><a href="https://medium.com/media/3b576de98419c194066fd39b05b51785/href">https://medium.com/media/3b576de98419c194066fd39b05b51785/href</a></iframe><p>Linear regression &amp; LSTM making good predictions. Due to test time complexity benefits, we will deploy linear regression model.</p><h3>11. Model Deployment</h3><p>Model was deployed using linear regression.</p><p><a href="http://18.117.195.216:8501/">Bitcoin Price Prediction</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2FOn2O7jeALc0%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3DOn2O7jeALc0&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2FOn2O7jeALc0%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/86384077cd681e30645c3ae408e51e76/href">https://medium.com/media/86384077cd681e30645c3ae408e51e76/href</a></iframe><p>Github Repository-</p><p><a href="https://github.com/rohansawant7978/bitcoin-price-forecasting">GitHub - rohansawant7978/bitcoin-price-forecasting</a></p><p>LinkedIn Profile-</p><p><a href="https://www.linkedin.com/in/rohan-sawant7978/">Rohan Sawant - Data Scientist - Krisopia | LinkedIn</a></p><h3>12. References</h3><ol><li><a href="https://www.appliedaicourse.com/">https://www.appliedaicourse.com/</a></li><li><a href="https://link.springer.com/content/pdf/10.1007/s00521-020-05129-6.pdf">https://link.springer.com/content/pdf/10.1007/s00521-020-05129-6.pdf</a></li><li><a href="https://www.stilt.com/blog/2021/07/how-does-cryptocurrency-gain-value/">https://www.stilt.com/blog/2021/07/how-does-cryptocurrency-gain-value/</a></li><li><a href="https://theblockpro.com/what-is-bitcoin/">https://theblockpro.com/what-is-bitcoin/</a></li><li><a href="https://bitinfocharts.com/">https://bitinfocharts.com/</a></li><li><a href="https://www.investing.com/">https://www.investing.com/</a></li><li><a href="https://data.nasdaq.com/data/BCHAIN/MKPRU-bitcoin-market-price-usd">https://data.nasdaq.com/data/BCHAIN/MKPRU-bitcoin-market-price-usd</a></li><li><a href="https://top10stockbroker.com/cryptocurrency/bitcoin-technical-indicators/">https://top10stockbroker.com/cryptocurrency/bitcoin-technical-indicators/</a></li><li><a href="https://www.mycryptopedia.com/best-8-bitcoin-indicators-for-cryptocurrency-trading/">https://www.mycryptopedia.com/best-8-bitcoin-indicators-for-cryptocurrency-trading/</a></li><li><a href="https://towardsdatascience.com/unlocking-the-true-power-of-support-vector-regression-847fd123a4a0">https://towardsdatascience.com/unlocking-the-true-power-of-support-vector-regression-847fd123a4a0</a></li><li><a href="https://machinelearningmastery.com/xgboost-for-regression/">https://machinelearningmastery.com/xgboost-for-regression/</a></li><li><a href="https://machinelearningmastery.com/linear-regression-for-machine-learning/">https://machinelearningmastery.com/linear-regression-for-machine-learning/</a></li><li><a href="https://machinelearningmastery.com/gentle-introduction-long-short-term-memory-networks-experts/">https://machinelearningmastery.com/gentle-introduction-long-short-term-memory-networks-experts/</a></li><li><a href="https://colah.github.io/posts/2015-08-Understanding-LSTMs/">https://colah.github.io/posts/2015-08-Understanding-LSTMs/</a></li><li><a href="https://analyticsindiamag.com/complete-guide-to-bidirectional-lstm-with-python-codes/">https://analyticsindiamag.com/complete-guide-to-bidirectional-lstm-with-python-codes/</a></li><li><a href="https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0">https://heartbeat.fritz.ai/5-regression-loss-functions-all-machine-learners-should-know-4fb140e9d4b0</a></li><li><a href="https://www.investopedia.com/">https://www.investopedia.com/</a></li></ol><h3><strong>13.Future Work</strong></h3><p>We can attempt to predict 7th &amp; 15th &amp; 30th day price by using similar approach. Similar to original reference, we can attempt to predict increase or decrease price.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=93bf662f46ab" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>