<?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 Alec KB on Medium]]></title>
        <description><![CDATA[Stories by Alec KB on Medium]]></description>
        <link>https://medium.com/@aleckb?source=rss-51e57fb0be0b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Q-_406y_-WEpwZJU.</url>
            <title>Stories by Alec KB on Medium</title>
            <link>https://medium.com/@aleckb?source=rss-51e57fb0be0b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 18:00:10 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aleckb/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[What is Maximum Likelihood Estimation?]]></title>
            <link>https://medium.com/@aleckb/what-is-maximum-likelihood-estimation-33e375badb6c?source=rss-51e57fb0be0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/33e375badb6c</guid>
            <category><![CDATA[computer-science-student]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[cambridge-university]]></category>
            <category><![CDATA[statistics]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Alec KB]]></dc:creator>
            <pubDate>Tue, 04 Jan 2022 14:44:19 GMT</pubDate>
            <atom:updated>2022-01-04T14:44:19.812Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6IguAajIXzoUX1Fp" /><figcaption>Photo by <a href="https://unsplash.com/@tamiminaser?utm_source=medium&amp;utm_medium=referral">Naser Tamimi</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Introduction</h3><p>Given a dataset, we often want to “fit” a Random Variable to it so we can analyse it further. Any Random Variable is technically valid, as long as it can actually produce the values we want (So no Uniform(0,1) if our dataset has the number 2, for example).</p><p>However are we actually getting anything valuable from assigning a random Random Variable to this dataset and calling it done? No, not really. Instead, we use Maximum Likelihood Estimation</p><h3>Step 1: Random Variable</h3><p>We start off by choosing a Random Variable to fit to the set, this choice should be based on what makes sense judging by where the dataset comes from. (If you don’t know, should you really be analysing it?) Often a Normal (Gaussian) Distribution is good, but some cases call for others.</p><h3>Step 2: Parameters</h3><p>Now that we have our Random Variable, we have to decide what parameters to choose. We could just pluck these out of thin air but this gets us no further than what we started with. This is where Maximum Likelihood Estimation comes in.</p><h3>Step 2.1: Dataset Likelihood</h3><p>Maximum Likelihood Estimation aims to maximise the likelihood of the dataset (its kinda in the name), so obviously we need to figure out what this is. To do this we get the likelihood of each data item, based on the unknown parameters, and then multiply it all together. This is the function we want to maximise. But how do we do that?</p><h3>Step 2.2: Maximising the Likelihood</h3><p>Generally when we want to find the maximum of any function use differentiation, we could also use numerical methods but these should only be done in cases where we cannot use calculus, as we won’t get as accurate answers.</p><p>So we begin by differentiating our datasets likelihood, and setting this equal to 0. This is where the hard part is. We need to rearrange this equation so that we can eliminate all but one of our unknown parameters, and then repeat this with the values we find until we’ve determined the value of every parameter.</p><h3>Step 3: Conclusion</h3><p>Now that we know the values of all of the parameters, we can just plug these back into the Random Variable we were trying to fit onto our dataset, and we’re done! We have a Random Variable that we can use to analyse our dataset further.</p><p>Hope you found this useful!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=33e375badb6c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What are ACID Operations?]]></title>
            <link>https://medium.com/@aleckb/what-are-acid-operations-8ab4aecd5007?source=rss-51e57fb0be0b------2</link>
            <guid isPermaLink="false">https://medium.com/p/8ab4aecd5007</guid>
            <category><![CDATA[computer-science-student]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[data]]></category>
            <category><![CDATA[transactions]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Alec KB]]></dc:creator>
            <pubDate>Sun, 28 Nov 2021 14:13:20 GMT</pubDate>
            <atom:updated>2021-11-28T14:13:20.632Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*6erDdMURjaKGo02l" /><figcaption>Photo by <a href="https://unsplash.com/@mbaumi?utm_source=medium&amp;utm_medium=referral">Mika Baumeister</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Overview</h3><p>ACID Operations describe properties that we want our database transactions to follow, so that we don’t get in a mess when things go wrong!</p><p>ACID stands for:</p><p><strong>A</strong>tomicity<strong><br>C</strong>onsistency<strong><br>I</strong>solation<strong><br>D</strong>urability</p><p>Now we’ll look at what these mean, and why we care!</p><h3>Atomicity</h3><p><em>“Transactions should be occur uninterrupted”</em></p><p>Transactions are often made up of multiple operations (e.g. load value X, add one to it, then save it to Y, then save it to Z). However if the database crashes during a transaction we can be left with faulty data. (e.g. if the transaction from before fails between saving to Y and to Z, when we load back up Y and Z will store different values!) This is not something we want, obviously, so we need to make sure our operations happen completely successfully, or not at all.</p><p>There are many ways to make our operations atomic, such as keeping a log of what transactions have and haven’t finished yet, and the data they were working on, so that we can restart them if something crashes</p><h3>Consistency</h3><p><em>“Transactions on a consistent database should leave the database consistent”</em></p><p>Databases often involve a lot of rules that the data must follow (known as invariants). An example of this might be mathematical relationships between data, such as Y=X+1. If we update X, we must make sure to update Y as well. This is often done by implementing our transactions so that they do this, and has a lot of interesting nuance. What if we don’t know what data relies on other data items? What if the number of data items that rely on a particular item is incredibly large, and so the transaction would take a very long time? All of these are questions the transaction designer must think about.</p><h3>Isolation</h3><p><em>“Transactions should be able to act as if they are the only operation running”</em></p><p>Databases often have a lot of transactions running at the same time. But what happens if one transaction modifies data that another is working on? We run into problems! We want to be able to run multiple instructions concurrently without running into issues like this. This is a HUGE field, with many nuances and pitfalls, so I won’t go into it too much here, but one of the most popular strategies for implementing this is Locking, where we only allow one transaction to access certain sections of data at a time. This can range from locking the entire database, to locking tiny sections, with tradeoffs for each level.</p><h3>Durability</h3><p><em>“Transactions should be permanent once completed, even if the system fails”</em></p><p>This means that if our databases crashes, the value of X that we committed before this will still exist after we load back up. You wouldn’t want to lose your concert tickets because the database crashed! We usually implement durability measures using a log of transactions saved in non-volatile storage, and before we “commit” a transaction we save a record of what we did to this log. After the crash we can then go through this log again to figure out what happened.</p><h3>Wrapping Up</h3><p>So, now you know what ACID means, and why you should care about these properties. Follow me for more computer science articles!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8ab4aecd5007" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>