<?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 Bastiaan Quast on Medium]]></title>
        <description><![CDATA[Stories by Bastiaan Quast on Medium]]></description>
        <link>https://medium.com/@bquast?source=rss-6cb4b3af9757------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*RgGg_K59FsBMxLMkz0godw.jpeg</url>
            <title>Stories by Bastiaan Quast on Medium</title>
            <link>https://medium.com/@bquast?source=rss-6cb4b3af9757------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 18 Nov 2026 07:00:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@bquast/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[Libraries are replicators, so are LLMs, combining them is a local minimum]]></title>
            <link>https://medium.com/quast/libraries-are-replicators-so-are-llms-combining-them-is-a-local-minimum-113a7bcb0706?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/113a7bcb0706</guid>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[libraries]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Sun, 26 Apr 2026 18:13:14 GMT</pubDate>
            <atom:updated>2026-04-26T19:22:39.040Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*AHPIVh2wf2Y12JcbNYrsnw.png" /></figure><p>A crucial property of information, including software, is that it can be copied at negligible cost. In economics, this is called non-rivalrous, meaning it can be used multiple times without being used up. Another example would be using a radio to listen to a radio station; other people can still listen to the radio, it wasn’t used up, the food or fuel would be.</p><p>Of course, many of the actions we perform using computers are the same or very similar; we check email, write a message to friends or family, print plane tickets, etc. This makes copying software useful.</p><p>Programmers also often need to implement functionality in e.g., websites or apps that have already been implemented before. This functionality is often implemented in what are called libraries, which are typically open-source. Libraries allow the developer to quickly build something common e.g., a website develop may use a way to implement a cookie banner, these a broadly the same across websites, and the HTML code for this is thus standardized in open-source libraries.</p><p>The purpose of libraries is to make available a standardized set of code, which allows developers to easily replicate a common use-case.</p><p>In other words, libraries are replicators of code that is commonly needed across multiple projects (e.g., different websites). Until the advent of LLMs, this was the main way to replicate common code in such a way.</p><p>As most people know, LLMs are trained on the existing internet, including the millions of open-source software projects on websites like Github, and other code-hosting platforms.</p><p>When we use LLMs to develop new software or website, it builds these projects according to the specifications in our prompts, but crucially, it does so using methods that it learned from the training data.</p><p>The training data (largely developed in pre-LLM times) in the vast majority of cases makes use of libraries to implement the repeat-functionality discussed above.</p><p>However, LLMs are themselves replicators, <em>and</em>, as noted above, they replicate the programming methods that they were taught in their training data.</p><p>So if software libraries are replicators, but LLMs are also replicators, isn’t it superfluous to have the LLM-replicator use library-replicators?</p><p>Yes, this is very much superfluous, it turns out that LLMs are very good at implementing the repeat functionality (e.g. cookie banners) from scratch, because they often have been trained on multiple open-source libraries that implement a functionality (cookie banner), and so across these multiple similar libraries, the LLMs learned the abstract pattern that is the purpose (present the website visitor with accept/reject buttons in a popup). Since they understand the abstract pattern, it is very easy for LLMs to write some code from scratch to implement this.</p><p>Why is this important? If it worked fine before, why not let the LLM do it the established way?</p><p>The reason is that in many ways, it did not work that “fine” before. The library is good at implementing the repeat functionality, but it comes with many downsides:</p><ul><li>bloat; a library often implements multiple things, if you only need one, you still need to copy all the code you won’t use (and every website visitor as well)</li><li>complexity; libraries often rely on other libraries, which creates a so-called dependency-tree, all these libraries have multiple versions (v.1, v.1.1, etc.). Managing all these requirements is very complex and often breaks. It is referred to as ‘dependency hell’.</li><li>security vulnerability; developers do not read every line of code of a library they include in a project, it may contain spyware or other security issues, including just bugs. Libraries are often updated in the background, so spyware may be introduced in future versions, and the existing project may become vulnerable.</li></ul><p>There are additional reasons that have not yet been explored as thoroughly. For example, if most servers use one of a handful of open-source libraries for various functions, an attacker may be able to guess the library, and if any vulnerabilities in the library are known, exploit those.</p><p>On the other hand, if the code was implemented specifically for this project by an LLM, it is not possible for a hacker to guess very much about the code, making it more secure.</p><p>This raises the question: if libraries are so problematic, then why are they so widely used?</p><p>One reason for this is the absolution of accountability. In an IT company, if a product manager has his/her software developers implement everything from scratch, then they are responsible for any vulnerabilities in this code.</p><p>However, if the Product Manager asks his/her developers to use open-source libraries, then they can claim they aren’t responsible for any vulnerabilities. A bit like how a CEO might hire McKinsey to do a powerpoint that says “cut costs and increase revenue”, before he/she fires a bunch of people.</p><p>In order to prevent LLMs from defaulting to their suboptimal behavior of calling libraries, we can update the <em>Skills files</em> which are often submitted with the prompt to write code. Skills files are typically markdown (ie simple text) files that define a bunch of common behavior in programming design tasks.</p><p>So skill files are like libraries 2.0? In way yes, but because they are short and written in normal English, they are quite accessible, and developers often <em>do</em> read what is said in those files, as opposed to software libraries 1.0, which are hardly ever delved into and they are not part of the software that goes onto the server, with all the accompanies risks of such a move.</p><p>In short, by using skills files, or by directly specifying in a prompt, that LLMs should avoid using libraries, and instead burn the extra tokens to implement such functionality from scratch, we can maintain many of the benefits of software libraries, while shedding a lot of the security risks and vulnerabilities, as well as general complexity that come with the now-outdated model of software libraries as replicators of code.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=113a7bcb0706" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/libraries-are-replicators-so-are-llms-combining-them-is-a-local-minimum-113a7bcb0706">Libraries are replicators, so are LLMs, combining them is a local minimum</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Winner-take-all: why the petrodollar system works so well, for now]]></title>
            <link>https://medium.com/quast/winner-take-all-why-the-petrodollar-system-works-so-well-for-now-ebb658976e06?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/ebb658976e06</guid>
            <category><![CDATA[petrodollar]]></category>
            <category><![CDATA[geopolitics]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Fri, 10 Apr 2026 11:53:36 GMT</pubDate>
            <atom:updated>2026-04-12T14:54:00.377Z</atom:updated>
            <content:encoded><![CDATA[<p>Most people have heard of the petrodollar system, the Arab countries on the Persian Gulf sell their oil and LPG exclusively in US dollars, which somehow makes the US dollar the preeminent currency in the global monetary system.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3-fwIEPjsPo_5meZu1CSpw.png" /></figure><p>The French president Charles de Gaulle called it an “exorbitant privilege”, referring the earlier but functionally similar preeminence of the US dollar under the 1945–1971 Bretton-Woods system, a kind of psuedo-gold standard.</p><p>So why does a monopoly on oil trades make the US dollar the preeminent currency, by a very very long way? And why do other countries dislike this, but don’t do anything about it?</p><p>Imagine you are a government of a small European country, or another large entity like a multinational, etc. your main expenditures are the salaries of government employees, and arm-length-employees in NGOs, all of which is due on 1–2 specific days in the last week of each month.</p><p>You could just hold cash in the vault in your national currency and on the day of salaries, you pay out, but in doing so you would forfeit any revenue though interest on these financial assets. In fact they lose some value due to inflation.</p><p>Instead, you can hold government bonds, which bear interest. Logically, you would hold some of your own government bonds, unfortunately if you are small country and won’t work.</p><p>When you need to pay salaries you need to sell a very large chunk of bonds all at once, there is no guarantee that there will be a buyer in the relatively small market of your national government debt, but your employees do expect to get paid that day.</p><p>What’s worse, because the market for your national is small, your sudden sale of a large chunk of bonds, this will in all likelihood move the price (down) quite a bit. So now you didn’t raise enough money after all. If you try to prevent this, you oversell, when there are few buyers, this will move the price even more, and now you are stuck with non-productive cash in your vault.</p><p>These two properties, there being enough buyers due to large volume and the price being relatively stable due to large volume are called liquidity and market-depth (the depth of the buy-order book). As mentioned, both these properties are due to the size of the market, the volume of debt paper being traded at any given time.</p><p>You can see where this is going, instead of holding your national government debt, as the national treasurer, you are going to hold whatever interest-bearing instrument has the greatest trading volume, as long as there is no risk of default. Since national governments print their own currency, there is no risk of default, in the worst case, they just print more.</p><p>As it happens, the largest companies in your country, the oil companies that operate there, already hold such an instrument, namely US Government debt, because that is the oil way to buy they can import oil.</p><p>This incentive structure for most national government, and other large institutions to hold US Government debt, instead of e.g. their debt, cash, or something else.</p><p>This dynamic is self-reinforcing, once some governments start holding the largest financial instrument, the trading volume for said instrument grows further, making it even more attractive for other large institutions to also start holding it.</p><p>Well that’s very ingenious, but then it <em>doesn’t seem to have anything to do with petroleum</em>? In a sense, this is correct, but because of the nature of financial instruments, a promise of future payment, the market is not volatile in a daily sense, but it <em>is</em> likely to experience bubbles over longer periods, unless the market is anchored in some way to a concrete substrate.</p><p>So if you want to create the largest market, you need a physical substrate, that helps stabilize it. Prior to the oil crisis of 1973, no single commodity was dominant in international trade, staple foods like corn and wheat together made up the largest market.</p><p>However, the 1973 oil crisis caused a huge increase in the price of oil went from around $2.90 / barrel in mid 1973 to $11.65 six months later. At these 300–400% higher prices, the oil market was suddenly the single-largest international commodity market. This provided the opportunity for using this market as the substrate for the preeminent currency/national-debt market, as was done a few months later when US Secretary of State flew to Saudi Arabia and did a deal with King Faisal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3-fwIEPjsPo_5meZu1CSpw.png" /></figure><p>Now what is the exorbitant privilege that French President Charles de Gaulle was so upset about? If essentially all governments and large institutions hold your national debt as their short-term assets, then this provides an virtually infinite load-bearing capacity for your national debt, which means your can borrow essentially infinite amounts, at essentially zero real (inflation corrected) interest.</p><p>Other countries cannot do this, and so you can outspend them in any geopolitical contest. This borrowing capacity is used to fund a large military, especially a navy. This global military is used to ensure the status quo, and to some extend, limit oil production, keeping the prices high, and (since demand is not very elastic to price changes) the market volume in US dollar the largest.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ebb658976e06" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/winner-take-all-why-the-petrodollar-system-works-so-well-for-now-ebb658976e06">Winner-take-all: why the petrodollar system works so well, for now</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Petrodollar Recycling to AI labs: from Crude to Code]]></title>
            <link>https://medium.com/quast/petrodollar-recycling-to-ai-labs-from-crude-to-code-3993b852e40d?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/3993b852e40d</guid>
            <category><![CDATA[economics]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[petrodollar]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Thu, 09 Apr 2026 11:48:36 GMT</pubDate>
            <atom:updated>2026-04-09T17:57:40.108Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*C5lUYmN89oiDMQjyQu1taQ.jpeg" /></figure><p>Yesterday I gave a short overview the general dynamics in the AI provider / platform competition for what will most likely end up a duopoly market.<br>AI labs in like OpenAI and Anthropic are in a constant hamster-wheel of raising more and more VC money, which can only happen at ever-greater valuations of the company.</p><p>Meanwhile, established Big Tech firms like Google and Facebook open-source their models using revenue from existing business, thereby undermining the business &amp; fund-raising models for the new AI labs.</p><p>On March 3rd, just 72 hours after the Iran conflict, Claude suffered a major outage, and from then on, heavily started rate-limiting (no prompts until 8pm) customers. OpenAI cut Sora the extremely compute-heavy video generation model. Ever since, never-before seen capacity issues were commonplace with the AI labs.</p><p>Venture Capital in large part originates with the GCC SWFs, that is, the Sovereign Wealth Funds of the Gulf Cooperation Council countries, the Arab kingdoms that are across the Persian Gulf from Iran.</p><p>Going back almost 100 years, one of the first acts when FDR started his 1st out of 4 terms, was to sign an executive order banning private ownership of gold. It was to be sold to the Federal Reserve at the official (very low) rate. Immediately after this, FDR repriced the gold to market rates. With large war debts, even this system was no longer sustainable as the Bretton-Woods system was invented. The US was on a “gold-standard” other currencies were pegged to the USD. It wasn’t a real gold standard, because people couldn’t redeem their money for gold, only other central banks could do that (and the directors were encouraged not to do so).</p><p>This system lasted for another 25 or so years, until the even that historian call the “Nixon shock”, which is when the Nixon announced that the gold withdrawal window would be temporarily closed for a few days, brb.</p><p>Soon after, in 1974, US Secretary of State Henry Kisinger traveled to Saudi Arabia and made a 50-year deal with then-Crown Prince. The Arabian American Oil Company (Aramco) would exclusively sell oil in USD, which it would initially put into US Treasury debt, making it the largest most-liquid market. Similar agreements were made with the other Arab kingdoms.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qcLpZdRIQTcxHwHb.jpg" /><figcaption>US Secretary of State Henry Kissingen with King Faisal of Saudi Arabia</figcaption></figure><p>Being the deepest most-liquid market has very large advantages, because very large entities don’t want to hold unprofitable cash, but they want to be able to sell their assets quickly (liquidity) and for a predictable price (deep market). So now all goverments and large corporations want to hold US debt, which means you can essentially borrow without a limit. The GCC countries put this money in SWFs, which generally invested in US markets like estate, DotComs, tech VC and most-recently the AI labs training $ 500M models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LmFTV_rjKs3oYlIWcJCZ3Q.png" /><figcaption>Petrodollar cycle: how based on the largest commodity market, the largest financial market (US debt) becomes self-reinforcing</figcaption></figure><p>Note how the 1974 agreement was for 50 years, i.e. it ended in 2024, and it was not renewed. While this didn’t immediately change everything, after all, AI labs were raising record amounts of VC money at record valuations, it did start a gradual shift to oil sales in other currencies, like the euro, Chinese yuan etc.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oEdgLEIfmz0N5yHKCmppng.png" /><figcaption>Petrodollar flow of USD: from Crude to Code</figcaption></figure><p>However, when the Iran conflict started, and soon afterwards Iran blocked passage of oil and LNG through the straight of Hormuz, this did mean that, for a large part, the source of future Gulf VC money (on which AI labs are dependent to continue operations) dried up overnight.</p><p>The consequence of this is that AI labs had to stop the bleeding of money, and implement rate limits, cut expensive experiments, like video-generation models, etc. whilst they scramble to find alternative sources of funding.</p><p>It is a pretty sudden shift, but it probably mostly acceralated something that was already at its limit. OpenAI’s latest valuation was at $ 852B (albeit questionable), so if a new round (which is needed to continue funding opoeration) were to be raised, it had to be at an order-of-magnitude greater, something like $ 5T. That was not going to happen, so something anyway had to give.</p><p>Sam Altman has been making the case AI is so essential that the US government should keep them afloat. Ironically, the US Secretary of War want to label Anthropic a supply-chain risk, but the DoW direct supplier Palantir cannot really do without Claude. Although it probably isn’t so much the Claude models, as it is their overall toolchain that makes Claude so useful. The toolchain actually leaked onto the internet about 2 weeks ago, so this might also change things.</p><p>Sam Altman is probably right that the AI work is essential, but this is a bit of a slight-of-hand because while AI work may be essential, OpenAI’s AI work might not be, there are others that can fill that void.</p><p>Nvidia is another potential source of funding. Nvidia is currently the most valued company and already does a lot of AI lab funding, this ensures these labs keep using Nvidia GPUs, which in turn keeps Nvidia’s valuation high enough to have these funds available. However, as mentioend above, the AI labs are probably close to the limit of what is possible for a startup valuation, so raising more rounds can’t just continue this way, and Jensen Huang (the CEO) has already been cautioning against expecting too much more investment.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3993b852e40d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/petrodollar-recycling-to-ai-labs-from-crude-to-code-3993b852e40d">Petrodollar Recycling to AI labs: from Crude to Code</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Towards an AI duopoly, big tech open-sourcing models to deny labs funding]]></title>
            <link>https://medium.com/quast/towards-an-ai-duopoly-big-tech-open-source-models-to-labs-funding-4a52b8bef8f0?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/4a52b8bef8f0</guid>
            <category><![CDATA[open-source-model]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[venture-capital]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 13:07:30 GMT</pubDate>
            <atom:updated>2026-04-08T14:21:42.017Z</atom:updated>
            <content:encoded><![CDATA[<p>AI models or LLMs have been getting more and more expensive to train, with recent models around $ 500M and expected to still grow orders of magnitude, and yet many of these very expensive models are immediately open-sourced by Google, Meta, and virtually all Chinese companies.</p><p>These newly open-sourced model usually aren’t quite State-of-the-Art or SOTA, but they are not very far behind at all, usually around six months or so. How does this make sense?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*wK9Fjmelbqu-hKRMZctZmg.jpeg" /><figcaption>South Memphis LLM training cluster built by Twitter / xAI / now SpaceX</figcaption></figure><p>Most technology markets end up in a kind of duopoly, e.g. Windows/MacOS, Chrome/Edge, Android/iOS, Spotify/Apple Music, Google/Apple Wallet, Uber/Lime, etc. And so it expected that the AI market will also converge to a duopoly. Which means it is essentially a battle for survival, hence the fundraising frenzies.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*i6zfEf1ssJ85tpvnEly3HQ.png" /><figcaption>part of a Transformer, the parameters or weights (i.e. numbers) are visualized using color intensity</figcaption></figure><p>The Big Tech players, like Google, Meta, Apple, Amazon (or FAANG, without the Netflix N) have large revenue streams and can essentially fund their AI expenditure for years.</p><p>However, the AI Labs like OpenAI and Anthropic are constantly on the verge of bankruptcy and need to show growing revenue to their investors, typically Sovereign Wealth Funds from Gulf countries through Petrodollar Recycling (more on this, and why the Iran war dried it up in a follow up).</p><p>By open-sourcing their models, in particular the parameters or weights, Big Tech can essentially deny the AI Labs much of this revenue as well as showing stagnant MRR, discouraging further investments. If revenue is low and no VC money can be raised, the lab folds, taking a player off the board, and inching closer to the duopoly.</p><p>At the same time, Chinese Big Tech companies (AliExpress, Xiaomi, Huawei) as well as dedicated Chinese AI labs (Moonshot, etc.) are all open-sourcing there models. This also seems strange.</p><p>Just like the western open-source models are designed to disrupt a market (VC money for labs), the Chinese open-source models are also designed to disrupt a market, or rather the stack of market.</p><p>Through Nvidia for chips, AWS for data centers, Big Tech+Labs as providers, the US has a lot of control over the market for training AI models and offering AI services, which gives the US geopolitical benefits.</p><p>The Chinese models are not exactly SOTA, but by training them on generic Huawei chips instead of proprietary Nvidia, and by open-sourcing the models themselves, the idea is to make this offering ‘good enough’ for the cost, and undermine the western AI stack and its geopolitical alliances.</p><p>Meanwhile, the Iran conflict accelerated the western AI labs funding crisis, as petrodollar recycling seems to be coming to an end, possibly replaced by a new AI-provisioning based <em>technodollar</em>.</p><p>Finally, as LLMs are becoming part of larger AI-based agent system, which integrated with tech companies wider stack, such as their Maps applications, search engine, social media networks, etc., Big Tech has an advantage that might allow them to keep open-sourcing their AI models, and make money in other parts of their stack.</p><p>This, in turn, is something that would negate the Chinese open-sourcing of even SOTA models, since these cannot integrate with western tech stacks.</p><p>Topics for another day!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a52b8bef8f0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/towards-an-ai-duopoly-big-tech-open-source-models-to-labs-funding-4a52b8bef8f0">Towards an AI duopoly, big tech open-sourcing models to deny labs funding</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[autograd: the little-known workhorse of ML taught in high school]]></title>
            <link>https://medium.com/quast/when-we-are-training-a-machine-learning-model-we-have-the-model-predict-the-output-which-we-then-c1c7545d760f?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1c7545d760f</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[autograd]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 15:54:00 GMT</pubDate>
            <atom:updated>2026-03-09T15:55:15.518Z</atom:updated>
            <content:encoded><![CDATA[<p>When we are training a machine learning model, we have the model predict the output, which we then compare to the actual value.</p><p>The difference between the predicted and the actual value is then traced back through the model (so in the opposite direction of prediction, starting from the end), this is called backpropagation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/466/0*gW245OOR4jqBrKsv" /></figure><p>In order to see how much e.g. some weights in layer 1 contribute to the final prediction error, we use a technique called autograd. This is a code implementation of what in high-school mathematics was called ‘the chain rule of differentiation’. Thankfully in high-school I already knew that this couldn’t possibly have any applications in real life, so I didn’t need to spend time on understanding this technique well.</p><p>Hubris notwithstanding, it is actually quite a straightforward but very useful trick.</p><p>Let’s say we buy 5 apples at the store, for a price of $2, we also buy a bag, which is priced the same as the apples.</p><p>We thus have 2 steps: number of apples x price; add once more the price (this time for the bag):</p><pre>apples ----\<br>             * ---- apples_cost ----\<br>price  -----/                        + ---- total_cost<br>                                     /<br>price ------------------------------/</pre><p>If the price is $2, we get: 5 x $2 + $2 (for the bag).</p><p>What the chain rule, or autograd allows us to do, is quickly see how a change in price changes total_cost (both via the cost of the apples, and the cost of the bag).</p><p>Now the price goes up by $1, this affects the last step (adding the cost of the bag to the cost of the apples), but also the first step (# apples x price).</p><p>Since we bought 5 apples:</p><pre>+5 from the apples<br>+1 from the bag<br>--------------------<br>+6 total</pre><p>In calculus we write:</p><pre>d(total_cost)/d(price) = apples + 1 = 5 + 1 = 6</pre><p>In a few days, I will follow up with a short post on how you can implement autograd using a few lines of code in R or python.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/0*mFc7doO3tR4C-szp" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c1c7545d760f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/when-we-are-training-a-machine-learning-model-we-have-the-model-predict-the-output-which-we-then-c1c7545d760f">autograd: the little-known workhorse of ML taught in high school</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[hashing a number using pen and paper]]></title>
            <link>https://medium.com/quast/hashing-a-number-using-pen-and-paper-fd026006b9fe?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/fd026006b9fe</guid>
            <category><![CDATA[encryption]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[hashing]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Tue, 03 Dec 2024 12:26:25 GMT</pubDate>
            <atom:updated>2024-12-03T15:48:57.765Z</atom:updated>
            <content:encoded><![CDATA[<p>The simplest hashing function we can imagine more or less goes like this.</p><p>Let’s take the following three numbers: 5,7,4, this is the data we want to hash.</p><p>Further we generate a random number called the ‘seed’ and we set the hash at 1to begin with.</p><p>To hash the first number we simply multiply the hash with the seed and add the first number of our data:</p><p>1 * 6 + 5 = 11</p><p>Now for to add our second piece of data (the number 7) to the hash we do the same thing, except instead of taking the 1 as the begin value, we take the hash we already calculated (11).</p><p>11 * 6 + 7 = 73</p><p>To also include our final piece of data (the number 4) in the hash, we again do the same thing, again taking the last outcome (73) as the input hash:</p><p>73 * 6 + 4 = 442</p><p>That’s it!</p><p>We have now successfully hashed our data (5,7,4) which gives the hash 442.</p><p>The algorithm that we used here is called the rolling-polynomial hash.</p><p>A simple code snippet can also be used to calculate it:</p><pre># input data<br>digits &lt;- c(5,7,4)<br><br># create the seed and initial hash values<br>seed &lt;- 6<br>hash &lt;- 1<br><br># process each digit<br>for (digit in digits) <br>    hash &lt;- hash * seed + digit</pre><p>The final piece of this code is a loop which runs until the process has been performed for each of the three digits that we stored together in the object digits (on the first line of the code).</p><p>You can run a Python verison of the above code directly here (green play button, next to the trash can icon):</p><iframe src="https://cdn.embedly.com/widgets/media.html?url=https%3A%2F%2Fpython-fiddle.com%2Fsaved%2Fea0b7893-f8ce-4322-b29f-fbb22c8d88bf&amp;type=text%2Fhtml&amp;schema=python-fiddle&amp;display_name=Python-Fiddle&amp;src=https%3A%2F%2Fpython-fiddle.com%2Fsaved%2Fembed%2Fea0b7893-f8ce-4322-b29f-fbb22c8d88bf" width="1280" height="720" frameborder="0" scrolling="no"><a href="https://medium.com/media/070cff7bac405dbb8054f0a45a46abc8/href">https://medium.com/media/070cff7bac405dbb8054f0a45a46abc8/href</a></iframe><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fd026006b9fe" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/hashing-a-number-using-pen-and-paper-fd026006b9fe">hashing a number using pen and paper</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Simplest Blockchain Explanation]]></title>
            <link>https://medium.com/quast/simplest-blockchain-explanation-8bcfbc03adaf?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/8bcfbc03adaf</guid>
            <category><![CDATA[cryptocurrency]]></category>
            <category><![CDATA[bitcoin]]></category>
            <category><![CDATA[blockchain]]></category>
            <category><![CDATA[hashcash]]></category>
            <category><![CDATA[hashing]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Sun, 01 Dec 2024 13:24:37 GMT</pubDate>
            <atom:updated>2024-12-01T15:17:50.499Z</atom:updated>
            <content:encoded><![CDATA[<p>Recipes such as tomato soup a are a way to combine standard ingredients, like tomatoes, onions, broth, in a way that creates a unique dish, it has an unmistakable signature smell, color, and flavor.</p><p>Painters do something similar when they come to paint the trim of a window and bring a few cans from the store, but they way they mix it, makes it match the rest of the trim.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*BJRFFyDkLh3xyKCQ_vsiAQ.jpeg" /><figcaption>Keeping the trim matching gets painter paid</figcaption></figure><p>Now your are stuck with this painter, as irreplaceable as grandma for the tomato soup.</p><p>If we take the number <strong>512,</strong> we can take the digits separately and sum them up: 5 + 1 + 2 = 8</p><p>This number <strong>8</strong> is now a mix of of the original <strong>512</strong>. If we modify 512 in any way, e.g. to <strong>511</strong> the sum changes to 5+1+1=7, 513 adds up to 9.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*9xmjw1J5w3hUVJKypTBFVw.gif" /><figcaption>Summing the digits of the number 215, 2 + 1 + 5 = 8</figcaption></figure><p>We have done something similar here with the piece of data <strong>512</strong> that grandma does with ingredients, or the painter with his palette.</p><p>Mixing data together to derive a final ‘color’ is called hashing, the outcome is the hash.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FfnLGhQ7_PjB09o-LN546A.jpeg" /><figcaption>sha256sum is a popular hashing algorithm e.g. used to verify the integrity of downloaded files</figcaption></figure><p>When people say that the Blockchain algorithm is incredibly elegant, what they mean is — as hard as it is to believe — hashing is the only technical operation in the Blockchain.</p><p>Every Block is a set of Bitcoin transactions, of which we create a hash, using an operation like the above summing up of the digits.</p><p>In each Block we also include the hash of the previous Block. This is what chains the blocks together.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*BEeVL4EMz8s0Q6sdAJeOVQ.png" /><figcaption>The Hash is computed based on the data in a Block, each hash is included in the data of the next block, this makes the chain</figcaption></figure><p>Now what remains is the <strong>mining</strong> of the block, but this is not a technical operation.</p><p>Mining a Block simply means finding a block that starts with an agreed upon number of zeroes (0s).</p><p>Because we cannot predict the numbers of the hash, we are left to basically try different mixes until by chance we get one that has the requisite number of leading zeroes (e.g. 00000X8GKE49).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*aNXhHfAASWTfb-ttiRxSqg.png" /><figcaption>The Hashes all start with a set of zeros (0s), except the first ‘Genesis’ block</figcaption></figure><p>The miner to first find such a hash publishes it and gets the mining reward.</p><p>To this technical work we only add the simple convention that we always take the longest Blockchain to be the true one. If there is any disagreement, this convention sorts that out.</p><p>The rest of the Blockchain system arranges itself, like how the price of tomatoes is set without any bureaucrats meddling.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8bcfbc03adaf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/simplest-blockchain-explanation-8bcfbc03adaf">Simplest Blockchain Explanation</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Encrypted computation with decimal numbers]]></title>
            <link>https://medium.com/quast/encrypted-computation-with-decimal-numbers-8ce8629dc93a?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ce8629dc93a</guid>
            <category><![CDATA[homomorphic-encryption]]></category>
            <category><![CDATA[privacy]]></category>
            <category><![CDATA[kck]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Mon, 19 Aug 2024 09:24:47 GMT</pubDate>
            <atom:updated>2024-08-19T09:24:47.355Z</atom:updated>
            <content:encoded><![CDATA[<p>About eight months ago I wrote a series of posts with Minimal Working Examples (MWEs) on computing on numbers while they are encrypted, e.g. to analyze data in other juristictions. This field is called homomorphic encryption.</p><p>The examples dealt with whole numbers (integers). In data analytics, we are almost always dealing with decimal numbers, so having a way to perform encrypted computation on such numbers is very useful.</p><p>The main schema for this is CKKS, below is a short <em>educational</em> example of how this works implemented in Python. When I say educational note that this means it does not provide any practical encryption, it is merely a toy example of how it works.</p><p>Import the polynom library that we are going to use for polynomials, and numpy for basic numerics.</p><pre>import numpy as np<br>from numpy.polynomial import Polynomial</pre><p>Set parameters</p><pre>M = 8<br>N = M // 2<br>scale = 64<br>xi = np.exp(2 * np.pi * 1j / M)</pre><p>Define functions:</p><pre><br>def vandermonde(xi: np.complex128, M: int) -&gt; np.array:<br>    N = M // 2<br>    matrix = []<br>    for i in range(N):<br>        root = xi ** (2 * i + 1)<br>        row = [root ** j for j in range(N)]<br>        matrix.append(row)<br>    return matrix<br><br>def sigma_inverse(xi, M, b: np.array) -&gt; Polynomial:<br>    A = vandermonde(xi, M)<br>    coeffs = np.linalg.solve(A, b)<br>    p = Polynomial(coeffs)<br>    return p<br><br>def sigma(xi, M, p: Polynomial) -&gt; np.array:<br>    outputs = []<br>    N = M // 2<br>    for i in range(N):<br>        root = xi ** (2 * i + 1)<br>        output = p(root)<br>        outputs.append(output)<br>    return np.array(outputs)<br><br>def create_sigma_R_basis(xi, M):<br>    return np.array(vandermonde(xi, M)).T<br><br>def sigma_R_discretization(xi, M, z):<br>    sigma_R_basis = create_sigma_R_basis(xi, M)<br>    coordinates = compute_basis_coordinates(sigma_R_basis, z)<br>    rounded_coordinates = coordinate_wise_random_rounding(coordinates)<br>    y = np.matmul(sigma_R_basis.T, rounded_coordinates)<br>    return y<br><br>def compute_basis_coordinates(sigma_R_basis, z):<br>    return np.array([np.real(np.vdot(z, b) / np.vdot(b,b)) for b in sigma_R_basis])<br><br>def round_coordinates(coordinates):<br>    return coordinates - np.floor(coordinates)<br><br>def coordinate_wise_random_rounding(coordinates):<br>    r = round_coordinates(coordinates)<br>    f = np.array([np.random.choice([c, c-1], 1, p=[1-c, c]) for c in r]).reshape(-1)<br>    rounded_coordinates = coordinates - f<br>    return [int(coeff) for coeff in rounded_coordinates]<br><br>def pi(M, z: np.array) -&gt; np.array:<br>    N = M // 4<br>    return z[:N]<br><br>def pi_inverse(z: np.array) -&gt; np.array:<br>    z_conjugate = [np.conjugate(x) for x in z[::-1]]<br>    return np.concatenate([z, z_conjugate])<br><br>def encode(xi, M, scale, z: np.array) -&gt; Polynomial:<br>    pi_z = pi_inverse(z)<br>    scaled_pi_z = scale * pi_z<br>    rounded_scale_pi_zi = sigma_R_discretization(xi, M, scaled_pi_z)<br>    p = sigma_inverse(xi, M, rounded_scale_pi_zi)<br>    coef = np.round(np.real(p.coef)).astype(int)<br>    return Polynomial(coef)<br><br>def decode(xi, M, scale, p: Polynomial) -&gt; np.array:<br>    rescaled_p = p / scale<br>    z = sigma(xi, M, rescaled_p)<br>    return pi(M, z)</pre><p>Define a message z:</p><pre>z = np.array([3 + 4j, 2 - 1j])</pre><p>Inspect it:</p><pre>print(z)</pre><p>This gives:</p><pre>[3.+4.j 2.-1.j]</pre><p>Now encode it:</p><pre>p = encode(xi, M, scale, z)</pre><p>Inspect p:</p><pre>print(p)</pre><p>This gives us:</p><pre>160.0 + 91.0·x + 160.0·x² + 46.0·x³</pre><p>Now decode it again:</p><pre>decoded_z = decode(xi, M, scale, p)</pre><p>Inspect decoded_z, make sure it is equal to the original message z:</p><pre>print(decoded_z)</pre><p>This will give:</p><pre>array([2.99718446+4.01365045j, 2.00281554-0.98634955j])</pre><p>These are small rounding errors, which are a result of the noise we intentionally introduced as part of our encryption, when we round these off, the 3+4i, 2-1i is indeed equal to our original message z.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ce8629dc93a" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/encrypted-computation-with-decimal-numbers-8ce8629dc93a">Encrypted computation with decimal numbers</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Sankey diagram in highcharts Python]]></title>
            <link>https://medium.com/quast/sankey-diagram-in-highcharts-python-02a2d161cfc1?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/02a2d161cfc1</guid>
            <category><![CDATA[notebook]]></category>
            <category><![CDATA[highcharts]]></category>
            <category><![CDATA[sankey-diagram]]></category>
            <category><![CDATA[dataviz]]></category>
            <category><![CDATA[sankey]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Sat, 29 Jun 2024 13:23:15 GMT</pubDate>
            <atom:updated>2024-06-30T03:56:56.846Z</atom:updated>
            <content:encoded><![CDATA[<p>The amazing highcharts library includes Sankey diagrams. I use Python to create diagrams, typically in HEX notebooks (like Jupyter notebooks), so in this post we will work through a short example of creating a Sankey diagram in highcharts using Python.</p><p>Let’s begin by installing the library (from our Jupyter or HEX notebook).</p><pre># install highcharts-core using pip<br>!pip install highcharts-core</pre><p>Next, load the module:</p><pre># import catch-all .highcharts module.<br>from highcharts_core import highcharts</pre><p>Now we define some data that we will use for our chart, it has 3 dimensions, the from, the to, and the magnitude called weight. You’ll notice that each of the 4 from countries combines with each of the 4 to countries exactly once.</p><pre># define the data<br>my_iterable = [<br>    {&#39;from&#39;: &#39;Brazil&#39;, &#39;to&#39;: &#39;Portugal&#39;, &#39;weight&#39;: 5},<br>    {&#39;from&#39;: &#39;Brazil&#39;, &#39;to&#39;: &#39;France&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;Brazil&#39;, &#39;to&#39;: &#39;Spain&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;Brazil&#39;, &#39;to&#39;: &#39;England&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;Canada&#39;, &#39;to&#39;: &#39;Portugal&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;Canada&#39;, &#39;to&#39;: &#39;France&#39;, &#39;weight&#39;: 5},<br>    {&#39;from&#39;: &#39;Canada&#39;, &#39;to&#39;: &#39;England&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;Mexico&#39;, &#39;to&#39;: &#39;Portugal&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;Mexico&#39;, &#39;to&#39;: &#39;France&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;Mexico&#39;, &#39;to&#39;: &#39;Spain&#39;, &#39;weight&#39;: 5},<br>    {&#39;from&#39;: &#39;Mexico&#39;, &#39;to&#39;: &#39;England&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;USA&#39;, &#39;to&#39;: &#39;Portugal&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;USA&#39;, &#39;to&#39;: &#39;France&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;USA&#39;, &#39;to&#39;: &#39;Spain&#39;, &#39;weight&#39;: 1},<br>    {&#39;from&#39;: &#39;USA&#39;, &#39;to&#39;: &#39;England&#39;, &#39;weight&#39;: 5}<br>]</pre><p>Finally we set up the chart and show it:</p><pre># set up the chart, feed the data, define the type<br>chart = highcharts.Chart(data = my_iterable, series_type = &#39;sankey&#39;)<br><br># structure the series<br>chart.series = [{<br>    &quot;keys&quot;: [&quot;from&quot;, &quot;to&quot;, &quot;weight&quot;],<br>    &quot;data&quot;: my_iterable,<br>}]<br><br># print chart <br># N.B.: do NOT use .display() after the object name (in HEX)<br>chart</pre><p>This should show a chart which responds to mouse hoover like so:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rQWbmOqgLFn1qAvrAAmcEA.png" /></figure><p>That’s it, let me know in the comments how it goes, if this is working an how you are using it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=02a2d161cfc1" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/sankey-diagram-in-highcharts-python-02a2d161cfc1">Sankey diagram in highcharts Python</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Model vs. Algorithm]]></title>
            <link>https://medium.com/quast/model-vs-algorithm-2f9bbf628ac6?source=rss-6cb4b3af9757------2</link>
            <guid isPermaLink="false">https://medium.com/p/2f9bbf628ac6</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Bastiaan Quast]]></dc:creator>
            <pubDate>Tue, 25 Jun 2024 00:00:09 GMT</pubDate>
            <atom:updated>2024-06-25T16:24:20.643Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BtDf82Oy_cBx53KgxYsqqw.jpeg" /></figure><p>As discussion about Artificial Intelligence has become a mainstream topic, we hear a lot of terms used in loosely. One problematic confusion is the terms model and algorithm, typically calling everything an algorithm (because it sounds more scientific?).</p><p>In fact, when we are talking about AI in applications (in society) we are almost always talking about models, not about algorithms.</p><p>A model is a stylized way to describe a relation between two things, just like a London supermodel is a stylized way to show off clothes.</p><p>An algorithm is a mathematic procedure to compute the model, much like a recipe to bake a cake. Or, say, the eating and exercise regimen you need to follow to become a fashion supermodel.</p><p>You are already very familiar with thinking about models, although they are rarely called that. Think about the scatter plot:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*uc1QVX2yiiMUEoXZ.png" /></figure><p>As you know, all the dots on the chart represent countries. In this chart, there is a general south-west to north-east trend in the point cloud. This trend represents the fact that: the greater a country’s proportion of bank account holders, the more well off the country is (we are taking this as correlation, not going into causation).</p><p>We can illustrate this trend by drawing a line in the direction of the general trend in the point cloud (as indeed is done in this chart). This line is a stylized / simplified / synthesized way of describing the trend. This trend line is a vizualization of a model (as we used the term above).</p><p>The model here consists of 2 numbers (called parameters). The first number is the height on the y-axis where the trend line intersects with it (in this example that section of the trend is not displayed, but it lies around 10 on the y-axis).</p><p>The second number is the steepness of the trend line. The greater the number, the steeper the line, where negative numbers describe a downward trend and very high numbers describe an almost vertical line (note that the 0–100 distance is greater on the x-axis in this chart than the y-axis, so the visual is a bit warped, The Economist likes page-width graphics). These two numbers — the y-intercept and the steepness parameter — together are a linear model.</p><p>Now that we have established what a model is, what is an algorithm? and why would we even need something more?</p><p>The algorithm is a procedure to precisely compute the parameters (numbers) of the model. In the case of the linear model that we are discussing here the most popular algorithm to compute the parameters is called <a href="https://en.wikipedia.org/wiki/Ordinary_least_squares">Ordinary Least Squares</a> (OLS).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*nW_BXdEuUb4sv1VGgXBhXg.png" /></figure><p>When we put all the values of the observations (the countries) in a matrix (a table) the OLS algorithm describes the mathematical operations to perform with the matrices to arrive at the two parameters of the model (y-intercept + trend steepness).</p><p>Note that like with cooking, there are often multiple recipes to arrive at the outcome (cake/model), for instance we could also use <a href="https://en.wikipedia.org/wiki/Newton&#39;s_method">Newton’s method</a> (algorithm), which is a key part of what are now called “neural networks”.</p><p>The concept algorithm was named after the 8th century B.C. Persian mathematician <a href="https://en.wikipedia.org/wiki/Al-Khwarizmi">Muḥammad ibn Mūsā al-Khwārizmī</a>.</p><p><em>Originally published at </em><a href="https://bastiaanquast.com/model-vs-algorithm/"><em>https://bastiaanquast.com</em></a><em> on June 25, 2024.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2f9bbf628ac6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/quast/model-vs-algorithm-2f9bbf628ac6">Model vs. Algorithm</a> was originally published in <a href="https://medium.com/quast">qua.st</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>