<?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 Agnis Liukis on Medium]]></title>
        <description><![CDATA[Stories by Agnis Liukis on Medium]]></description>
        <link>https://medium.com/@agnis-liukis?source=rss-ce835d44241e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*qv8YqSBqyUw70CrZ_Nxz1Q.jpeg</url>
            <title>Stories by Agnis Liukis on Medium</title>
            <link>https://medium.com/@agnis-liukis?source=rss-ce835d44241e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 09:37:09 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@agnis-liukis/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[Putting a Machine Learning Model in Production]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://levelup.gitconnected.com/putting-a-machine-learning-model-in-production-4bffa6dda432?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*IHtKdibMnmM_FbTY" width="4016"></a></p><p class="medium-feed-snippet">Things to consider before giving your model real tasks</p><p class="medium-feed-link"><a href="https://levelup.gitconnected.com/putting-a-machine-learning-model-in-production-4bffa6dda432?source=rss-ce835d44241e------2">Continue reading on Level Up Coding »</a></p></div>]]></description>
            <link>https://levelup.gitconnected.com/putting-a-machine-learning-model-in-production-4bffa6dda432?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bffa6dda432</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Mon, 16 Jan 2023 02:05:56 GMT</pubDate>
            <atom:updated>2023-01-16T02:05:56.747Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Writing effective Pandas code]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://levelup.gitconnected.com/writing-effective-pandas-code-553f1bad921c?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*MHCxKKo-NCvm77Y5" width="3264"></a></p><p class="medium-feed-snippet">Everything in programming can be done in multiple ways. Some ways are better than others. Some ways are much worse. A good programmer is&#x2026;</p><p class="medium-feed-link"><a href="https://levelup.gitconnected.com/writing-effective-pandas-code-553f1bad921c?source=rss-ce835d44241e------2">Continue reading on Level Up Coding »</a></p></div>]]></description>
            <link>https://levelup.gitconnected.com/writing-effective-pandas-code-553f1bad921c?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/553f1bad921c</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[pandas]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Sun, 06 Nov 2022 22:22:55 GMT</pubDate>
            <atom:updated>2022-11-06T22:22:55.857Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[4 advanced Machine Learning techniques]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/4-advanced-machine-learning-techniques-71d485e9fcab?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*RqD6ztLjOaoqEvki" width="4707"></a></p><p class="medium-feed-snippet">Alternative ways to improve the model score even further</p><p class="medium-feed-link"><a href="https://medium.com/data-science/4-advanced-machine-learning-techniques-71d485e9fcab?source=rss-ce835d44241e------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/4-advanced-machine-learning-techniques-71d485e9fcab?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/71d485e9fcab</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Thu, 06 Oct 2022 13:51:03 GMT</pubDate>
            <atom:updated>2022-10-06T13:51:03.100Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Optimizing the Random Seed]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/optimizing-the-random-seed-99a90bd272e?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*83MCgD6_QqblnLpT" width="5760"></a></p><p class="medium-feed-snippet">Is there any point in doing that?</p><p class="medium-feed-link"><a href="https://medium.com/data-science/optimizing-the-random-seed-99a90bd272e?source=rss-ce835d44241e------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/optimizing-the-random-seed-99a90bd272e?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/99a90bd272e</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[model-optimization]]></category>
            <category><![CDATA[random-seed]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Tue, 09 Aug 2022 15:31:34 GMT</pubDate>
            <atom:updated>2022-08-09T15:31:34.698Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[5 typical beginner mistakes in Machine Learning]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/5-typical-beginner-mistakes-in-machine-learning-3544bd4109b?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*iopSwX0efzuqeVaA" width="5948"></a></p><p class="medium-feed-snippet">If you are about to build your first model, be aware and avoid these</p><p class="medium-feed-link"><a href="https://medium.com/data-science/5-typical-beginner-mistakes-in-machine-learning-3544bd4109b?source=rss-ce835d44241e------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/5-typical-beginner-mistakes-in-machine-learning-3544bd4109b?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/3544bd4109b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[beginners-guide]]></category>
            <category><![CDATA[mistakes-to-avoid]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Mon, 18 Jul 2022 14:09:58 GMT</pubDate>
            <atom:updated>2022-07-18T14:09:58.863Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[Linear Regression — the power of the simplicity]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://agnis-liukis.medium.com/linear-regression-the-power-of-the-simplicity-f4fdef4c7a1b?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*jBNjuiC0RXsW2bpE" width="6000"></a></p><p class="medium-feed-snippet">Possibly, the most undervalued ML algorithm.</p><p class="medium-feed-link"><a href="https://agnis-liukis.medium.com/linear-regression-the-power-of-the-simplicity-f4fdef4c7a1b?source=rss-ce835d44241e------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://agnis-liukis.medium.com/linear-regression-the-power-of-the-simplicity-f4fdef4c7a1b?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/f4fdef4c7a1b</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[linear-regression]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Thu, 06 Jan 2022 17:49:04 GMT</pubDate>
            <atom:updated>2022-01-06T17:49:04.872Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to become a Kaggle Competitions Grandmaster]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/how-to-become-a-kaggle-competitions-grandmaster-9d77431c5b7d?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*ga8IrufIAoyLVX6i" width="3656"></a></p><p class="medium-feed-snippet">It won&#x2019;t be easy, but you can do it and it&#x2019;s worth it</p><p class="medium-feed-link"><a href="https://medium.com/data-science/how-to-become-a-kaggle-competitions-grandmaster-9d77431c5b7d?source=rss-ce835d44241e------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/how-to-become-a-kaggle-competitions-grandmaster-9d77431c5b7d?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d77431c5b7d</guid>
            <category><![CDATA[kaggle]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Wed, 01 Sep 2021 06:17:54 GMT</pubDate>
            <atom:updated>2021-09-01T12:32:11.323Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[4 usages of an ELSE clause in Python]]></title>
            <link>https://levelup.gitconnected.com/4-usages-of-an-else-clause-in-python-c91c392733c1?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/c91c392733c1</guid>
            <category><![CDATA[code]]></category>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Mon, 30 Aug 2021 01:10:07 GMT</pubDate>
            <atom:updated>2021-08-30T01:10:07.261Z</atom:updated>
            <content:encoded><![CDATA[<p>The existence of some of these may be a surprise for you.</p><p>Most of us know IF-ELSE syntax. But the IF statements are not the only place for using an ELSE clause. Haven’t you used an ELSE clause when writing loops? Or maybe when handling exceptions? If no, then you most probably will find out something new about the Python programming language in a couple of next paragraphs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EqPn43H4fwEBxh95" /><figcaption>Photo by <a href="https://unsplash.com/@freegraphictoday?utm_source=medium&amp;utm_medium=referral">AbsolutVision</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><blockquote>IF-ELSE</blockquote><p>That is the most well-known usage of an ELSE clause. I won’t write much about it. If you are a Python programmer, you are using this every day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EQ_vHW3zr9eZUjUr7yUgHQ.png" /><figcaption>IF-ELSE statement (screenshot by the author)</figcaption></figure><p>Everything is clear and straight-forward. Let’s go to a little bit more interesting use case now.</p><blockquote>FOR-ELSE</blockquote><p>We are using a FOR keyword to create loops. But not everybody knows that there is an optional ELSE clause to a FOR loop. Let’s consider the following example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x5-BSWM9S36D8U21N6T26Q.png" /><figcaption>FOR-ELSE statement (screenshot by the author)</figcaption></figure><p>As you can see, we are using an ELSE clause at the same level as the FOR keyword (not together with an IF statement). Code is executed successfully, but the code in the ELSE clause is not triggered.</p><p>Now let’s compare this with a slightly different example below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aERy4jzPgpgW5bY8K0BiZg.png" /><figcaption>FOR-ELSE statement 2 (screenshot by the author)</figcaption></figure><p>As you can see, now the code in the ELSE clause is triggered, as the text “ELSE” is printed out. The only difference from the previous example is that the condition inside the FOR loop was never true, hence the BREAK statement didn’t execute and we looped through all the elements.</p><p>That is exactly what an ELSE clause is used for in FOR loops. This clause executes if a loop has iterated through all the elements. The intuition behind this logic is as follows — typically we break out of the loop when we have found an item of our interest, else (if we didn’t found it) we iterate through the loop fully.</p><blockquote>WHILE-ELSE</blockquote><p>An idea is very similar when using an ELSE clause in a WHILE loop. If we break out of the loop, the ELSE clause won’t execute as in the example below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SlohBWEtLDv-lDMrsXDl5A.png" /><figcaption>WHILE-ELSE example (screenshot by the author)</figcaption></figure><p>Let’s change the condition inside the loop in a way so that the BREAK statement is never triggered.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NGJr5t7Vu1ER_Hc-ZFIz8g.png" /><figcaption>WHILE-ELSE example 2 (screenshot by the author)</figcaption></figure><p>As expected, now we see the text “ELSE” printed out in the console.</p><p>So if the WHILE loop finishes because its condition evaluates to “False”, we get the ELSE clause executed. But if we break the loop or execute a RETURN statement from inside a function — the ELSE part is not executed.</p><blockquote>TRY-EXCEPT-ELSE</blockquote><p>Now, this use-case is a little bit different from the previous ones. We are typically using TRY keywords to handle exceptions. But we can use an ELSE clause in a TRY statement as well. Let’s start again with a simple example.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qJZ5Nv2syMfI-L8W4oxqhw.png" /><figcaption>TRY-EXCEPT-ELSE syntax (screenshot by the author)</figcaption></figure><p>We can see the ELSE clause used in the TRY-EXCEPT statement, but as we can observe from the output — this clause didn’t get executed.</p><p>Let’s try now to modify our code in a way so that the ELSE clause executes.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*LjDc-qPdZ0xt6iJDlcGtnA.png" /><figcaption>TRY-EXCEPT-ELSE syntax 2 (screenshot by the author)</figcaption></figure><p>Bingo! Now we see our ELSE clause in action. And we also got an intuition about how things work here. An ELSE clause in a TRY-EXCEPT statement is executed only if there was no exception thrown.</p><p>If we re-phrase it a bit so that an “Else” word semantically makes sense — if there is an exception, the EXCEPT clause is executed, else (if there were no exception) the ELSE part works.</p><p>Of course, we can use the FINALLY clause as well — this is executed in all the cases. So the full syntax example is as follows.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TFzrv7Edu85lwv3hwLthZA.png" /><figcaption>TRY-EXCEPT-ELSE-FINALLY statement (screenshot by the author)</figcaption></figure><p>As expected, the text “FINALLY” is printed out in the console output.</p><h4>One more IF-ELSE statement as a bonus</h4><p>IF you learned at least one new Python code construction in this article: follow me not to miss other similar articles.</p><p>ELSE: it’s up to you to follow me or not.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*1Xop9FR7rf6lj70c" /><figcaption>Photo by <a href="https://unsplash.com/@alexas_fotos?utm_source=medium&amp;utm_medium=referral">Alexas_Fotos</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Thanks for reading!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c91c392733c1" width="1" height="1" alt=""><hr><p><a href="https://levelup.gitconnected.com/4-usages-of-an-else-clause-in-python-c91c392733c1">4 usages of an ELSE clause in Python</a> was originally published in <a href="https://levelup.gitconnected.com/">Level Up Coding</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 intermediate level Python tricks you maybe didn’t know]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://levelup.gitconnected.com/5-intermediate-level-python-tricks-you-maybe-didnt-know-b0340ad33e7a?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/2600/0*o4EhKo3uUflqMpTC" width="3032"></a></p><p class="medium-feed-snippet">Let&#x2019;s make our Python code better!</p><p class="medium-feed-link"><a href="https://levelup.gitconnected.com/5-intermediate-level-python-tricks-you-maybe-didnt-know-b0340ad33e7a?source=rss-ce835d44241e------2">Continue reading on Level Up Coding »</a></p></div>]]></description>
            <link>https://levelup.gitconnected.com/5-intermediate-level-python-tricks-you-maybe-didnt-know-b0340ad33e7a?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/b0340ad33e7a</guid>
            <category><![CDATA[python3]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Wed, 18 Aug 2021 00:00:28 GMT</pubDate>
            <atom:updated>2021-08-18T00:00:28.305Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[The Basic Building Block of Neural Networks]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/data-science/the-basic-building-block-of-neural-networks-a9b2e8f5c056?source=rss-ce835d44241e------2"><img src="https://cdn-images-1.medium.com/max/945/1*guIlDajMnLgAk6DJICI2Cw.png" width="945"></a></p><p class="medium-feed-snippet">Exploring the Dense layer from Keras, down till the source code</p><p class="medium-feed-link"><a href="https://medium.com/data-science/the-basic-building-block-of-neural-networks-a9b2e8f5c056?source=rss-ce835d44241e------2">Continue reading on TDS Archive »</a></p></div>]]></description>
            <link>https://medium.com/data-science/the-basic-building-block-of-neural-networks-a9b2e8f5c056?source=rss-ce835d44241e------2</link>
            <guid isPermaLink="false">https://medium.com/p/a9b2e8f5c056</guid>
            <category><![CDATA[neural-networks]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[keras]]></category>
            <category><![CDATA[dense-layer]]></category>
            <dc:creator><![CDATA[Agnis Liukis]]></dc:creator>
            <pubDate>Thu, 29 Oct 2020 20:47:54 GMT</pubDate>
            <atom:updated>2020-10-29T23:07:29.155Z</atom:updated>
        </item>
    </channel>
</rss>