<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">
 
 <title>Herve Schnegg</title>
 <link href="http://herveschnegg.com/" rel="self"/>
 <link href="http://herveschnegg.com"/>
 <updated>2025-07-20T20:33:49+00:00</updated>
 <id>http://herveschnegg.com</id>
 <author>
   <name>Herve Schnegg</name>
   <email>hschnegg@gmail.com</email>
 </author>

 
 <entry>
   <title>ai summer</title>
   <link href="http://herveschnegg.com/2025/07/20/ai-summer"/>
   <updated>2025-07-20T00:00:00+00:00</updated>
   <id>http://herveschnegg.com/2025/07/20/ai-summer</id>
   <content type="html">
&lt;p&gt;This summer will be my AI summer.&lt;/p&gt;

&lt;p&gt;The world had its &lt;a href=&quot;https://en.wikipedia.org/wiki/AI_winter&quot;&gt;AI winters&lt;/a&gt;, due to research reaching certain limitations causing plateaus in progress. I had mine, generated by my lack of hands-on diving into playing with the latest developments as I was absorbed by my job.&lt;/p&gt;

&lt;p&gt;However, my AI summer might have come as I find myself between jobs. Having strong machine learning experience and having led teams delivering advanced AI projects should give me the foundation to build upon and quickly catch up with what I missed.&lt;/p&gt;

&lt;p&gt;I have an ambitious programme that should give me an opportunity to go deep enough and practise those skills.&lt;/p&gt;

&lt;p&gt;First, I want to resume my progress with &lt;a href=&quot;https://www.amazon.co.uk/Build-Large-Language-Model-Scratch/dp/1633437167&quot;&gt;Raschka, S. (2025) Build a large language model. Shelter Island, NY: Manning Publications&lt;/a&gt;. The book is excellent as it takes you by the hand and brings you to building an LLM from scratch.&lt;/p&gt;

&lt;p&gt;Second, I started to go through the &lt;a href=&quot;https://huggingface.co/learn/mcp-course/en/unit0/introduction&quot;&gt;Hugging Face MCP Course&lt;/a&gt;. It builds on the Anthropic Model Context Protocol (MCP) &lt;a href=&quot;https://docs.anthropic.com/en/docs/mcp&quot;&gt;documentation&lt;/a&gt;. It elaborates on the principles before diving into practical implementations.&lt;/p&gt;

&lt;p&gt;Finally, I want to work on the &lt;a href=&quot;https://www.coursera.org/professional-certificates/ibm-rag-and-agentic-ai#courses&quot;&gt;IBM RAG and Agentic AI Professional Certificate&lt;/a&gt; available on Coursera. I had some doubts about going for one of the Amazon ML Engineer or AI Practitioner certifications and I might come back to them later. However, I liked the practical &lt;a href=&quot;https://python.langchain.com/docs/introduction/&quot;&gt;LangChain&lt;/a&gt; content of the IBM course.&lt;/p&gt;

&lt;p&gt;Aggressive plan? Yes. But this is my AI summer!&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>news recommendations - a context tree approach</title>
   <link href="http://herveschnegg.com/2016/09/14/news-recommendations-a-context-tree-approach"/>
   <updated>2016-09-14T00:00:00+00:00</updated>
   <id>http://herveschnegg.com/2016/09/14/news-recommendations-a-context-tree-approach</id>
   <content type="html">
&lt;p&gt;An important proportion of news website traffic is generated by casual readers following links found in social media or search results. Capturing the attention of those readers is important for publishers as an increase in page views by session has a direct impact on ad revenue. Implementing a recommender system is a possible way to achieve this objective.&lt;/p&gt;

&lt;p&gt;Recommender systems are today very popular, especially in commerce websites. The examples of &lt;a href=&quot;http://fortune.com/2012/07/30/amazons-recommendation-secret/&quot;&gt;Amazon&lt;/a&gt; or &lt;a href=&quot;http://bits.blogs.nytimes.com/2009/09/21/netflix-awards-1-million-prize-and-starts-a-new-contest/&quot;&gt;Netflix&lt;/a&gt; are well known and have even been covered in the non-specialist press.&lt;/p&gt;

&lt;p&gt;Generating recommendations for news website is, to some extent, more challenging. The fact that most readers consume news anonymously makes it difficult to learn their preferences. Also, the speed at which news items are becoming obsolete has to be dealt with. Despite those challenges, publishers are developing recommender systems and some of them are reporting about their successes: &lt;a href=&quot;http://open.blogs.nytimes.com/2015/08/11/building-the-next-new-york-times-recommendation-engine/&quot;&gt;New York Times&lt;/a&gt;, &lt;a href=&quot;https://www.washingtonpost.com/pr/wp/2016/02/11/new-feature-aims-to-get-distracted-or-inactive-users-to-engage-further-with-washington-post-content/&quot;&gt;Washington Post&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Most of the recommender systems are based on a combination of two possible approaches to recommendations: Content based recommenders use similarity between the content of the page currently visited and the content of other pages to make recommendations. Collaborative filtering systems infer user preferences and make recommendations based on what similar users visited. (&lt;a href=&quot;https://en.wikipedia.org/wiki/Recommender_system&quot;&gt;More details…&lt;/a&gt;)&lt;/p&gt;

&lt;p&gt;The recommender covered in this post is based on the Context Tree approach described in a paper by Garcin et al. [1] and relies on user behaviours to generate recommendations. This recommender is the first one developed by our organisation and alternative approaches are tested in parallel. Our objective is to learn what approaches work best for different sections of our website or for different audiences. We already know that future solutions will be based on a variety of recommenders working together to enhance the experience of our readers.&lt;/p&gt;

&lt;p&gt;We base our recommendations on journeys - or sequences of pages visited on our website. We start by capturing all the journeys made by our users and we organise them in a tree structure. We call that data structure Context Tree. Every time a user is visiting a new page on our site, we either add a branch to the tree and initialise a counter recording how many visitors reached that node, or we find a matching branch in the tree and increment the existing counter.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/tree.png&quot; alt=&quot;Context Tree&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Recommendations are then simply based on where visitors who reached a node in the tree are more likely to go next. Take a visitor with journey {Page 1; Page 2}. We would recommend to that user to visit page 3 with probability 0.5 (2/4), page 4 with probability 0.25 (1/4) and page 5 with probability 0.25 (1/4).&lt;/p&gt;

&lt;p&gt;As illustrated in our example, it might not always be possible to retrieve enough recommendations for a match based on a full journey. To work around this limitation, we recursively retrieve recommendations for all the suffixes of the journey. We obtain the suffix of a journey by removing its first page. In our example, the only suffix of journey {Page 1; Page 2} is {Page 2}. Based on that suffix, we would also recommend page 6 (probability 3/7) and page 7 (probability 4/7).&lt;/p&gt;

&lt;p&gt;Weights are used when recommendations are generated from different suffixes. The idea is to give more importance to recommendations based on the full journey compared to recommendations based on suffixes. To do so, we attribute decreasing weights to each subsequent suffix. In our example, we could use a weight of 2/3 for the full journey and a weight of 1/3 for the first suffix - we want our weights to sum to 1. The rate at which weights decrease from one level to the next is a parameter of our model. In this example, it is set to 0.5. The table below shows how our final recommendations would be built.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/recommendations.png&quot; alt=&quot;Generating recommendations&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Note that in this made up example, Page 7 would be recommended before Page 4 based on its weighted probability.&lt;/p&gt;

&lt;p&gt;In this post, we have introduced the process of capturing a user journey and making a recommendation separately to better explain the logic of our recommender. In practice, a single API is updating the tree and returning recommendations.&lt;/p&gt;

&lt;p&gt;So, how is it working so far? We started to test the recommender described in this post on our website. The first results are showing a significant increase in Click Through Rate (&lt;a href=&quot;https://en.wikipedia.org/wiki/Click-through_rate&quot;&gt;CTR&lt;/a&gt;) compared to a baseline where a list of “most read” articles is displayed in the same position on the page. These first results are quite encouraging and should help us to move towards our objective of increasing user engagement.&lt;/p&gt;

&lt;p&gt;Obviously, this is only the beginning of our journey. We still work on improving this first recommender and explore other ways to make recommendations based on a context tree. We also work in parallel on recommenders based on similarity of content. Hopefully, a future post will share more details on our progresses and will show how this recommender compares to other approaches.&lt;/p&gt;

&lt;p&gt;[1] F. Garcin, C. Dimitrakakis, and Boi Faltings. “Personalized news recommendation with context trees.” Proceedings of the 7th ACM conference on Recommender systems. ACM, 2013.&lt;/p&gt;

</content>
 </entry>
 
 <entry>
   <title>london first datakind's datadive</title>
   <link href="http://herveschnegg.com/2013/08/04/data-dive-london"/>
   <updated>2013-08-04T00:00:00+00:00</updated>
   <id>http://herveschnegg.com/2013/08/04/data-dive-london</id>
   <content type="html">
&lt;p&gt;I was planning to write a little summary of last weekend DataKind’s DataDive. But now that some of the best journalists already published theirs (&lt;a href=&quot;http://www.economist.com/blogs/graphicdetail/2013/07/data-do-gooders?fsrc=scn/tw_ec/hacking_for_humanity&quot;&gt;The Economist&lt;/a&gt;, &lt;a href=&quot;http://www.theguardian.com/news/datablog/2013/jul/30/corporate-analysts-collaborate-charities-tackle-social-issues&quot;&gt;The Guardian&lt;/a&gt;), I will limit myself to some more personal notes!&lt;/p&gt;

&lt;p&gt;A DataDive is a weekend event organised by &lt;a href=&quot;http://datakind.org/&quot;&gt;DataKind&lt;/a&gt; (and &lt;a href=&quot;http://datakind.org.uk/&quot;&gt;DataKind UK&lt;/a&gt;) where social organisations with data problems - but no internal resources to tackle them - meet data professionals ready to help by giving some of their spare time.&lt;/p&gt;

&lt;p&gt;&lt;img src=&quot;/assets/datadive.gif&quot; alt=&quot;datadive&apos;s participants&quot; /&gt;&lt;/p&gt;

&lt;p&gt;Here are some of my feelings a week after the event.&lt;/p&gt;

&lt;p&gt;Inspiration&lt;/p&gt;

&lt;p&gt;It has been highly inspirational to witness the energy and enthusiasm of the DataKind (and DataKindUK) team. Those people are highly skilled professionals spending their weekends (and more) working for a good cause.&lt;/p&gt;

&lt;p&gt;Motivation&lt;/p&gt;

&lt;p&gt;All the people I met over the weekend are experts in their fields. They know a lot, they are highly efficient (check what has been produced in a weekend!) and they are approachable and happy to share their knowledge. No one was playing the individual card and everyone was seriously trying to produce the best possible results for the projects.&lt;/p&gt;

&lt;p&gt;Coming out of that experience, I felt energised. It motivated me to further develop my technical skills and to use them wherever and whenever I can help.&lt;/p&gt;

&lt;p&gt;Satisfaction&lt;/p&gt;

&lt;p&gt;Talking to great people, receiving the organisations’ feedbacks, being part of all the positive things happening there felt great. An “amazing” experience as a certain organiser would put it!&lt;/p&gt;

&lt;p&gt;I am proud of having been part of that event and I hope to be there for the next one with more skills to bring to the community.&lt;/p&gt;
</content>
 </entry>
 
 <entry>
   <title>about this blog</title>
   <link href="http://herveschnegg.com/2013/04/03/about-this-blog"/>
   <updated>2013-04-03T00:00:00+00:00</updated>
   <id>http://herveschnegg.com/2013/04/03/about-this-blog</id>
   <content type="html">
&lt;p&gt;I have never been a heavy blogger; however, I like to have a space where I can occasionally publish my thoughts on (mainly) data related topics.&lt;/p&gt;

&lt;p&gt;I had to reevaluate my options after Twitter announced the end of Posterous. I had tried Wordpress and Blogger in the past but never really felt comfortable with them. So, I finally decided to go for something quite different.&lt;/p&gt;

&lt;p&gt;This blog is built with &lt;a href=&quot;https://jekyllrb.com/&quot; title=&quot;Jekyll&quot;&gt;Jekyll&lt;/a&gt;, a static site generator, and hosted on &lt;a href=&quot;https://github.com/&quot; title=&quot;GitHub&quot;&gt;GitHub&lt;/a&gt;. That means that I can write locally on my machine, in a text editor, and then generate the site locally before it is pushed to GitHub.&lt;/p&gt;

&lt;p&gt;I used &lt;a href=&quot;http://themes.jekyllbootstrap.com/preview/tom/&quot;&gt;Jekyll Bootstrap and Tom Preston-Werner’s theme&lt;/a&gt; to avoid the pain of manually designing something nice!&lt;/p&gt;

&lt;p&gt;I like what I learnt so far! Let’s see how that works out…&lt;/p&gt;
</content>
 </entry>
 
 
</feed>
