<?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 Farisology on Medium]]></title>
        <description><![CDATA[Stories by Farisology on Medium]]></description>
        <link>https://medium.com/@farisology?source=rss-4919b13746a1------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*KabGLlA7eV-PWXRblk2Prg.png</url>
            <title>Stories by Farisology on Medium</title>
            <link>https://medium.com/@farisology?source=rss-4919b13746a1------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 21:27:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@farisology/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[ZenML: The Ultimate Open-Source Framework for MLOps]]></title>
            <link>https://farisology.medium.com/zenml-the-ultimate-open-source-framework-for-mlops-9e64900f16ec?source=rss-4919b13746a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e64900f16ec</guid>
            <category><![CDATA[machine-lear]]></category>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[mlops]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Farisology]]></dc:creator>
            <pubDate>Fri, 18 Aug 2023 08:54:12 GMT</pubDate>
            <atom:updated>2023-08-18T08:54:12.347Z</atom:updated>
            <content:encoded><![CDATA[<p>Empower Your ML Workflows with the Ultimate Open-Source Framework</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5N2WTOLZzOW0qEU_sfIWMQ.png" /><figcaption>Foster collaboration across the team (Photo from ZenML Docs)</figcaption></figure><p>MLOps is incredibly important in the ML landscape because it brings efficiency, reliability, and scalability to machine learning projects. It streamlines the process of taking ML models from development to production, ensuring smooth operations and faster time-to-market. MLOps enables teams to manage and monitor models effectively, leading to better decision-making and improved business outcomes. By embracing MLOps practices, organizations can unleash the full potential of their ML initiatives and drive innovation with confidence.</p><p>In the past, data scientists and ML engineers operated without the concept of MLOps stacks. However, the foundations were similar, relying on orchestrators and cloud resources for automation. Today, numerous MLOps platforms from big tech companies and others have emerged, offering various options. But there’s one framework that stands out: ZenML. As an open-source MLOps platform, ZenML offers exceptional capabilities that set it apart. In this article, we’ll explore why you should give ZenML a try and experience its remarkable potential.</p><h3>Understanding ZenML</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*W4W1sBB-27M9-l-8gbv3oQ.png" /><figcaption>Unlike any other, ZenML promotes no vendor lock-in</figcaption></figure><h4>Key features</h4><ol><li>Glue: ZenML unlike other frameworks empowers you to plug your own choice of orchestrator, artefacts store, model deployer and etc. Your stack is literally completely yours.</li><li>Modularity: ZenML enforces a modular approach to building ML workflows. Breaking down workflows into smaller, reusable steps, promotes code reusability, maintainability, and scalability.</li><li>Standardization: ZenML helps standardize ML practices within a team or organization. It provides a consistent framework for developing and deploying ML workflows, enabling collaboration and streamlining processes.</li><li>Reproducibility: With ZenML, it’s easy to reproduce ML workflows, ensuring consistent results. It tracks data and model versions, making it effortless to recreate experiments and verify results.</li></ol><h4>Pipeline structure</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nXrjpip7D0g_8i3luf0o4w.png" /><figcaption>(Representation of a pipeline dag) Photo from ZenML Docs</figcaption></figure><p>ZenML enables a modular approach to ML workflows by breaking them down into smaller, independent components called steps. Each step performs a specific task, such as data preprocessing, feature engineering, or model training. This modular design promotes code reusability, maintainability, and scalability. Steps can be easily combined and rearranged to create different pipelines, providing flexibility and adaptability to changing requirements.</p><p>Observe how the following pipeline is built with two steps. Each step is a Python method denoted with the step decorator:</p><pre>from zenml import pipeline, step<br><br>@step<br>def step_1() -&gt; str:<br>  return &quot;world&quot;<br><br>@step<br>def step_2(input_one: str, input_two: str) -&gt; None:<br>  combined_str = input_one + &#39; &#39; + input_two<br>  print(combined_str)<br><br>@pipeline<br>def my_pipeline():<br>  output_step_one = step_1()<br>  step_2(input_one=&quot;hello&quot;, input_two=output_step_one)<br><br>my_pipeline()</pre><p>ZenML uses a pipeline structure to orchestrate the execution of steps in a logical sequence. A pipeline represents the end-to-end flow of an ML workflow. It defines the order in which steps are executed and manages their dependencies. Pipelines make it easy to visualize and manage complex ML workflows, ensuring that data flows smoothly from one step to another. The pipeline structure provides a clear and organized way to manage the entire ML workflow, from data preprocessing to model deployment.</p><blockquote>By adopting a modular approach and pipeline structure, ZenML allows for the creation of scalable, reproducible, and manageable ML workflows. It promotes code organization, collaboration among team members, and the ability to reuse and iterate on specific steps or pipelines. This structure enhances the overall efficiency and effectiveness of ML workflow management.</blockquote><h4>Build locally</h4><p>In the course of ML workflow development, the data scientists can test and iterate on their workflow code and design locally. The pipeline can run using a local stack and debugging is easy before rolling it out to production. The ZenML client provides a user-friendly interface to test and run pipelines during development.</p><h4>Federate responsibilities</h4><p>It’s easier to manage the Ops of MLOps in ZenML. Data scientists and ML engineers can build workflows and design pipelines for various projects. The platform engineer can work on the creation of stacks and provision of resources that the data science team require to operate their pipeline.</p><h3>The Zen for your ML Operations</h3><p>The reality of MLOps today is that you need advanced expertise and considerable investment to make a good ML practice for your team. This is a limiting factor and could trap the field and practitioners in narrow ally and poor implementations. The ideal solution is getting a simple ML stack managed with some framework that doesn’t dictate your choices. This ideal solution is what ZenML is able to deliver.</p><blockquote>Regardless of the size of your team and the level of expertise you have, you can get most of MLOps with ZenML</blockquote><p>The creation of the MLOps stack and the level of complexity all depend on the choices you made. For example, you could have a simple stack that consists of an orchestrator (be it Kubeflow or Airflow), tracking with MLflow and Minio. Alternatively, your team might need more like drift detection and other components and it can be managed in the pipeline level and stack level giving you absolute flexibility even for relatively small teams.</p><h4>ZenML Sandbox</h4><p>You can have a one-click MLOps platform to experience ZenML with production-grade Stack from the main website here:</p><p><a href="https://sandbox.zenml.io/">Home | MLOps Platform Sandbox: An ephemeral MLOps platform with ZenML, MLflow, Kubeflow and Minio.</a></p><p>At your fingertips an experience like no other that will give a sense of how this can be truly transformative for your team. There are more resources to even take this infra into your own cloud with ZenML stack recipes.</p><h4>Hands-on ZenML</h4><p>If you want to get your hands on with code and tutorials to see the lower level of creating a stack and running a simple use-case you can check this series of articles:</p><p><a href="https://farisology.com/series/mlops-zenml">Getting the Most Out of MLOps with ZenML - Farisology</a></p><h4>ZenML projects</h4><p>The framework has been growing at a fast pace and the amount of projects and development is impressive. There are many projects that are shared on the main website to help you replicate production-grade use cases.</p><p><a href="https://zenml.io/projects">ZenML | Projects</a></p><h3>Final words</h3><p>In my quest to establish an efficient MLOps practice, I extensively researched and evaluated various options. Among them, ZenML emerged as the clear choice. Its modular approach and pipeline structure enables seamless integration, scalability, and code reusability. What sets ZenML apart is its unmatched flexibility to build customizable MLOps stacks that can run on any cloud platform. With ZenML, teams can embrace the freedom of no vendor lock-in and harness the power of open-source tools. While ZenML is a growing project with areas for improvement, we all have the opportunity to contribute and help shape its future. Together, we can bridge the gaps and ensure ZenML continues to deliver on its promise of empowering ML practitioners.</p><p><em>Thank you for reading thus far.</em></p><p><em>If you are interested in learning more and tutorials on building an MLOps stack with ZenML check out my series. </em><a href="https://farisology.com/series/mlops-zenml">https://farisology.com/series/mlops-zenml</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e64900f16ec" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[3 lessons I learned building customer-facing data science products]]></title>
            <link>https://farisology.medium.com/3-lessons-i-learned-building-customer-facing-data-science-products-eb044076c270?source=rss-4919b13746a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/eb044076c270</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Farisology]]></dc:creator>
            <pubDate>Sun, 23 Jan 2022 07:57:59 GMT</pubDate>
            <atom:updated>2022-02-23T06:56:54.185Z</atom:updated>
            <content:encoded><![CDATA[<h3>3 Lessons I Learned Building Customer-Facing Data Science Products</h3><h4>Here is what data scientists need to be aware of when building for users.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mEHUROmF2WuUTe6bcMI5eg.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@isaacmsmith?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Isaac Smith</a> on <a href="https://unsplash.com/s/photos/data?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>When I took my first ML course (By Andrew Ng) in 2015, data science wasn’t something that rings bells, at least not for me. Back then, I was just curious about data, and the possibilities it could unleash, I had participated in an analytics hackathon where I somehow managed to place 3rd. That was not an expected outcome, considering the little skills and knowledge I had. Learning hive queries on the weekend was odyssey and Hortonworks did not even work on my laptop. I felt the least prepared, and the little SQL along with some reading on Big Data was all I had in my toolbox. Winning that day lead me to believe I should pursue a career in Data.</p><p>Then, there were only two ways in my mind in which data could deliver value, either creating analytics or serving predictions. 6 years later, I have come to learn even more than I knew possible. The data science field exploded my simplified idea of just analytics and predictions and I’ve had opportunities to pioneer some of these in the companies I’ve worked at.</p><p>My first customer-facing data product is a recommendation engine which I have written about before <a href="https://medium.com/fave-engineering/beneath-the-hood-fave-personalization-39d54b136fed">here</a>. I worked on several more projects later on around recommendations, relevancy ranking engine for search tool as well as some others. These were all full-fledged customer-facing data science applications and as I developed these, I have come to appreciate the distinct lessons that come from building data-fuelled tools that influence real-life user’s experiences. Here I will share the most important lessons in my journey so far.</p><blockquote>A <a href="https://www.tableau.com/learn/whitepapers/turn-data-products-data-scientist-data-business-owner#:~:text=A%20data%20product%20is%20an,improve%20their%20decisions%20and%20processes.&amp;text=Reaching%20business%20objectives%20through%20informed,main%20driver%20for%20company%20adoption.">data product</a> is described as “an application or tool that uses data to help businesses improve their decisions and processes”. — Dr. Carlo Velten.</blockquote><h4>Take a hybrid mindset</h4><p>Many new data learners come with a fascination of complex machine learning (ML) models. They want to try deep neural networks in most problems and due to that, often hyperparameter tuning comes before any thought of feature engineering. I would not claim that the <a href="https://neptune.ai/blog/data-centric-vs-model-centric-machine-learning">data-centric approach</a> is the best, but I would still advocate for thinking about your data first. In many industry problems, algorithms can only take you halfway. Going the rest of the way will lie in the details of your data and the quality of the features you have crafted.</p><blockquote>These are also popular opinions of <a href="https://www.youtube.com/watch?v=06-AZXmwHjo&amp;t=69s">Prof Andrew Ng: his amazing talk on data-centric AI</a>.</blockquote><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F06-AZXmwHjo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D06-AZXmwHjo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F06-AZXmwHjo%2Fhqdefault.jpg&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/c1f4122c7050533795d53bd241053b61/href">https://medium.com/media/c1f4122c7050533795d53bd241053b61/href</a></iframe><p>Let’s be real, context is the most important and therefore a data scientist should optimize his work based on the problem they are trying to solve. Some limitations such as wanting rapid results could determine the options you can explore for a particular problem.</p><p>When we want fast results, engineering new features, or devising preprocessing techniques might be the less efficient way forward. Despite my affinity for the data-centric approach, one should understand that some data issues cannot be fixed sustainably downstream. So, be context-aware that there could be times when a working product is what you need to ship first.</p><p>In the early phase of the project like when you are building a proof-of-concept (POC), go with the path of least resistance. Getting buy-in is more important than an extra % point in the model accuracy. If you are building for production, you can guess-estimate which approach can improve the performance and optimize with that in mind. In future iterations, you can validate both data and model-centric approaches. That is the time when you can adopt a hybrid approach and explore the best ideas.</p><h4>Business metrics first</h4><p>Let me put it this way, business is king. I have spent too much time pointing out my RSME scores or F1 score to people who don’t care. Data scientists are taught in kaggle and in academia to strive for the extra X-% of accuracy, but in the industry, data scientists are expected to bring value and impact. The statistical metrics do not show the value or impact to your business stakeholders. Your stakeholders don’t understand how your RMSE translates into metrics they care about.</p><blockquote>As the field matures and companies focus on the usefulness of data science, one should pay more attention to building her/his business acumen and learn how to prove the impact of his work.</blockquote><p>It’s one of the things that took me a long time to learn. In fact, learning this took me longer than learning backpropagation and gradient descent combined. You have to figure out the language and ways to articulate your model’s impact in terms of revenue, clicks, and conversion.</p><h4>UI matters so much</h4><p>Fine-tuning parameters and feature engineering can take you far but doesn’t matter if user perception or appeal of the product is lacking. This portion of the data science project is the toughest as it requires A/B testing and synergy with the products and developer teams to help facilitate the experiments. Customer-facing products have the attention of the customer as a pre-requisite and from experience, you can drive significant impact from improvements to the UI.</p><p>Additionally, the positioning, wording of the product title are all part of creating the appeal. It goes without saying but often the excitement of having that project out in production might blind the data scientist from these details. As an example, my recommendation carousel was titled “items you may like” resulted in mediocre returns. Interaction spiked from just tweaking the shading of the carousel and using “For you” instead which portrays the personal touch of this section.</p><h4>Finally</h4><p>There are many more lessons but these 3 lessons were the most expensive in terms of time and perhaps most underrated. During this journey, there were times of frustration when I thought my manager or stakeholders are unreasonable. It was tough to work for weeks only to be hindered deployment. Only when I allowed myself to see past my work that I learned what my humble self should have realized earlier. I took time to learn some of the rules and I hope you benefit from this to play a better game in your next project.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eb044076c270" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beneath the hood: Fave Personalization]]></title>
            <link>https://medium.com/fave-engineering/beneath-the-hood-fave-personalization-39d54b136fed?source=rss-4919b13746a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/39d54b136fed</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[recommendation-system]]></category>
            <category><![CDATA[naturallanguageprocessing]]></category>
            <category><![CDATA[personalization]]></category>
            <category><![CDATA[data]]></category>
            <dc:creator><![CDATA[Farisology]]></dc:creator>
            <pubDate>Wed, 11 Nov 2020 08:48:33 GMT</pubDate>
            <atom:updated>2020-11-13T10:13:12.688Z</atom:updated>
            <content:encoded><![CDATA[<h3>Beneath the Hood: Fave Personalisation</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dw8wXu-pjWlVCDiPBTM7Qw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@stephenleo1982?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Stephen Leonardi</a> on <a href="https://unsplash.com/?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>At Fave, we in the data science team actively research and innovate new ways to contribute to helping more SMEs become digital. The transformed data team went through a courageous process to expand its impact from business intelligence and reporting to building data products. Personalisation stands as one of the essential data products in Fave today, spreading its integration into our consumers, merchants and the Fave app. This motivated us to share how we built a robust recommendations engine in-house, given the unique characteristics of Fave’s offerings and products.</p><p>Fave’s most known products are FavePay, a mobile payment method designed to allow users to transact with offline merchants easily, and <a href="https://myfave.com/kuala-lumpur/offers">Fave Deals</a>. The hyper-growth of Fave as a platform and the ubiquity of FavePay in Malaysia and Singapore today brings with it new challenges. In the early days, products (deals/discounts) were listed via hand-crafted localisation logic that brings the highest selling products to the top of the list for each user in a specific neighbourhood (around the user location). It worked but it couldn’t scale as Fave’s inventory covered more and more categories.</p><p>As we grew, we have observed a few shortcomings and opportunities:</p><ol><li>We have a long tail problem (a minority of items outperform the vast majority of items).</li><li>New deals will get a slim opportunity to be seen by users compared to older top selling deals.</li><li>We have so many offerings our users don’t know exist.</li></ol><p><strong>Long-tail</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/318/1*i2j1upC9dxSF6tLvBYEHRQ.png" /></figure><p>As the platform grew in its offerings, fewer and fewer people are able to know what they could find in our app. Users are fed with the highest selling items at the top of the list, so they become fixated on specific deals made visible to them and this feeds sales to that small subset of deals.</p><p>It&#39;s a real example of an iceberg where your customers can only see the tip of what is on offer. Even as we actively push other products via marketing channels, the iceberg body will still go unnoticed as the platform’s inventory grows.</p><h4>Solution</h4><p>In our analysis of the problem, we saw that our early logic was breeding into the problem by increasing the visibility of a small set of top selling products. The most optimal solution would be curating products based on something better than location and definitely not random. In the age of data science, that is what can be achieved by a recommendation engine. Personalisation could be one prescription to improve many aspects of our growth. Increasing the visibility of more deals will increase the potential of conversion while offering users a unique set of deals with the highest likelihood of being favoured by the user.</p><h4>Challenges</h4><p>Like most great ideas, there is always a but. Recommending Fave Deals, unlike Netflix’s movie recommendation or Amazon’s book recommendation, have some constraints that are relevant only to Fave.</p><p>At Fave, personalisation should adhere to the following constraints:</p><p><strong>1-</strong> <strong>Live deals only</strong>; our deals are short-lived, and given the lifestyle pattern of Fave being an everyday app, we cannot afford recommending a product that is not live anymore.</p><p><strong>2.</strong> <strong>Location proximity</strong>; as a lifestyle app, insights on user behaviour informs us how our users launch the app and transact. Users won’t travel too far out for a discount. We help users save by discovering deals that are around them.</p><p><strong>3.</strong> <strong>Affordability</strong>; relevancy becomes pocket-size too. The price range of deals suggested to a user must not exceed what they can afford.</p><p><strong>4.</strong> <strong>Diet restrictions</strong>; As much as possible, we optimise for dietary restrictions. For example, we won’t recommend meals that include pork or alcohol for Muslims.</p><p>There have been a few tools in the market that offers a recommendation engine as a service but the challenge is our use case and our circumstances might not necessarily be applicable by that service. In our scenario, there are limitations to using external services: those services probably cannot solve issues that arise in our specific context. For example, <a href="http://surpriselib.com/"><em>SurPRISE</em></a><em> </em>algorithms were handy to use but could not optimise for Fave’s constraints and therefore performed poorly in relevancy metrics.</p><blockquote>We cannot simply pick a recommendation service or a model from a framework. Though that is easier to do, it is proven to score low in relevancy metrics.</blockquote><h4>Approach</h4><p>Our solution was to implement a hybrid form of collaborative filtering (CF) recommendations. CF generates predictions about the users’ interests by looking at a collection of preference information from a group of users, hence collaboration. Bear in mind that these predictions (recommendations) are for a particular user, despite using information discovered from a group of users.</p><p>At the end of each day, the engine is fed with a set of data containing the following:</p><ul><li>Purchase date/time</li><li>User behaviour in the app</li><li>Clicked image</li><li>Location</li><li>Price range</li><li>Merchant name</li><li>Category of the item</li><li>Demographics</li><li>Device information</li></ul><p>There are two types of data consumed by the model. These are explicit data which is simply transactional in nature: what deal has the user purchased in the past? and implicit data such as the items/images the user has clicked on. By combining explicit and implicit data types, we cover a wider spectrum of the user’s behaviour, tastes and preferences. There will always be a wealth of implicit data in every organisation as users will browse through several items and perhaps add a few to their wish lists before transacting. As a result the ratio of explicit to implicit is always 1:m. It is then strategically important to find ways to incorporate such implicit data into our systems and find ways to capitalise on it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZSM8ant9YRS0r70-4Iy76g.png" /><figcaption>Fave recommendation engine concept</figcaption></figure><p>The model builds a user profile in a multi-dimensional space where a user is represented by a matrix of what they have purchased/shown interest in. Successfully applying machine learning depends on its data and the way data has been treated. “<em>Applied machine learning’ is basically feature engineering</em>” (<strong>Andrew Ng</strong>). So a user matrix can be only as good as the data we use to build it.</p><h4>Semantic encoding</h4><p>The features are what make machine learning algorithms work. Domain knowledge is the backbone of an effective features engineering process. Let’s take a simple example from our data, the category feature of each item is descriptive nominal data like the food category or the beauty category. We will use an encoding method to translate the nominal categorical values into numeric values in a typical machine learning problem. The one-hot-encoding method is one that is used for this purpose but it is limited in the depth of information it represents for our context.</p><p>Let’s think of a deal for a 2 person dinner in a Thai restaurant. It belongs to the food category. How would you compare this deal to another deal from the drinks category?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UmKx3v3iKOHXH0AsB1NhqA.png" /><figcaption>one-hot encoding problem</figcaption></figure><blockquote>if Joe bought the 2 person Thai dinner ( food category) and Kamilla bought a deal for a 2 days staycation (travel category) and we have the signature drink deal to recommend. Which user is closer to the signature drink?</blockquote><p>Looking at the image, you can see that the first two deals are similar but the similarity isn’t represented in the encoding. Both are food and beverages respectively and if we encode using the one-hot method, we will end up in a totally different conclusion mathematically. To understand this, you can calculate the euclidean distance between the food and drink (we <a href="https://www.calculatorsoup.com/calculators/geometry-solids/distance-two-points.php">calculate</a> first 3 values for simplicity) — d=1.414214. If you tried the same calculator to compute the distance between food and travel, d is also 1.414214. By this calculation, you can see that one-hot encoding features adds a naive dimension without transcending any semantic information (human knowledge).</p><p>This problem can be easily solved by using some function to calculate semantic similarity in the two texts of category. In this context, imagine something like:</p><blockquote><em>f(drink, food) = 0.79</em></blockquote><p>Now the drink deal vector will look like this:</p><blockquote><em>[0.79, 1, 0 ,0]</em></blockquote><p>In our human knowledge, food and drink are similar, and using the one-hot encoding method alone will not give us such knowledge. The semantic similarity by mapping human sentence to a higher dimension space gives our basic encoding the details it needs to be meaningful.</p><p>What is the harm of using pure one-hot-encoding? Well, in an engine that doesn’t understand some aspects of the real world, we risk getting higher irrelevancy in our recommendations. If left with vague representations, the machine will fail to make sensible associations and will contradict our human world and that defies the purpose of building a recommendation engine: generating a relevant and interesting list of products for the user.</p><blockquote>The machine if left with vague representations will fail to make sensible associations and will contradict our human world</blockquote><p>Localisation of recommendations is another benefit gained by enhancing using location encoding. If we have 3 unique locations: <em>Cyberjaya, Putrajaya, </em>and<em> Dengkil</em> and our deal location is tagged as <em>Dengkil,</em> we will want to represent distances in our encoding and not arbitrary categorical values.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*AHHw2IbCFBZHiHDJGAUnUg.png" /><figcaption>Distance matrix</figcaption></figure><p>If you have a deal tagged <em>Cyberjaya </em>you will have a vector<em> [0, 3, 11] </em>with such a distance-based encoding (you may even scale the values between 0–1). We allow for a more realistic representation of the real world by doing this.</p><p>You can see how Fave’s RecSys goes beyond and attributes its success to the amount of attention paid to the details and these details are best known by the team most familiar with the data. Our engine is localised and understands that you should get recommended something in Georgetown, Penang if you have been shopping around there and this is what brings our users back for more interesting deals.</p><h4>Workflow</h4><p>The whole workflow to get from data to recommendations is fully automated and we leverage Airflow as our workflow orchestration system. It takes 12 steps to reach the final recommendations that then can be consumed by the product. In Fave we are using multiple channels to deliver a personalised experience from direct marketing emails (EDMs), push notifications, through the home page of the Fave consumer app and across all possible channels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*blAhFbE4OgauaZzrDeNc2w.png" /><figcaption>Fave RecSys workflow</figcaption></figure><p>In the early days of developing the engine we have tried generating recommendations on-the-fly whenever a user launches the app. The process was limiting in several ways like it worked only within the app and could not serve other channels. Changing our approach to pre-generating recommendations and storing them in an inventory for all users at least once a day brought several benefits. Another change we made was to utilise real-time data delivered by our <a href="https://medium.com/fave-engineering/how-python-novices-revolutionised-faves-data-warehouse-with-on-the-fly-transformations-1520c24c160c">on-the-fly transformations solution</a> and that made it possible for tonight’s recommendations to train on this morning’s user-app interactions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/532/1*VOEYINCvTT_0rwyLdut1bw.png" /><figcaption>Personalisation across channels have increased our conversion by 7x</figcaption></figure><p>This inventory of recommendations made it possible to curate personalised content for EDMs and have time-optimised push notifications. For example, sending lunch deal recommendations via push notifications to users just before lunch time. In a way, integrating personalisation with marketing allowed the engine to be tweaked to focus on specific categories, specific price ranges or even specific type deals.</p><h4>Summary</h4><p>In our first beta test we couldn’t immediately recognise the difference brought by personalisation and we thought that we needed more time to monitor and validate the impact. For a data science project to come out of its POC phase and pass several experiments in production is a huge leap for us. In fact this is the first successfully productionised data project by our team and is Fave’s first ML model in the app. To get this far is not the rule but the exception, since <a href="https://medium.com/analytics-and-data/challenges-moving-data-science-proof-of-concept-to-production-458d89b6a9a1">most data science projects don’t go beyond the POC phase</a>. The challenge isn’t just to do with the predictability of the model. There are also organisational and contextual factors that impact how likely a data science project will be productionised.</p><p>This project has matured over the course of several months and we are excited to democratise personalisation across Fave’s offerings. Today our users across 3 countries receive personalised EDMs and browse through a personalised home page. The future is personalised and so is your Fave experience.</p><p><em>Acknowledgement: the first ever attempt for recommendation in Fave was by </em><a href="https://www.linkedin.com/in/evonnesoon93/"><em>Evonne</em></a><em> and that paved the way for me to build upwards. </em><a href="https://www.linkedin.com/in/husein-zolkepli/"><em>Husein Zolkepli</em></a><em> supported optimisations and scaling of the project. In Fave’s Data Science team, we are empowered to try new things and learn all the time and that is to the credit of </em><a href="https://www.linkedin.com/in/jatinsolanki/"><em>Jatin Solanki</em></a><em>. Over the course of this project there were countless others who influenced and supported this endeavour and I am grateful for every single one of you.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=39d54b136fed" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fave-engineering/beneath-the-hood-fave-personalization-39d54b136fed">Beneath the hood: Fave Personalization</a> was originally published in <a href="https://medium.com/fave-engineering">Fave Product Engineering</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The easier way to handling large files in pandas]]></title>
            <link>https://farisology.medium.com/the-easier-way-to-handling-large-files-in-pandas-ad66c68d9936?source=rss-4919b13746a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/ad66c68d9936</guid>
            <category><![CDATA[data-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[kaggle]]></category>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[machine-learning]]></category>
            <dc:creator><![CDATA[Farisology]]></dc:creator>
            <pubDate>Mon, 31 Dec 2018 10:32:44 GMT</pubDate>
            <atom:updated>2018-12-31T12:08:17.659Z</atom:updated>
            <content:encoded><![CDATA[<h3>The easy way to handle large files in pandas</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dkeZMmcVIcv_xAyAcoj3Fg.png" /><figcaption>Cute panda from pixabay</figcaption></figure><p>I have been using a high-performance laptop for some time and EC2 machine for when I needed high computing power. I never encountered issues of performance for as long as I remember with both tools giving me quite a comfortable processing power. Things started to seem awfully different when I downgraded my MacBook and cannot enjoy the privileges of high computing powers on my disposal.</p><p>This has forced me to dig down and learn more about Pandas library. So if you are trying to learn about tips to handle your multiple gigabytes files in Pandas this gonna help you. To my surprise batch processing wasn’t the easiest way around handling your file, well in most of the times you are looking into a way to reduce the files size without getting into batch processing.</p><h3>Data types in Pandas</h3><p>As you know in python we have several variants of the same data type. So for integers, we have <strong>int16, int32, int64 </strong>and for floats, we have <strong>float16,float32, float64. </strong>These are extra memory capacities that we might or might not need. Pandas library in default it reads your data in the 64 variant. So, your age column will be between 1–99 and it will be assigned to int64 data type.</p><p>Int64 is 8 bytes and can store the figure <strong>-9223372036854775807</strong> up to <strong>+ 9223372036854775807</strong>. The question is do you really need int64 for your age column? This is the question you have to ask yourself for each column in your dataset. When you know the answer then it will be easy for you to shrink the size into something hopefully your machine can handle.</p><blockquote>In a nutshell, you need to give each column the proper data type without instead of the Pandas library default type.</blockquote><h3>Shrinking your file by 87.5%</h3><p>I have a CSV file of <strong>2.2 gigabytes</strong> in size and shape <strong>117180 * 2502 </strong>for a sparse matrix that I take me a lot of time to load each time I run my Jupiter notebook. I will demo for you how I can take this file into something my machine can handle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/485/1*TjeiCdMu0lNA4vq_ZH2bjA.png" /><figcaption>Loading my file (dummy data</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/1*F98sEPb5ce7rXlAYZsfJHw.png" /><figcaption>my dataset as it look</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/1*IgtZKXIQLl5GO_mPlGCXfg.png" /><figcaption>a few more columns</figcaption></figure><p>As you see I have the majority of the columns with small values or Zero values and just two columns with integers that are not large per se. The <strong>int16</strong> data type can store values from <strong>-32768 to +32768. </strong>We technically can use this for our <strong>A</strong> and<strong> B</strong> column in this dataset.</p><p>Let’s look at the data frame info:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/358/1*gHTNNVcCUK8SIfnRdVqRLA.png" /><figcaption>Look at the dtypes</figcaption></figure><p>We can check the file size and convert it to gigabytes using the following:</p><pre>start_size = getsizeof(data)/(1024.0**3)<br>print(&#39;Dataframe size: %2.2f GB&#39;%start_size)</pre><h3>Converting column data types in pandas</h3><p>In my case, there are so many columns to be exact its 2502 columns and by no means, I can go through each column so I used a for loop to convert all the columns of the data frame.</p><pre>for col in data.columns:<br>    data[col] = pd.to_numeric(data[col], downcast=&#39;signed&#39;)</pre><p>Now you may ask what is the downcast parameter? Simply if your columns are float64 like the dataframe I have above, downcast will simply convert them into float16 and if the case they are int it will downcast to the smallest variant of the data type.</p><blockquote>downcast takes only the following values: <em>{‘integer’, ‘signed’, ‘unsigned’, ‘float’}</em></blockquote><blockquote><em>- </em>‘integer’ or ‘signed’: smallest signed int dtype (min.: np.int8)</blockquote><blockquote>- ‘unsigned’: smallest unsigned int dtype (min.: np.uint8)</blockquote><blockquote>- ‘float’: smallest float dtype (min.: np.float32)</blockquote><p>If you are to use the to_numeric method for each line then you will have to something of the form of:</p><pre>bigfile[&#39;A&#39;] = pd.to_numeric(bigfile[&#39;A&#39;], downcast=&#39;signed&#39;)<br>bigfile[&#39;B&#39;] = pd.to_numeric(bigfile[&#39;B&#39;], downcast=&#39;signed&#39;)</pre><p>For my 2.2 gigabytes file, the for loop took quite some time and this is why you should find better ways to perform the conversions. The result of this conversion was that my file went down on size to:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/369/1*HplTbCyi_MUXJbegJOIHHg.png" /><figcaption>Do you want to know the percentage?</figcaption></figure><pre>print(&#39;total size reduction: %2.1f&#39;%((1-final_size/start_size)*100))</pre><h3><strong>Size reduce by 87.5%</strong></h3><p>For me, this has solved my issue and cannot let pandas assigned all type 64 to my columns because most of the time the values are too small and therefore the efficient use of memory is the solution for now.</p><p>I hope this helps you to navigate around large files (large for mediocre machines I mean) and you can crunch more data.</p><h3>Have a happy new year….</h3><p>2019</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ad66c68d9936" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The easiest way to build an API for your Machine Learning model]]></title>
            <link>https://farisology.medium.com/the-easiest-way-to-build-an-api-for-your-machine-learning-model-a49890b72cb0?source=rss-4919b13746a1------2</link>
            <guid isPermaLink="false">https://medium.com/p/a49890b72cb0</guid>
            <category><![CDATA[python-flask]]></category>
            <category><![CDATA[training]]></category>
            <category><![CDATA[scikit-learn]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[farisology]]></category>
            <dc:creator><![CDATA[Farisology]]></dc:creator>
            <pubDate>Fri, 09 Nov 2018 15:38:09 GMT</pubDate>
            <atom:updated>2018-11-09T15:38:09.605Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*W6U4ZLTqjoN-XR9EnSvh7g.png" /><figcaption>image from the public domain</figcaption></figure><p>Among the most frequent questions I get asked about is what is next after We have prepared the data and trained a model and went further to test the performance? Usually in academia we stop at this point and it’s time to put together a research paper that will hopefully get accepted with less brutal comments from reviewers. Although lately more of the academic work have been made available in which the community benefited from this and brought more enthusiasts to ticker around with these model. In the other hand there are more software engineers who get stuck and often expressed the <a href="https://www.radicalcandor.com/blog/tag/silicon-valley/">radical candor</a> and call machine learning useless. So, if you stuck with people practicing the academia concern of building a model that performs at 1% higher in accuracy this post would be your way to get your models up for deployment as an API.</p><h3>Intention</h3><p>The intention of sharing this is to demo how easy it is to actually deploy your model. In 30 lines of code your model will be ready to for scaling which I believe is as important. I don’t claim that this model or this API is production ready because it is just one step into and for sure there is more to production than just build a simple api. This demo is a simplification of how your model can take its first step. At the end of this publication I will tell you what needs to be done before you actually go live with this api.</p><h3>Preface</h3><p>A typical machine learning workflow will look like the diagram below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*H_-Bf2MCmBOf-jbd" /></figure><p>For the sake of this fast demo we will go fast through the steps with less details and processes than what it actually takes in real world project. Get your Jupyter notebook up and follow the next steps.</p><h3>1- Getting the Data.</h3><p>The dataset we gonna use here is from <a href="https://archive.ics.uci.edu/ml/datasets/car+evaluation">here</a> but I cannot access that no more so you can get it from <a href="https://www.kaggle.com/elikplim/car-evaluation-data-set">kaggle</a>. The dataset from kaggle is in comma separated values format (CSV) whereas the version I have is in txt file. The dataset has 7 columns:</p><ol><li>buying price.</li><li>maintenance cost.</li><li>number of doors.</li><li>number of persons.</li><li>lug_boot.</li><li>safety.</li><li>traget or decision column.</li></ol><p>Basically these features describing the car condition and the last column gives a category if the car is <em>unacceptable, acceptable, good, very good</em>. And in this problem we are trying to build a model that can predict the decision of new data as one fo the four categorise.</p><h3>Reading the data</h3><p>First we read the data into pandas data frame:</p><blockquote>data = pd.read_csv(‘car.data.txt’, names=[‘Buying’, ‘Maint’,’doors’, ‘persons’,’lug-boot’,’safety’,’target’])</blockquote><blockquote>data.head()</blockquote><p>I named the columns as my txt file has no headers but if you have the kaggle version of the dataset then you will see the headers available and therefore there will be no need for the names parameter.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/529/1*cHS123CQVcnYzQeCUuf8JQ.png" /><figcaption>this how the data looks like from the txt file</figcaption></figure><p>Reading the data into pandas dataframe will present them in tabular format:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*VHvCXlGWsAfeHiM8TFOsUA.png" /><figcaption>looks better in tables</figcaption></figure><h3>Pre-processing</h3><p>As you can observe from the table most of the values are categorise and machine learning models expect numeric data as an input to train the model. So, you will have to transform each column into a numerically encoded values. There are multiple ways to do that using scikit learn methods, but here just for demo purpose I will code my own simple way as follow:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/520/1*Cuc0WsLh_u7qQKegdxCGgA.png" /><figcaption>I have created one for each column</figcaption></figure><p>As you see the function is simple and it caters for each case. Definitely this way has issues but just to clarify the method for you. You can use any other method be it one-hot-encoding or label-encoder from scikit-learn. They do the same thing. We use the apply method to perform the <em>Trans_Buying </em>and you will have to use the apply method for each column to transform the columns.</p><pre>data[&#39;Buying&#39;]=data[&#39;Buying&#39;].apply(Trans_Buying)</pre><p>After we are done with transforming all the columns into numeric data then we just need to split the data into training and testing.</p><pre># let&#39;s split data into training and testing<br>feature_columns = [&#39;Buying&#39;, &#39;Maint&#39;,&#39;doors&#39;, &#39;persons&#39;,&#39;lug-boot&#39;,&#39;safety&#39;]</pre><pre>labels = data[&quot;target&quot;].values<br>features = data[list(feature_columns)].values</pre><pre>X_train, X_test, y_train, y_test = train_test_split(features, labels, test_size=0.3, random_state=42)</pre><p>Now that you data is ready to be fed into the algorithm for training you can try multiple algorithms to train. The algorithm with better performance can then be used for deployment.</p><h3>Random Forest Classifier</h3><pre>RFC = RandomForestClassifier(random_state=101)<br>RFC.fit(X_train, y_train)</pre><pre>print(&quot;Score on the training set is: {:2}&quot;<br>      .format(RFC.score(X_train, y_train)))<br>print(&quot;Score on the test set is: {:.2}&quot;<br>      .format(RFC.score(X_test, y_test)))</pre><h3>Decision Tree Classifier</h3><pre>DTC = tree.DecisionTreeClassifier(criterion = &#39;entropy&#39;)<br>DTC.fit(X_train, y_train)</pre><pre>print(&quot;Score on the training set is: {:2}&quot;<br>      .format(DTC.score(X_train, y_train)))<br>print(&quot;Score on the test set is: {:.2}&quot;<br>      .format(DTC.score(X_test, y_test)))</pre><h3>Exporting the model</h3><p>Now after you have trained supposedly multiple algorithms and you have done your performance analysis and decide in which model to take for production. But first we need to serialize the model / export it into a pickle file.</p><pre># Create persistent model<br>model_filename = &#39;carDTC.pkl&#39;<br>print(&quot;Model exported to {}...&quot;.format(model_filename))<br>joblib.dump(DTC, model_filename)</pre><p>To this stage you have already done with the machine learning workflow and next we need to create the Flask API. Flask is a web development framework from python. We will use it here to create an api for our model and we will deploy locally.</p><h3>Flask API</h3><p>Before you start in this phase please make sure you have isntalled Flask library. Then create a file in your favourite text editor and name this file <em>filename.py</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/900/1*jblPIoHRnFNB80vvp5NA5Q.jpeg" /></figure><p>I use <a href="https://www.sublimetext.com/">sublime</a> and sometimes <a href="https://atom.io/">Atom</a> feel free to use whatever you are comfortable with. Next we gonna create our Flask app and import some important libraries. Loading out serialised model that we have created before this.</p><pre># importing the libraries<br>from flask import Flask, request, jsonify<br>from sklearn.externals import joblib</pre><pre>#Creating our FlaskAPP<br>app = Flask(__name__)</pre><pre># Load the model<br>MODEL = joblib.load(&#39;carDTC.pkl&#39;)<br>MODEL_LABELS = [&#39;unacc&#39;, &#39;acc&#39;, &#39;vgood&#39;, &#39;good&#39;]</pre><p>I have created a list of the classes I have because I will need them alter when the model present the prediction. In the next step we create the endpoint with predict function that is supposedly where we received the inputs and then make the predictions.</p><pre><a href="http://twitter.com/app">@app</a>.route(&#39;/predict&#39;)<br>def predict():<br>    # Retrieve query parameters related to this request.<br>    Buying = request.args.get(&#39;Buying&#39;)<br>    Maint = request.args.get(&#39;Maint&#39;)<br>    doors = request.args.get(&#39;doors&#39;)<br>    persons = request.args.get(&#39;persons&#39;)<br>    lug_boot = request.args.get(&#39;lug_boot&#39;)<br>    safety = request.args.get(&#39;safety&#39;)</pre><pre># Our model expects a list of records<br>    features = [[Buying, Maint, doors, persons, lug_boot, safety]]</pre><pre># predict the class and probability of the class<br>    label_index = MODEL.predict(features)<br>    <br>    # get the probabilities list for the prediction<br>    label_conf = MODEL.predict_proba(features)</pre><pre># list down each class with the probabilty value<br>    probs = &#39; Unacceptable = {}, Acceptable = {}, Very Good = {}, Good = {}&#39;.format(label_conf[0][0], label_conf[0][1], label_conf[0][2], label_conf[0][3])</pre><pre># Retrieve the name of the predicted class<br>    label = MODEL_LABELS[label_index[0]]</pre><pre># Create a JSON and send a response <br>    return jsonify(status=&#39;complete&#39;, label=label, confidence = &#39;&#39;.join(str(label_conf)), probabilities = probs)</pre><p>Flask will handle the input data from the request and we just need to put these pieces of data into a list that has the same shape as expected by the model. Next step we feed the list to the model and we get the classification result in <strong><em>label_index</em></strong><em> </em>and by that we try to get the class name from the <strong><em>model_labels </em></strong>for an added step here i tried to use <strong><em>predict_proba</em></strong> which is a method to retrieve the confidence of the model in the classification for each class. In the return function we get everything together using <strong><em>jsonify</em></strong> method to send the response to the API caller.</p><p>Congratulations you have a ready API built in flask just add the main function.</p><pre>if __name__ == &#39;__main__&#39;:<br>    app.run(debug=True)</pre><p>Now save that script and run it in from your terminal:</p><pre>filename.py</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/556/1*N_2BKaeDrw4HXkE1pE_jHQ.png" /><figcaption>your app is running in the address http://127.0.0.1:5000</figcaption></figure><p>Now to test your API you can make a call from your browser as follows:</p><pre><a href="http://127.0.0.1:5000/predict?Buying=1&amp;Maint=1&amp;doors=1&amp;persons=1&amp;lug_boot=1&amp;safety=1">http://127.0.0.1:5000/predict?Buying=1&amp;Maint=1&amp;doors=1&amp;persons=1&amp;lug_boot=1&amp;safety=1</a></pre><p>You can see how we list down the features with their values, order here is very important as the model expecting the features to be in the order as in training dataset.</p><p>You can also make a call from your jupyter notebook:</p><pre>import requests<br>response = requests.get(&#39;<a href="http://127.0.0.1:5000/predict?Buying=1&amp;Maint=1&amp;doors=1&amp;persons=1&amp;lug_boot=1&amp;safety=1&#39;">http://127.0.0.1:5000/predict?Buying=1&amp;Maint=1&amp;doors=1&amp;persons=1&amp;lug_boot=1&amp;safety=1&#39;</a>)<br>print(response.text)</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/976/1*NrlYGTseubv_TowQcZsxRA.png" /><figcaption>Response from the API</figcaption></figure><p>Now you have a simple API running smoothly of course scaling this to be provided to many users will be another task but before that there several aspects you should look at like error handling and later on versioning and CI/CD which are leveraging on software engineering techniques. Also you may want to provide this API in serverless lambda or whatever that suits your need or application.</p><p>Full source code with jupyter notebook can be found from here: <a href="https://github.com/farisology/Deploy-ML-as-Flask-API">Car Condition Evaluation.</a> I remembered that I have gone through a similar code a while a go from someone in twoardsdatascience but I don’t remember the exact page so thanks to that person as well.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a49890b72cb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>