<?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 Aliakbar on Medium]]></title>
        <description><![CDATA[Stories by Aliakbar on Medium]]></description>
        <link>https://medium.com/@aliakbar.murat?source=rss-ff5c188509dc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*VMJ9raqbYtNpMUp5</url>
            <title>Stories by Aliakbar on Medium</title>
            <link>https://medium.com/@aliakbar.murat?source=rss-ff5c188509dc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 16:01:24 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@aliakbar.murat/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[Pose-Controlled Gaming and What It Can Do for Healthcare]]></title>
            <link>https://medium.com/@aliakbar.murat/pose-controlled-gaming-and-what-it-can-do-for-healthcare-1cd20bace97a?source=rss-ff5c188509dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/1cd20bace97a</guid>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[subway-surfers]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[mediapipe]]></category>
            <dc:creator><![CDATA[Aliakbar]]></dc:creator>
            <pubDate>Thu, 30 Jul 2026 22:37:48 GMT</pubDate>
            <atom:updated>2026-07-30T22:49:37.338Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>GitHub:</strong> <a href="https://github.com/enstrong/pose-controlled-gaming">github.com/enstrong/pose-controlled-gaming</a></p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F6GBaegb5wKo%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D6GBaegb5wKo&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F6GBaegb5wKo%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e0c1a5bb660779b72fd7dc3098879bbd/href">https://medium.com/media/e0c1a5bb660779b72fd7dc3098879bbd/href</a></iframe><p>Real-time body tracking that replaces keyboard input with full-body movement, demonstrated on Subway Surfers. The same architecture detects asymmetric gait patterns associated with neurological and musculoskeletal disorders.</p><h3>Motivation</h3><p>Consumer cameras can now extract 33 body landmarks at 30 frames per second on a laptop CPU. That is enough to replace a keyboard when playing a game. It is also enough to measure how symmetrically a person walks, and asymmetric gait is one of the earliest detectable signs of conditions including <strong>antalgic gait</strong> (pain-compensating limp), <strong>Trendelenburg gait</strong> (hip abductor weakness), <strong>hemiplegic gait</strong> (post-stroke one-sided weakness), <strong>Parkinsonian gait</strong> (shuffling, reduced arm swing), and <strong>scissor gait</strong> (spasticity in cerebral palsy).</p><p>Clinical gait analysis today requires a motion capture lab, trained physiotherapists, and a scheduled appointment. This project asks a simpler question:</p><blockquote>How much can you detect from a webcam and 33 landmarks?</blockquote><h3>What Was Built</h3><p>Two independent systems share the same perception pipeline.</p><p><strong>Part 1. Subway Surfers controller.</strong> Lane changes are position-based: when your body center crosses a threshold in the camera frame, a left or right arrow key fires. Jump and crouch are classifier-based: a Random Forest trained on 3,892 labeled frames predicts whether your current pose is RUN, JUMP, or CROUCH, and sends the corresponding key only when confidence exceeds 0.80.</p><p><strong>Part 2. Gait asymmetry detector.</strong> After 30 consecutive frames (~1 second of walking), temporal features are extracted from the landmark sequence and classified as NORMAL_GAIT or ASYMMETRIC_GAIT. Classification updates every 10 frames with majority voting over the last 5 verdicts for stability.</p><h3>Methodology</h3><p><strong>Perception layer.</strong> MediaPipe Pose Landmarker (v0.10.14) extracts 33 body keypoints per frame, normalized to [0,1] in image coordinates, on CPU in under 15ms per frame on an Apple M4.</p><p><strong>Gesture classifier, feature engineering.</strong> Rather than feeding raw coordinates to the classifier, 22 biomechanically meaningful features are computed per frame: normalized shoulder height, torso compression ratio, average knee height, foot-to-hip distance ratio, and wrist &amp; elbow positions.</p><p><strong>Gesture classifier, model.</strong> Random Forest, 200 trees, trained on 3,892 frames (2,309 RUN, 1,405 CROUCH, 178 JUMP). Jump frames were extracted from recorded video by keeping only frames where foot landmarks were detectably above the standing baseline.</p><p><strong>Gait classifier, feature engineering.</strong> 17 temporal features are computed over each 30-frame window: shoulder asymmetry mean and standard deviation, lateral hip sway, hip vertical asymmetry, left and right knee range of motion, the ratio between them, knee height difference variance, ankle and foot lift asymmetry, overall vertical body motion, and the cross-correlation between left and right knee trajectories. The cross-correlation feature directly measures whether legs are alternating correctly.</p><p><strong>Gait classifier, model.</strong> Random Forest, 200 trees, trained on windowed samples from 2,938 frames of recorded walking (1,956 ASYMMETRIC_GAIT, 982 NORMAL_GAIT).</p><h3>Results</h3><h4>Gesture classifier (Subway Surfers)</h4><p>Trained and evaluated with 80/20 stratified split. 100% test accuracy on held-out data after replacing timed jump recording with airborne-frame extraction from video.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/422/1*qNVaVCUqnLmeQuvdHbjCeQ.png" /><figcaption>The confusion matrix of the Gesture classifier</figcaption></figure><p>Top features by importance: shoulder_y_avg (0.142), elbow_y_avg (0.141), shoulder_y_norm (0.130), foot_y_norm (0.092).</p><h4>Gait classifier</h4><p>89.3% test accuracy on 56 windowed samples.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/372/1*Vfi7D2jx6xn6EGdLbRR4fA.png" /><figcaption>The confusion matrix of the Gait classifier</figcaption></figure><p>Top features: hip_diff_mean (0.296), shoulder_asym_mean (0.173), shoulder_asym_std (0.092), knee_anticorr (0.088). The hip vertical asymmetry feature - how much one hip drops relative to the other during walking - is the single most predictive signal, which is consistent with clinical literature on <strong>Trendelenburg gait</strong>.</p><h4>Honest limitations</h4><p>Both models were trained exclusively on one person’s body. The gesture classifier is calibrated to one room, one camera angle, and one lighting environment. The gait classifier was trained on deliberate imitation of a limp, not on real patients with diagnosed conditions. Neither model should be interpreted as a diagnostic tool. The gait result demonstrates that the feature extraction architecture detects measurable asymmetry. It does NOT demonstrate clinical validity.</p><h3>How to Run</h3><p>Instructions are on <a href="https://github.com/enstrong/pose-controlled-gaming#how-to-run">GitHub</a></p><h3>Future Work</h3><p><strong>Clinical datasets.</strong> Training on clinically labeled video data remains the principal limitation of this work. The GAVD (Gait Abnormality Video Dataset, 1,874 sequences) and Health&amp;Gait (1,564 participants with AlphaPose landmarks) datasets exist for this purpose, though both require institutional data access agreements and significant preprocessing to align with MediaPipe’s landmark format.</p><p><strong>More landmarks.</strong> MediaPipe’s 33-point model does not capture fine-grained foot rotation or toe clearance. Clinical gait analysis uses full-body marker sets with 50–100 landmarks. A custom pose estimation model trained on clinical motion capture data would provide substantially richer signal.</p><p><strong>Neural approaches.</strong> The temporal window classification could be replaced with an LSTM or Transformer that processes the full sequence of landmarks rather than hand-engineered window features. This would allow the model to learn gait cycle timing directly from data rather than relying on predefined features like knee range of motion.</p><p><strong>Multi-game generalization.</strong> The architecture is game-agnostic. Lane-change logic and jump/crouch detection are independent modules. Extending to a second game requires only redefining the key mapping in game.py.</p><h3>References</h3><ol><li>Lugaresi, C., et al. (2019). <em>MediaPipe: A Framework for Building Perception Pipelines.</em> arXiv:1906.08172.</li><li>Breiman, L. (2001). <em>Random Forests.</em> Machine Learning, 45(1), 5–32.</li><li>Maki, B. E. (1997). <em>Gait changes in older adults: predictors of falls or indicators of fear?</em> Journal of the American Geriatrics Society, 45(3), 313–320.</li><li>Liao, Y., et al. (2021). <em>A Review of Computational Approaches for Evaluation of Rehabilitation Exercises.</em> Computers in Biology and Medicine, 119, 103687.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1cd20bace97a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building an AI That Learns What You Want to Read Next]]></title>
            <link>https://medium.com/@aliakbar.murat/building-an-ai-that-learns-what-you-want-to-read-next-8008bd92404f?source=rss-ff5c188509dc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8008bd92404f</guid>
            <category><![CDATA[book-recommendations]]></category>
            <category><![CDATA[books]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Aliakbar]]></dc:creator>
            <pubDate>Tue, 21 Jul 2026 21:06:51 GMT</pubDate>
            <atom:updated>2026-07-23T20:10:05.301Z</atom:updated>
            <content:encoded><![CDATA[<p>In the summer, some people go to the beach. I trained recommender models.</p><p>When I asked my AI what kind of books would be similar to <em>Pride and Prejudice </em>by Jane Austen, this was the output:</p><pre>1. Sense and Sensibility<br>2. Jane Eyre<br>3. Emma<br>4. Little Women<br>5. To Kill a Mockingbird<br>6. Persuasion<br>7. The Great Gatsby</pre><p>One of the most satisfying parts of software engineering is when an application stops following rules you explicitly wrote and starts making useful decisions from data.</p><p>That was exactly the goal behind the recommendation engine for my <strong>ebookreader</strong> project.</p><p>Instead of showing every user the same “Most Popular Books” list, I wanted recommendations that adapt to each reader’s personal taste. If someone enjoys Russian classics, they should discover more Russian classics. If another reader prefers fantasy, the recommendations should naturally drift toward fantasy.</p><p>The goal is simple:</p><blockquote>Given a user&#39;s reading history, recommend books they are likely to care about.</blockquote><p>The actual path was less simple. After several months of experiments, the project evolved from traditional collaborative filtering to neural recommendation models, eventually becoming its own repository dedicated entirely to recommendation research.</p><p>The full repository is available here:</p><p><strong>GitHub:</strong> <a href="https://github.com/enstrong/ebookreader-ai">https://github.com/enstrong/ebookreader-ai</a></p><h3>Project context</h3><p>eBookReader started as my diploma project. The first big AI milestone was in May 2026: build a real recommendation engine instead of a toy &quot;popular books&quot; list wearing a fake mustache.</p><p>The first model family that became properly useful was ALS, short for Alternating Least Squares. That work happened in May, before the final diploma-defense sprint.</p><p>The NCF work happened later, in July 2026. There was a gap because, in order:</p><ul><li>I had to defend the diploma.</li><li>I got the diploma with honors.</li><li>I got into the AI Solutions program at FH Upper Austria.</li><li>Then I finally had enough mental space to return to the model and ask: “Can a neural recommender beat my ALS champion?”</li></ul><p>Very normal summer behavior. Some people go to the beach. I trained recommender models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/740/1*-Vukdakh3R50oJ-mCJ3ctQ.png" /><figcaption>Screenshots from the ebookreader app. The user liked Russian classics, so in his for you page, he gets mostly Russian classics. Only as an 8th option he is shown a French classic book.</figcaption></figure><h3>The Dataset</h3><p>The recommendation experiments use the UCSD Goodreads dataset.</p><p>The important property of this dataset is that it is implicit-feedback shaped even when ratings exist. A row can mean that a user rated a book, read a book, reviewed a book, or interacted with it in another useful way.</p><p>The original app-side ALS work used a much larger prepared Goodreads interaction pipeline. The NCF repository works from a compact sparse matrix artifact: user_items.npz</p><p>That matrix is the common object used for the NCF experiments and the later fair ALS comparison.</p><p>The full Goodreads interaction source is much larger than a casual CSV. In the original ALS pipeline, the raw scan included:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/845/1*0OtYyeRAdnqUynh8gSUoZQ.png" /></figure><p>Later, duplicate book editions were cleaned in the main project. That reduced the catalog from 777,324 books to 534,695 canonical books, which improved the final hybrid ALS model. This repository, however, is mainly about isolating the model behavior itself.</p><h3>Evaluation protocol</h3><p>The core evaluation is leave-one-out recommendation.</p><p>For each evaluated user:</p><pre>1. Take one book from the user&#39;s history.<br>2. Hide it.<br>3. Train or score using the remaining user history.<br>4. Ask the model to rank candidate books.<br>5. Check where the hidden book appears.</pre><p>This is the part that makes recommender evaluation feel almost rude. The model is handed a user’s reading taste, one correct answer is quietly removed, and then the model has to find it again from a pile of books.</p><p>There are two evaluation modes:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*J3E_fghdsgXk3hxp5nLI6A.png" /></figure><p>The fair ALS-vs-NCF comparison at the end uses the same matrix, same user-subset idea, same leave-one-out structure, and no metadata blending.</p><h3>Metrics</h3><p>The main metrics are Hit@K and MRR.</p><p><strong>Hit@K</strong> asks whether the hidden book appeared in the top K recommendations.</p><p>Hit@10 = 0.104</p><p>means that the hidden book appeared somewhere in the top 10 recommendations for 10.4% of evaluated users.</p><p><strong>MRR</strong>, or Mean Reciprocal Rank, asks how early the hidden book appeared.</p><pre>rank 1  -&gt; reciprocal rank 1.0<br>rank 2  -&gt; reciprocal rank 0.5<br>rank 10 -&gt; reciprocal rank 0.1<br>missing -&gt; reciprocal rank 0</pre><p>This is why MRR is usually the metric I care about most. A recommendation system is not just supposed to find the right book eventually. It should put the good stuff near the top. Nobody opens a book app thinking, “Yes, please show me the correct recommendation at position 67.”</p><h3>Part I: ALS</h3><p>ALS was the first model in this project that felt like real machine learning.</p><p>The model learns two matrices:</p><ul><li>a user-factor matrix</li><li>a book-factor matrix</li></ul><p>Each user and each book gets a vector of latent features. These are not manually named features like fantasy, classics, or romance. They are hidden taste dimensions learned from interaction patterns.</p><p>The score is simple:</p><pre>predicted preference = user_vector dot book_vector</pre><p>So if a user vector and a book vector point in a similar direction, the model gives that book a higher score.</p><p>The ALS update for one user can be written as:</p><pre>A = Y.T @ Y + Y_obs.T @ (C - I) @ Y_obs + lambda * I<br>b = Y_obs.T @ (C * p)<br>x = solve(A, b)</pre><p>Where:</p><p>Y is the item-factor matrix</p><p>Y_obs is the subset of item factors for books this user interacted with</p><p>C is confidence</p><p>p is preference</p><p>lambda is regularization</p><p>x is the solved user vector</p><p>ALS alternates between solving user vectors while item vectors are fixed, then solving item vectors while user vectors are fixed. It does this again and again until the vectors become useful.</p><p>The first ALS version used only 5-star ratings. That was clean, but too sparse. The model ignored too much signal.</p><p>The major improvement was mean-centering:</p><pre>centered_rating = rating - user&#39;s_average_rating</pre><p>This matters because a rating does not mean the same thing for every person. A 3-star rating from someone who normally gives 5 stars is not the same as a 3-star rating from someone who usually gives 1 or 2 stars. People are inconsistent little rating machines, and the model has to respect that.</p><p>Then came the second improvement: read-aware implicit feedback.</p><p>In the Goodreads data, rating == 0 does not mean &quot;zero stars.&quot; It usually means the user read the book but did not leave a rating. Removing those rows throws away useful signal.</p><p>So the ALS pipeline treated:</p><pre>rating &gt; 0:<br>  use mean-centered explicit rating signal</pre><pre>rating == 0 and is_read == 1:<br>  use weak positive implicit feedback</pre><p>This follows the key idea from Hu, Koren, and Volinsky: preference and confidence are different things. Reading a book is evidence, but not the same evidence as loving it.</p><p>The strongest ALS-only model from the May work was:</p><pre>Read-aware mean-centered implicit ALS<br>features: 256<br>lambda: 1.0<br>iterations: 10<br>candidate books: 20,000<br>validation: true pre-training holdout</pre><p>The strongest hybrid model in the main ebookreader repo added metadata reranking:</p><pre>final_score = alpha * ALS_score + (1 - alpha) * metadata_score</pre><p>The best hybrid version used:</p><pre>Base model: ALS read-aware mean-centered<br>features: 256<br>lambda: 1.0<br>iterations: 10<br>alpha: 0.6<br>genre weight: 0.3<br>author weight: 0.5<br>rating weight: 0.1<br>page count weight: 0.05<br>popularity weight: 0.05<br>language weight: 0<br>candidate strategy: rerank ALS top 500</pre><p>That hybrid ALS model became the champion in the main project:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/848/1*F9Q5oIo3XOiQ2_3ORylc0A.png" /></figure><p>The important lesson from ALS was not “matrix factorization magically wins.” The important lesson was that data representation wins first.</p><p>Mean-centering helped. Keeping read-unrated rows helped. Cleaning duplicate editions helped. Only after those decisions did the model become genuinely strong.</p><h3>Part II: NCF</h3><p>After the diploma work, I moved the neural recommender experiments into this repository.</p><p>NCF stands for Neural Collaborative Filtering. The basic idea is still to learn user and item embeddings, but instead of scoring them only with a dot product, a neural network learns the interaction function.</p><p>The model in this repository uses:</p><ul><li>a learned user embedding</li><li>a learned book embedding</li><li>concatenation of both embeddings</li><li>a multilayer perceptron</li><li>dropout</li><li>sigmoid output</li><li>binary cross-entropy loss</li><li>negative sampling</li></ul><p>In simplified form:</p><pre>user_vec = user_embedding(user_id)<br>book_vec = book_embedding(book_id)<br>x = concatenate(user_vec, book_vec)<br>score = MLP(x)</pre><p>ALS says:</p><blockquote>user dot book</blockquote><p>NCF says:</p><blockquote>let a neural network learn how this user vector and this book vector should interact</blockquote><p>That is more flexible. It is also more expensive, more fragile, and much more willing to punish me for not having enough compute.</p><p>The training data is built from positives and sampled negatives:</p><pre>positive pair: user interacted with this book -&gt; label 1<br>negative pair: sampled unread book -&gt; label 0</pre><p>The main negative ratio was: 4 negatives per positive</p><p>So each positive interaction creates one positive training row and four negative training rows.</p><h3>NCF experiment sweep</h3><p>The July experiment sweep tested different user counts, embedding sizes, layer sizes, learning rates, and training durations.</p><p>The main grid included:</p><ul><li>users: 5,000, 20,000, 50,000</li><li>embedding dimensions: 64, 128, 256, 512</li><li>layers: [128, 64, 32], [256, 128, 64], [512, 256, 128], [1024, 512, 256]</li><li>dropout: 0.2</li><li>learning rates: 0.0003, 0.001, 0.003, 0.01</li><li>batch sizes: 1024, 4096</li><li>negative ratio: 4</li><li>epochs: mostly 25</li></ul><p>In total, the logged spreadsheet contains 21 experiment rows, including the early baselines, 5k hyperparameter runs, larger-user runs, and one interrupted 50k full evaluation.</p><p>The first weird-but-important lesson was that sampled evaluation can look very good while full-catalog evaluation stays much more modest. This is expected. Ranking one hidden book among 500 candidates is not the same sport as ranking it among 20,000 books.</p><p>The second lesson was that lower training loss did not automatically mean better full-catalog ranking. Some of the larger or higher-learning-rate models looked strong in sampled evaluation but collapsed when asked to rank against the full catalog.</p><p>That is the recommender-system version of “great in rehearsals, questionable on stage.”</p><h3>Best NCF model</h3><p>The best NCF model from the July sweep was:</p><pre>Model: ncf_5k_256_lr3e3<br>Date: 17.07.2026<br>Users: 5,000<br>Embedding: 256<br>Layers: [512, 256, 128]<br>Dropout: 0.2<br>Learning rate: 0.003<br>Batch size: 1024<br>Negative ratio: 4<br>Epochs: 25<br>Best epoch: 10<br>Training time: 43m 1s<br>Final loss: 0.162<br>Sampled MRR@500: 0.5178<br>Sampled Hit@10@500: 0.582<br>Full Hit@10: 0.104<br>Full MRR: 0.0658</pre><p>The best full-catalog NCF result came from the 256-dimensional model trained on 5,000 users. It did not have the lowest loss in the whole sweep. It was not the largest model. It was not the one with the most heroic training time.</p><p>It was simply the best at putting the held-out book near the top when evaluated against the full 20k catalog.</p><p>That matters more than looking impressive in the model name.</p><h3>Fair ALS vs NCF comparison</h3><p>The original ALS champion in the main app is a hybrid system. It mixes collaborative filtering with metadata like author, genre, rating, page count, popularity, and language.</p><p>That is useful in the product, but it is not a fair model-only comparison with NCF.</p><p>So for this repository, I compared ALS and NCF under a stricter rule:</p><p>No hybrid metadata.<br>No author boost.<br>No genre boost.<br>No product-side reranking.<br>Just the model behavior.</p><p>The ALS comparison model uses the same user_items.npz matrix and an NCF-style leave-one-out protocol. It trains plain implicit ALS on the same user subset sizes and evaluates with both sampled candidates and the full catalog.</p><p>Here are the fair comparison results:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/852/1*xGjC4NVm_Ppknrib5Kc3AQ.png" /></figure><p>Under this model-only protocol, NCF beats plain ALS clearly.</p><p>So the neural model is better than plain ALS when both are stripped down to collaborative behavior only. But the full project champion is still the cleaned hybrid ALS model with metadata, at MRR = 0.2143. This is not a contradiction. It basically means:</p><blockquote>NCF &gt; plain ALS<br>ALS + metadata &gt; current NCF</blockquote><p>The obvious next experiment is:</p><blockquote>NCF + full dataset + metadata</blockquote><p>And this is where compute enters the room, pulls up a chair, and quietly ruins the evening.</p><p>The current NCF work was constrained by available hardware. The 21 different experiments took 24+ hours to train on 5k-50k users. Training the neural model on the full 685k-ish user-scale dataset, while also mixing in metadata features, would require much more time and compute than I had available during this experiment cycle.</p><p>The theoretical expectation is that a full-scale metadata-aware NCF model should outperform the ALS champion. It has the model flexibility, it already beats plain ALS in the fair setup, and metadata was exactly what made ALS much stronger in the production-style pipeline.</p><p>But “theoretically should” is not a result. It’s just a hypothesis.</p><h3>Conclusion</h3><p>The recommendation work reached three useful conclusions.</p><p><strong>First</strong>, ALS is extremely strong when the data is represented well. Mean-centering, implicit read signals, duplicate cleanup, and metadata reranking mattered more than just increasing model size.</p><p><strong>Second</strong>, NCF has much more room to grow than ALS. ALS is powerful, but its scoring function is still fundamentally a dot product between a user vector and a book vector. NCF can learn more complicated user-book correlations through the neural network on top of the embeddings. That is exactly why it beat plain ALS in the fair comparison, and also exactly why it is expensive. The same flexibility that gives NCF more potential also makes it hungry for data, epochs, tuning, and compute. I do think a full-scale metadata-aware NCF model should eventually beat the ALS champion, but I cannot honestly claim that result yet because I do not currently have the computational power to train it properly.</p><p><strong>Third</strong>, future me should be less heroic and more strategic with experiments. Start with iterations or epochs first, because knowing when the model stops improving saves a ridiculous amount of time. Use a real train/validation split from the beginning, otherwise the metrics become too optimistic and then you have to emotionally recover from your own spreadsheet. Test parameters like lambda and learning rate on a log scale, because 0.1 -&gt; 0.2 can do almost nothing while 0.01 -&gt; 0.1 -&gt; 1.0 -&gt; 10.0 actually tells you something. Run hyperparameter experiments on smaller data first, then spend the expensive full-dataset training runs only on the combinations that already proved themselves.</p><p>The current winner depends on the question:</p><p>Best model-only collaborative recommender in this repo? <strong>NCF</strong>.</p><p>Best practical recommender built so far for eBookReader? <strong>Hybrid ALS + metadata.</strong></p><p>Most promising next research direction? <strong>Full-scale metadata-aware NCF</strong><em>.</em></p><p>That is a satisfying result. Not finished, but satisfying. The kind of result where the model did not solve everything, but it did make the next door very obvious.</p><h3>Future direction</h3><p>For recommendation systems, the next big step would be training NCF on the full dataset and adding metadata features directly into the model.</p><p>A future version could use user embeddings, book embeddings, author embeddings, genre/category features, rating/popularity features, page count and language features and maybe even text embeddings from descriptions, if I decide to make my laptop suffer artistically</p><p>But for now, I am finally moving into computer vision.</p><p>I am not going to say what the project is about yet. But cardio will definitely become more fun to me. The project should be fun and useful at the same time, which is what makes me excited about it.</p><h3>References</h3><ol><li>Hu, Y., Koren, Y., &amp; Volinsky, C. (2008). <em>Collaborative Filtering for Implicit Feedback Datasets</em>. Proceedings of the 2008 IEEE International Conference on Data Mining.</li><li>He, X., Liao, L., Zhang, H., Nie, L., Hu, X., &amp; Chua, T.-S. (2017). <em>Neural Collaborative Filtering</em>. Proceedings of the 26th International Conference on World Wide Web (WWW 2017).</li><li>Rendle, S., Freudenthaler, C., Gantner, Z., &amp; Schmidt-Thieme, L. (2009). <em>BPR: Bayesian Personalized Ranking from Implicit Feedback</em>. Proceedings of UAI 2009.</li><li>Wan, M., &amp; McAuley, J. (2018). <em>Item Recommendation on Monotonic Behavior Chains</em>. Proceedings of the 12th ACM Conference on Recommender Systems (RecSys 2018).</li><li>Wan, M., Misra, R., Nakashole, N., &amp; McAuley, J. (2019). <em>Fine-Grained Spoiler Detection from Large-Scale Review Corpora</em>. Proceedings of ACL 2019.</li><li>Wan, M., &amp; McAuley, J. UCSD Goodreads Dataset. <a href="https://github.com/MengtingWan/goodreads">https://github.com/MengtingWan/goodreads</a></li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8008bd92404f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>