<?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 Ajit Desai on Medium]]></title>
        <description><![CDATA[Stories by Ajit Desai on Medium]]></description>
        <link>https://medium.com/@ajitdesai.ds?source=rss-427630d7b1cb------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*d6dWF4-EjrHMZds0DHFc8g.gif</url>
            <title>Stories by Ajit Desai on Medium</title>
            <link>https://medium.com/@ajitdesai.ds?source=rss-427630d7b1cb------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 17:52:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ajitdesai.ds/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[Transaction Settlement Optimization using Quantum Computing]]></title>
            <link>https://medium.com/@ajitdesai.ds/transaction-settlement-optimization-using-quantum-computing-3f23f5bc9a?source=rss-427630d7b1cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/3f23f5bc9a</guid>
            <dc:creator><![CDATA[Ajit Desai]]></dc:creator>
            <pubDate>Sun, 13 Aug 2023 12:44:02 GMT</pubDate>
            <atom:updated>2023-08-13T12:44:02.171Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Op7I9NLNbO1CzCN_" /><figcaption>Photo by <a href="https://unsplash.com/@lazycreekimages?utm_source=medium&amp;utm_medium=referral">Michael Dziedzic</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Economic transactions:</h3><p>A transaction refers to the exchange of products, goods, services, or money. In the modern economy, transactions are typically settled through various payment methods. In this rapidly evolving digital age, payments can take many forms, including cash, credit or debit cards, mobile payments, and, more recently, cryptocurrencies. These payments are settled using various electronic settlement systems.</p><h3><strong>Transaction settlement systems:</strong></h3><p>Settlement systems are essential for effectively processing transactions. For example, when you go to a shop and make a purchase using your payment card or mobile wallet, you create a payment obligation. Your bank then needs to send that payment to the merchant’s bank. Such payments (including many other types initiated by consumer, corporate, and government transactions) are processed through online payment systems, which come in various types and can be categorized as listed below.</p><ol><li><strong>Wholesale Payments Systems:</strong> These system facilitate large-value payments between participating financial institutions on a gross basis. These sysrems are commonly used for interbank transfers, securities settlement, FX setttlment, and the obligations from other systems.</li><li><strong>Retail Payments Systems:</strong> These systems are designed to process small-value payments between participants on a net basis. These systems handle everyday transactions made by individuals or businesses, such as retail purchases, bill payments, or person-to-person transfers.</li><li><strong>Instant Payments Systems:</strong> They are newly evolved systems which settle small-value peer-to-peer payments initiated in real-time. They are increasingly becoming popular, as they provide convenience and speed in making payments.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*D3YApYTkGvFHd--LkQPxcg.jpeg" /><figcaption>Intuitive schematic of a instant payment systems created by the author</figcaption></figure><h4>Transaction settlement optimization:</h4><p>The transaction settlement process can be optimized to improve the efficiency of such a system. These problems can arise in various applications, including payment or securities settlement.</p><p>In the case of securities settlement optimization in capital markets, the challenge lies in determining the subset of transactions that can be settled to improve the efficiency (<a href="https://arxiv.org/abs/1910.05788"><strong>Braine et al., 2019</strong></a>).</p><p>In a high-value (or wholesale) payments system, where large sums of money are involved, it could be useful to find the most efficient order in which to settle the transactions (<a href="https://arxiv.org/abs/2209.15392"><strong>McMahon et al., 2022</strong>)</a>.</p><p>In this article, we’ll focus on high-value payments system and their efficiency improvements using quantum computing, as outlined in the recently published paper: <a href="https://www.bankofcanada.ca/2022/12/staff-working-paper-2022-53/"><strong>Improving the Efficiency of Payments Systems Using Quantum Computing.</strong></a></p><p>The approach proposed in the paper focuses on improving the liquidity efficiency of payment systems by optimizing the order in which payments are processed. However, as the number of outstanding payments increases, the size of this optimization problem grows exponentially. Therefore, this task falls under the category of <strong>NP-hard</strong> <strong>combinatorial</strong> <strong>optimization</strong> problems, which are difficult to solve using only traditional computing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ONdz05Fexx9uMJzLlACqBg.png" /></figure><h3>Quantum Computing</h3><p>The emergence of <strong>quantum computing</strong> provides an exciting opportunity to address complex cominatorial optimization problems on a near practical scale. Quantum algorithms, such as developed in <a href="https://arxiv.org/abs/1910.05788"><strong>Braine et al., 2019</strong></a><strong> </strong>and <a href="https://www.bankofcanada.ca/2022/12/staff-working-paper-2022-53/"><strong>McMahon et al., 2022</strong></a><strong> </strong>and<strong> </strong>show promise in effectively tackling this type of transactions settlement optimization problems, potentially offering significant improvements in settlement efficiency.</p><p>Quantum computing is a fundamentally new type of computing. It is stochastic in nature and performs computations by utilizing properties of quantum states such as superposition, entanglement, and tunneling. There are myriad great resources to learn about quantum computing, but I specifically suggest reading the following <a href="https://en.wikipedia.org/wiki/Quantum_Computing:_A_Gentle_Introduction">book</a> or <a href="https://towardsdatascience.com/quantum-computing-explained-a114999299ca">blog</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*HKZ_XtNFtRByegKo8sv8qQ.png" /><figcaption>Bits vs Qubits (image created by the author)</figcaption></figure><h4>Quantum algorithm to improve payments settlement efficiency</h4><p>In the article by <a href="https://www.bankofcanada.ca/2022/12/staff-working-paper-2022-53/">McMahon et al.</a>, the authors propose, <strong>quantum algorithm as a pre-processor </strong>to optimize batch of payments submitted to the system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DikQfjYYMsQ3JwtsmIw5Ng.png" /></figure><p>The proposed <strong>quantum optimizer </strong>searches for the optimal ordering in each batch of payments that minimizes the aggregate liquidity required to settle them. Utilizing <strong>D-Wave’s constrained quadratic model</strong> (CQM) and settlement data from Canada’s payment system, the quantum optimizer provides significant liquidity savings, on average 250 millian in CAD. Check-out the following references to learn more.</p><h4>Referred paper:</h4><p>McMahon, C., McGillivray, D., Desai, A., Rivadeneyra, F., Lam, J.P., Lo, T., Marsden, D. and Skavysh, V., (2022). <em>Improving the Efficiency of Payments Systems Using Quantum Computing</em> (№2022–53). Bank of Canada. (<a href="https://www.bankofcanada.ca/2022/12/staff-working-paper-2022-53/">Link</a>)</p><p>Braine, L., Egger, D. J., Glick, J., &amp; Woerner, S. (2021). <em>Quantum algorithms for mixed binary optimization applied to transaction settlement</em>. IEEE Transactions on Quantum Engineering. (<a href="https://arxiv.org/abs/2209.15392">Link</a>)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3f23f5bc9a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Nowcasting, an Exciting Application of Machine Learning]]></title>
            <link>https://medium.com/@ajitdesai.ds/nowcasting-an-exciting-application-of-machine-learning-45824ad6ed7d?source=rss-427630d7b1cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/45824ad6ed7d</guid>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[big-data]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[time-series-forecasting]]></category>
            <category><![CDATA[gdp]]></category>
            <dc:creator><![CDATA[Ajit Desai]]></dc:creator>
            <pubDate>Sun, 07 May 2023 06:39:26 GMT</pubDate>
            <atom:updated>2024-03-14T13:18:37.957Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Image to intuitively explain difference between nowcasting and forecasting using different size pencils and dotted curves." src="https://cdn-images-1.medium.com/max/1024/1*eR9vRMyO3J7TV4XTASl7ag.png" /><figcaption>Original image by <a href="https://unsplash.com/@jessbaileydesigns?utm_source=medium&amp;utm_medium=referral">Jess Bailey</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a> modified by the author</figcaption></figure><h3>What is nowcasting?</h3><p>Like <em>forecasting</em>, which is predicting the future, <em>nowcasting</em> is predicting the present, i.e., estimating the current or near-term state using real-time data and predictive analytics.</p><h4>Where nowcasting is used?</h4><p>Nowcasting plays an important role in fields where the latest information is indispensable for effective decision-making but may not be immediately accessible. Such fields include finance, meteorology, public health, economics, and others. In finance, for instance, real-time prediction of stock price movements is useful for investors to make informed decisions and various available data sources and advanced analytics can be leveraged for this purpose. Similarly, data from sensory inputs and satellite images can be used for accurate short-term weather prediction in meteorology. However, this article will focus on <em>macroeconomic nowcasting — </em>real-time prediction of key macroeconomic indicators, such as GDP and inflation. The official statistics for such indicators are often only available with a lag.</p><h3>Macroeconomic nowcasting:</h3><p>Predicting the short-term dynamics of the economy is a crucial input into various economic agents’ decision-making processes. However, accurately nowcasting key macroeconomic indicators can be challenging for various reasons. For instance, official estimates are released with a substantial <strong>delay</strong>, and the <strong>uncertainty</strong> in the data and estimates can lead to multiple revisions, sometimes years after their first release. Additionally, <strong>various data </strong>series<strong> </strong>are required for accurately nowcasting of macroeconomic indicators — further complicating the process [1].</p><p>Macroeconomic crisis, such as due to the Covid-19 pandemic, makes nowcasting even more challenging due to the<strong> unprecedented</strong> economic impacts of the crisis, the<strong> unconventional</strong> policies designed to alleviate those crises, and the<strong> unreliability</strong> of traditional models due to their dependence on lagged data [2].</p><figure><img alt="Marginal contributions of predictors towards monthly  GDP growth prediction" src="https://cdn-images-1.medium.com/max/1024/1*17m2lnBuXtMQbzXYrMrxtg.png" /><figcaption>Nowcasting of monthly GDP growth in Canada during the onset of the Covid-19 using payments data and ML. The plots show the marginal contribution of predictors, where blue is negative GDP growth rates, and red is positive. Used with permission from: <a href="https://www.mdpi.com/2571-9394/5/4/36">Macroeconomic Predictions using Payments Data and Machine Learning</a></figcaption></figure><h3>Machine learning for macroeconomic nowcasting:</h3><p>The use of machine learning (ML) models for macroeconomic nowcasting is highly advantageous due to their ability to effectively handle a diverse set of <strong>real-time data</strong>, manage <strong>collinearity</strong> in predictors, and capture <strong>nonlinear</strong> interactions between predictors and the target variables. Additionally, ML models prioritize improving prediction accuracy — a crucial aspect of macroeconomic nowcasting applications [2].</p><h4>Examples of use of ML for macro nowcasting:</h4><p>Popular approaches for macroeconomic nowcasting are the dynamic factor model (<strong>DFM</strong>) and Mixed Data Sampling (<strong>MIDAS</strong>) model; however, the use of <strong>ML</strong> models has been rising recently. This is due to the need to leverage high-frequency, non-traditional, and complex datasets. A few articles listed below emphasize the usefulness of ML models in extracting economic value from such data. Additionally, these articles highlight that ML models can be used in conjunction with traditional econometric tools like MIDAS models to enhance prediction accuracy and gain deeper insights into macroeconomic trends [3, 4].</p><p>a. Kapetanios, G. and Papailias, F. Big data &amp; macroeconomic nowcasting: Methodological review. Technical report. <em>Discussion Papers ESCoE DP-2018–12</em>, 2018. (<a href="https://www.google.com/search?client=safari&amp;rls=en&amp;q=Kapetanios%2C+G.+and+Papailias%2C+F.+Big+data+%26+macroeconomic+nowcasting%3A+Methodological+review.+Technical+report%2C+Discussion+Papers+ESCoE+DP-2018%E2%80%9312%2C+2018.+(paper+link)&amp;ie=UTF-8&amp;oe=UTF-8">paper link</a>)</p><p>b. Richardson, A., Mulder, T. and Vehbi, T. Nowcasting GDP using machine-learning algorithms: A real-time assessment. <em>International Journal of Forecasting</em>, 2020. (<a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwjM37T8yuL-AhWpdqQEHQybBZoQFnoECBMQAQ&amp;url=https%3A%2F%2Fwww.sciencedirect.com%2Fscience%2Farticle%2Fabs%2Fpii%2FS016920702030159X&amp;usg=AOvVaw0NSlqPnj8u_4ueLsnKjM9W">paper link</a>)</p><p>c. Chapman, J., and Desai, A. Using payments data to nowcast macroeconomic variables during the onset of COVID-19. <em>Journal of Financial Market Infrastructures</em>, 9(1), 2021. (<a href="https://www.risk.net/journal-of-financial-market-infrastructures/7815261/using-payments-data-to-nowcast-macroeconomic-variables-during-the-onset-of-covid-19">paper link</a>)</p><p>d. Babii, A., Ghysels, E., and Striaukas, J. Machine learning time series regressions with an application to nowcasting. <em>Journal of Business &amp; Economic Statistics</em>, <em>40, </em>2022.<em> </em>(<a href="https://www.google.com/url?sa=t&amp;rct=j&amp;q=&amp;esrc=s&amp;source=web&amp;cd=&amp;cad=rja&amp;uact=8&amp;ved=2ahUKEwj25L-ly-L-AhW9VaQEHWRgCSgQFnoECA8QAQ&amp;url=https%3A%2F%2Farxiv.org%2Fpdf%2F2005.14057&amp;usg=AOvVaw2ThD5VnCdg1w4SIVCG5MkG">paper link</a>)</p><p>e. Borup, D., Rapach, D. E., and Schütte, E. Mixed-frequency machine learning: Nowcasting and backcasting weekly initial claims with daily internet search volume data. <em>International Journal of Forecasting,</em> 2022. (<a href="https://www.sciencedirect.com/science/article/abs/pii/S0169207022000656">link</a>)</p><figure><img alt="SHAP force plot showing marginal contribution of predictors towards prediction of GDP growth for Feb 2020" src="https://cdn-images-1.medium.com/max/1024/1*QYER6uTp98VJPaxL3-zcEA.png" /></figure><figure><img alt="SHAP force plot showing marginal contribution of predictors towards prediction of GDP growth for Apr 2020" src="https://cdn-images-1.medium.com/max/1024/1*9QIOfqqhuIE9chEWDsaYlw.png" /><figcaption>Nowcasting of monthly GDP growth in Canada during the onset of the Covid-19 using payments data and ML. The SHAP force plots for Feb (top) and Apr 2020 (bottom), where the red arrows show positive and blue are negative contributions. The f(x) is the model prediction, and the base value is the average of all predictions. Used with permission from: <a href="https://www.mdpi.com/2571-9394/5/4/36">Macroeconomic Predictions using Payments Data and Machine Learning</a></figcaption></figure><h3>Challenges to overcome:</h3><p>However, using ML models also lead to a few challenges that could reduce the effectiveness of these models for policy use. In particular, nowcasting ML model <strong>problem of overfitting</strong>; that is, due to the flexibility of these models, it is easy to overfit them on in-sample data, which could reduce their out-of-sample performance. In addition, these models are <strong>hard to interpret</strong>, which could be important to understand their predictions — especially if they are used to support policy decisions.</p><figure><img alt="Abstract image showing peaks as challenges and taking steps towards overcoming them" src="https://cdn-images-1.medium.com/max/1024/1*Cyw61bUYRhXDJK0C2dh2RQ.png" /><figcaption>Image created by the author using Keynote</figcaption></figure><p>The researchers are making progress toward overcoming these challenges. For instance, one approach recently developed to mitigate interpretability issues is the Shapley-value-based methodology [5, 6]. However, note that although such methods are based on game theory, they do not provide any optimal statistical criterion. To overcome that, for instance, in a recent paper [7], the authors propose ML-based mixed data sampling and develop the asymptotics in the context of linear regularized regressions. However, much progress needs to be made to use such asymptotic analysis for popular nonlinear ML approaches.</p><h3>References</h3><p>[1] Giannone, D., Reichlin, L., &amp; Small, D. (2008). Nowcasting: The real-time informational content of macroeconomic data. <em>Journal of monetary economics</em>, <em>55</em>.</p><p>[2] Chapman, J.T.E.; Desai, A. Macroeconomic Predictions Using Payments Data and Machine Learning. <em>Forecasting </em><strong>2023</strong>, <em>5</em>, 652–683. <a href="https://doi.org/10.3390/forecast5040036">https://doi.org/10.3390/forecast5040036</a></p><p>[3] Stock, J. H., &amp; Watson, M. W. (2011). Dynamic factor models.</p><p>[4] Ghysels, E., Sinko, A., &amp; Valkanov, R. (2007). MIDAS regressions: Further results and new directions. <em>Econometric reviews</em>, <em>26</em>.</p><p>[5] Lundberg, S. M., &amp; Lee, S. I. (2017). A unified approach to interpreting model predictions. <em>Advances in neural information processing systems</em>, <em>30</em>.</p><p>[6] Buckmann, M., Joseph, A., &amp; Robertson, H. (2021). Opening the black box: Machine learning interpretability and inference tools with an application to economic forecasting. In <em>Data Science for Economics and Finance: Methodologies and Applications.</em></p><p>[7] Babii, A., Ghysels, E., &amp; Striaukas, J. (2022). Machine learning time series regressions with an application to nowcasting. <em>Journal of Business &amp; Economic Statistics</em>, <em>40.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=45824ad6ed7d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Machine Learning for Economics Research: When, How and Which?]]></title>
            <link>https://medium.com/@ajitdesai.ds/machine-learning-for-economics-research-when-how-and-which-b5fa707e217a?source=rss-427630d7b1cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5fa707e217a</guid>
            <category><![CDATA[research]]></category>
            <category><![CDATA[how-to]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[economics]]></category>
            <dc:creator><![CDATA[Ajit Desai]]></dc:creator>
            <pubDate>Sun, 05 Feb 2023 14:12:07 GMT</pubDate>
            <atom:updated>2023-05-04T04:14:34.436Z</atom:updated>
            <content:encoded><![CDATA[<h3>Machine Learning for Economics Research: When, Which and How?</h3><figure><img alt="When artificial intelligence and machine learning perform economic analysis" src="https://cdn-images-1.medium.com/max/741/1*R4d0gzIml16Udl7gt4y_Sg.png" /></figure><p>This article is curated for economists interested in using machine learning (ML) for their research and applications, and data scientists who want to apply their tools for economic analysis. <a href="https://arxiv.org/abs/2304.00086">Checkout this paper for more</a>.</p><h3>Background:</h3><p>Recently, I attended American Economic Association’s continuing education session on <a href="https://www.aeaweb.org/conference/cont-ed">Machine Learning and Big Data </a>by <strong>Melissa Dell </strong>(Harvard University) and <strong>Matthew Harding </strong>(UC Irvine<strong>) </strong>at ASSA 2023 annual meeting — the biggest gathering of social scientists.</p><p>In this short article, I have summarized the key lessons learned from those sessions and a short review of selected papers published in the top economics journal that uses ML.</p><p>Note: The article is rather suggestive than explanatory, and it is categorized into three main sections — each of which focuses on one key question:</p><ol><li><strong>When</strong> ML is useful in economics?</li><li><strong>Which</strong> ML models are recommended?</li><li><strong>How </strong>to use ML for your economic applications?</li></ol><p>We end the blog with a discussion on the limitations of ML in its current form. Along the way, I will also provide links to useful resources.</p><figure><img alt="non-traditional and big data" src="https://cdn-images-1.medium.com/max/768/1*Ro2BEKmGIEb99IXRz4wFQQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@sortino?utm_source=medium&amp;utm_medium=referral">Joshua Sortino</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>When ML is useful in economics?</h3><p>Both Melissa and Matthew, in their course, argued the following three cases where the ML models could add value for economic analysis.</p><h4><em>1. To process non-traditional data</em>, such as images, texts, etc.</h4><p>Non-traditional and granular datasets, such as images, texts, audio and videos, are hard to process using traditional econometric models; therefore, ML could be used to extract useful information in those cases.</p><p>For instance, in <strong>Hansen et al. (2018), published in QJE</strong>, the authors answer how transparency affects monetary policymakers’ deliberations using NLP data and ML algorithms. Similarly, <strong>Larsen et al. (2021), published in JME, </strong>use large news corpus and ML algorithms to investigate the role played by the media in the expectations formation process of households.</p><figure><img alt="Natural language processing of new articles using machine learning" src="https://cdn-images-1.medium.com/max/722/1*kmpZq4RCrDjwaosy9JlIFw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@dzhahua?utm_source=medium&amp;utm_medium=referral">DZHA</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4><strong>2. To capture nonlinearity which is difficult using traditional models</strong></h4><p>The ML could be useful if the data and application contain strong nonlinearity, which is hard to capture using traditional approaches.</p><p>For instance, in <strong>Maliar et al. (2021), published in JME</strong>, the authors use ML to solve a dynamic economic model by casting them into a set of nonlinear regression equations. Similarly, in <strong>Kleinberg et al. (2018), published in QJE</strong>, the authors evaluate if ML can improve judges’ decisions on bail or no bail. Although the outcome is binary, this is a highly complex problem that demands processing complex data to make prudent decisions.</p><h4>3. To process traditional data at scale to improve prediction accuracy or extract new information</h4><p>ML could be useful for processing large and complex (<strong><em>big) </em></strong>data<strong><em> </em></strong>with many variables. The ML models can help to: 1. improve prediction accuracy, 2. extract new information or 3. automate feature extraction.</p><p><strong>Bianchi et al. (2022), published in AER,</strong> show that ML can be productively deployed in a data-rich environment to correct errors in human judgment in survey response and improve predictive accuracy. Similarly, in <strong>Bandiera et al. (2020), published in JPE,</strong> the authors measure CEO behaviour using high-frequency, high-dimensional diary data and an ML algorithm. Finally, in <strong>Farbmacher et al. (2020), published in JoE</strong>, the author uses ML for fraud detection in insurance claims using highly unstructured data.</p><figure><img alt="Machine learning vs econometrics in accuracy gains vs data complexity plot" src="https://cdn-images-1.medium.com/max/1024/1*Elz47wUflTiDQHP1dZaLsA.png" /><figcaption>It is only for qualitative comparison and is generated using Mathew Harding’s class notes from <a href="https://www.aeaweb.org/conference/cont-ed">the AEA session</a>.</figcaption></figure><p>ML is probably not useful for the cases where data complexity (which could be related to shape, size, collinearity, nonlinearity, etc.) is small, and traditional econometric models would likely suffice. However, if the data complexity increases, i.e., when dealing with <strong><em>big data</em></strong>, the value added by ML models could be higher (as shown in the chart above).</p><h3><strong>Which</strong> ML models are recommended?</h3><h4>1. When dealing with text data, the “<strong><em>transformer”</em></strong> model is useful</h4><p>Many large language models could be used to process text data; however, <strong><em>transformer</em></strong> models are proven more useful. There are various resources to learn about them, including this <a href="https://www.coursera.org/learn/nlp-sequence-models">Coursera course</a> by Andrew Ng, and I also found this <a href="https://medium.com/inside-machine-learning/what-is-a-transformer-d07dd1fbec04">Medium article</a> helpful.</p><h4>2. When dealing with images, the “ConvNext” model is useful</h4><p>Many <em>CNN</em> architectures can be employed to process images, but the <strong><em>ConvNext</em></strong> model has proven to be more successful. Again, you can read <a href="https://arxiv.org/abs/2201.03545">this paper</a> for a detailed explanation of the model and this <a href="https://medium.com/r?url=http%3A%2F%2FThere+are+many+large+language+models+which+could+be+used+for+processing+text+data%2C+however%2C+transofrmer+model+are+proven+to+be+more+useful.+Checkout+various+resources+to+learn+about+them+including+the+coursera+course+by+Andrew+Ng%2C+and+I+also+found+this+medium+blogpost+helpful.">Medium article</a> for intuitive understanding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*P3i-BVI9F7S_JEsCXoFL1w.jpeg" /><figcaption>Photo by USGC on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h4>3. When dealing with traditional data in economics, the “ensemble learning” models are useful</h4><p>Ensemble learning models could be useful if the data size is small but includes many features and if there is collinearity or nonlinearity, which is hard to capture. There are many resources to learn about these models, including this <a href="https://www.coursera.org/specializations/machine-learning-introduction#courses">Coursera course</a> and this <a href="https://towardsdatascience.com/ensemble-methods-in-machine-learning-what-are-they-and-why-use-them-68ec3f9fef5f">Medium article</a>.</p><h4>4. In modelling strategic decisions “reinforcement learning” is useful</h4><p>RL could be useful if the primary objective is to model complex strategic decisions in economic applications where only partial information is observable. However, this is at an early stage, and there are only a few applications in economics where it can be used — for example, the <a href="https://www.science.org/doi/10.1126/sciadv.abk2607">AI economist</a> paper and an <a href="https://papers.ssrn.com/sol3/papers.cfm?abstract_id=3743017">application in payments</a>. You can learn more about RL in this <a href="https://web.stanford.edu/class/psych209/Readings/SuttonBartoIPRLBook2ndEd.pdf">Book by Sutton and Barto</a> and this <a href="https://www.coursera.org/specializations/reinforcement-learning">Coursera course</a>.</p><h4>5. When the focus is on causal inference, “causal ML” can help</h4><p>The causal ML could be helpful when the primary objective is to make causal inferences, but the dataset is big and complex. This is an emerging area of research; however, you can look into this <a href="https://www.gsb.stanford.edu/faculty-research/centers-initiatives/sil/research/methods/ai-machine-learning/short-course">Stanford course</a> and a <a href="https://www.annualreviews.org/doi/abs/10.1146/annurev-economics-080217-053433">research paper</a> by Susan Athey to learn more. For intuitive understanding without too many technical details, check out this <a href="https://towardsdatascience.com/introduction-to-causality-in-machine-learning-4cee9467f06f">Medium article</a>.</p><h3><strong>How</strong> to use ML for your economic applications?</h3><ol><li><strong><em>Pre-trained</em></strong> models and <strong><em>transfer learning </em></strong>are recommended, especially if you’re using deep-learning models.</li><li>Of-the-shelf <strong><em>ensemble learning</em></strong> models are useful when dealing with panel data with strong collinearity or nonlinearity, but it is recommended to <strong><em>adapt</em></strong> these models to suit the task.</li><li><strong><em>Bigger is better </em></strong>when it comes to using deep learning models.</li></ol><h4>Some technical pointers:</h4><ol><li><strong><em>Python</em></strong> programming language is preferred over <em>R</em> for applied ML.</li><li><strong><em>Unix</em></strong> operating systems are preferred over <em>windows</em> systems for training large models.</li></ol><figure><img alt="Use machine learning models with caution" src="https://cdn-images-1.medium.com/max/800/1*kcm3ps8iYts8bdwTBMtHlA.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@muukii?utm_source=medium&amp;utm_medium=referral">Hiroshi Kimura</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Limitations</h3><ol><li>Large data and ample <strong><em>computational</em></strong> <strong><em>resources</em></strong> are often necessary to train ML models — especially deep learning models.</li><li>The ML models have no <strong><em>standard errors</em></strong> and asymptotic properties — which could be essential for many economic applications.</li><li>The ML models, owing to their flexibility, are easy to <strong><em>overfit</em></strong>; and their complexity makes them hard to <strong><em>interpret</em></strong> — which could be important in many economic applications.</li></ol><h3>References</h3><ol><li>Bandiera, O., A. Prat, S. Hansen, and R. Sadun (2020). CEO behavior and firm performance. Journal of Political Economy.</li><li>Bianchi, F., S. C. Ludvigson, and S. Ma (2022). Belief distortions and macroeconomic fluctuations. American Economic Review.</li><li>Farbmacher, H., L. Low, and M. Spindler (2020). An explainable attention network for fraud detection in claims management. Journal of Econometrics.</li><li>Hansen, S., M. McMahon, and A. Prat (2018). Transparency and deliberation within the FOMC: a computational linguistics approach. The Quarterly Journal of Economics.</li><li>Kleinberg, J., H. Lakkaraju, J. Leskovec, J. Ludwig, and S. Mullainathan (2018). Human decisions and machine predictions. The quarterly journal of economics.</li><li>Larsen, V. H., L. A. Thorsrud, and J. Zhulanova (2021). News-driven inflation expectations and information rigidities. Journal of Monetary Economics.</li><li>Maliar, L., S. Maliar, and P. Winant (2021). Deep learning for solving dynamic economic models. Journal of Monetary Economics.</li><li>Mullainathan, S. and Z. Obermeyer (2022). Diagnosing physician error: A machine learning approach to low-value health care. The Quarterly Journal of Economics.</li><li>Mullainathan, S. and J. Spiess (2017). Machine learning: an applied econometric approach. Journal of Economic Perspectives.</li><li>Naik, N., R. Raskar, and C. A. Hidalgo (2016). Cities are physical too: Using computer vision to measure the quality and impact of urban appearance. American Economic Review.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5fa707e217a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Learning Machine Learning]]></title>
            <link>https://medium.com/@ajitdesai.ds/learning-machine-learning-820071d34120?source=rss-427630d7b1cb------2</link>
            <guid isPermaLink="false">https://medium.com/p/820071d34120</guid>
            <dc:creator><![CDATA[Ajit Desai]]></dc:creator>
            <pubDate>Mon, 02 Jan 2023 12:19:51 GMT</pubDate>
            <atom:updated>2023-01-02T12:23:24.387Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="The essential ingredient for learning machine learning are illustrated using a bulb in the center and text ballons all around." src="https://cdn-images-1.medium.com/max/1024/1*KQvKMPJbh3nDRyNF7DaHuA.jpeg" /><figcaption>Base image in downloaded from pixabay and modified by the author.</figcaption></figure><p>In this article, I share my experience of learning machine learning (ML), which I consolidate into three steps outlined below. I will also share some resources which I found useful in my journey toward learning ML. Keep in mind that there are many other ways and various other resources you can use to carve your unique path in learning and using AI/ML/DS.</p><h4><strong>1. Strengthening base in mathematics and coding</strong></h4><p>In my opinion, this step is fundamental to being successful in learning and using machine learning (ML). From the mathematics side, one needs to strengthen knowledge in 1. linear algebra, 2. statistics and 3. calculus. Similarly, from the coding side: one needs to acquire mastery in at least one of the coding language, such as: 1. Python, 2. C++, 3. R, or others.</p><p>Having an educational background in computational science and engineering, I was fortunate to have a head start in building these skill sets. However, based on my understanding, one can build or strengthen these skills using the resources, such as books and online courses, listed in the section on the recommended resources for step 1 below.</p><h4><strong>2. Building domain knowledge and understanding data</strong></h4><p>I think this is an essential step before using ML algorithms for your application — -which is the simplest step in this whole learning process. In this second step, one needs to work with domain experts to understand the data-generating process and spend time exploring and deepening understanding of the raw data. Doing this will help you carefully choose ML approaches and algorithms when solving your problem.</p><p>In my case, in collaboration with domain experts, I first started building a simulator which means replicating the whole data-generating process. To do so, I had to read and understand the essence of the data and how it is being generated and used. This allowed me to explore all features of the raw data, its kinks and the opportunities it presents. I also read many scientific and technical articles about similar data and how it is being used elsewhere. In this step, one needs to find his own way to build expertise in their domain and the data; however, one can use the following resources listed in the section on the recommended resources for step 2 below.</p><figure><img alt="Essential steps for building domain knowledge &amp; data understanding are illustrated using binary digits in a semicircular fashion. Domain knowledge, data understanding, building machine learning models" src="https://cdn-images-1.medium.com/max/1024/1*LNGxxcY_vTVcHC7HokM2aQ.jpeg" /><figcaption>Domain knowledge makes it easy to understand the data, build accurate models, and explain it to others.</figcaption></figure><h4><strong>3. Learning through applications</strong></h4><p>After strengthening fundamentals in mathematics, learning to code, building domain knowledge and understanding data, it will be much easier to start using ML. However, my recommendation for this step is to learn by working on test cases as well as practical applications in your field of work. In this step, you can read books, scientific articles, and blogs on using ML for similar applications. Also, online courses and tutorials specialized for understanding applied ML approaches and algorithms are very useful.</p><p>In my case, I started learning ML approaches such as supervised, unsupervised and reinforcement learning; and related algorithms using books and online courses. Along with the course assignments, I also explored practical tutorials on similar topics with similar datasets. In parallel, I also started using these ML approaches for the dataset I was working on, to solve actual problems with business goals and measurable outcomes. In this step, one can follow a similar path using the resources listed in the section on the recommended resources for step 3 below.</p><figure><img alt="ChatGPT model is illustrated using colourful waves suggesting waves of words flowing in and meaningful sentences coming out of the model. Ask ChatGPT, AI, Neural network, NLP model" src="https://cdn-images-1.medium.com/max/657/1*sROPY6Wln0lVhVA3XH1J9w.png" /><figcaption>Artificial neural network based powerfull language model developed by OpenAI</figcaption></figure><p>Finally, when I asked OpenAI’s ChatGPT about how to learn machine learning, one piece of advice, among others which I found especially interesting and relevant to step 3 of this article, is the following: “No matter what your background, it is important to practice and get experience applying machine learning techniques. One way to do this is to participate in online machine learning competitions, such as those hosted on Kaggle. This will not only help you learn new techniques, but also give you a chance to see how your models compare to those built by other people.”</p><p>Below, I share some of the resources, such as books, blogs, tutorials, online courses, etc., that I found useful in my learning process. Note that AI/ML/DS is a rapidly evolving area, and some of these resources might be obsolete.</p><p><strong>&gt; Recommended resources for step 1</strong></p><ul><li><strong>Book</strong>: <em>Linear algebra and learning from data</em> by Gilbert Strong (<a href="https://www.goodreads.com/book/show/43541181-linear-algebra-and-learning-from-data">link</a>)</li><li><strong>Book</strong>: <em>The elements of statistical learning</em> by Hastie, Tibshirani and Friedman (<a href="https://www.goodreads.com/book/show/148009.The_Elements_of_Statistical_Learning?ac=1&amp;from_search=true&amp;qid=pANpvYJPZf&amp;rank=1">link</a>)</li><li><strong>Online course</strong>: <em>Mathematics for machine learning</em> by ICL (<a href="https://www.coursera.org/specializations/mathematics-machine-learning">link</a>)</li><li><strong>Book</strong>: Hands-on ML with Scikit and TensorFlow by Aurélien Géron (<a href="https://www.goodreads.com/book/show/32899495-hands-on-machine-learning-with-scikit-learn-and-tensorflow?ac=1&amp;from_search=true&amp;qid=xDvJ3OGihU&amp;rank=1">link</a>)</li><li><strong>Book</strong>: Mathematics for machine learning by Deisenroth, Faisal and Soon Ong (<a href="https://www.goodreads.com/en/book/show/50419441-mathematics-for-machine-learning">link</a>),</li><li><strong>Online course</strong>: TensorFlow developer professional course (<a href="https://www.coursera.org/professional-certificates/tensorflow-in-practice?#courses">link</a>),</li><li><strong>Online course</strong>: Applied data science with python by University of Michigan (<a href="https://www.coursera.org/specializations/data-science-python">link</a>)</li></ul><p><strong>-&gt; Recommended resources for step 2</strong></p><ul><li><strong>Book</strong>: Storytelling with data by Cole Knaflic (<a href="https://www.goodreads.com/book/show/26535513-storytelling-with-data?from_search=true&amp;from_srp=true&amp;qid=XOhS93n1Io&amp;rank=1">link</a>)</li><li><strong>Blog</strong>: Open AI’s Spinning Up as a Deep RL Researcher <strong>(</strong><a href="https://spinningup.openai.com/en/latest/spinningup/spinningup.html#id49">link</a><strong>)</strong></li><li><strong>Online course: </strong>Learning How to Learn by DLS (<a href="https://www.coursera.org/learn/learning-how-to-learn">link</a>)</li><li><strong>Repository</strong>: Scientific articles in your field of research or application (<a href="https://scholar.google.ca/">link</a>)</li><li><strong>Repository</strong>: Blogs on Towards data science (<a href="https://towardsdatascience.com/">link</a>) and Machine learning mastery (<a href="https://machinelearningmastery.com/">link</a>)</li></ul><p><strong>-&gt; Recommended resources for step 3</strong></p><ul><li><strong>Online course</strong>: Machine learning specialization by Stanford and DeepLearnig.AI (<a href="https://www.coursera.org/specializations/machine-learning-introduction">link</a>)</li><li><strong>Online course</strong>: Deep learning specialization by DeepLearning.AI (<a href="https://www.coursera.org/specializations/deep-learning">link</a>)</li><li><strong>Online course</strong>: Reinforcement learning specialization by University of Alberta (<a href="https://www.coursera.org/specializations/reinforcement-learning?=">link</a>)</li><li><strong>Book</strong>: Reinforcement learning by Sutton and Barto (<a href="https://www.goodreads.com/book/show/739791.Reinforcement_Learning">link</a>)</li><li><strong>Book</strong>: Deep learning by Goodfellow, Bengio and Courville (<a href="https://www.goodreads.com/book/show/24072897-deep-learning?ac=1&amp;from_search=true&amp;qid=Lai2HGFdSB&amp;rank=1">link</a>)</li><li><strong>AI conference</strong>: NeurIPS — Conference on Neural Information Processing Systems (<a href="https://nips.cc/">link</a>)</li><li><strong>AI conference</strong>: ICML — International conference on machine learning (<a href="https://icml.cc/">link</a>)</li></ul><p>Finally, like me, if you are also interested in writing scientific or technical articles about your projects, then make sure to do this excellent online course on writing in science offered by Stanford. As the name suggests, this course is not specifically designed for writing in AL/ML/DS but for general writing in sciences.</p><p><strong>Writing in the Sciences </strong>(<a href="https://www.coursera.org/learn/sciwrite">link</a>) Offered by Stanford University. This course teaches scientists to become more effective writers, using practical examples and exercises.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=820071d34120" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>