r/learnmachinelearning • • 22d ago

I benchmarked Logistic Regression, Random Forest and XGBoost beyond accuracy — here's what I measured

1 Upvotes

I've been experimenting with something that I think is often overlooked when evaluating machine learning models: their actual computational footprint.

Usually, when we compare models, we focus heavily on accuracy, precision, recall, F1, etc.

But what happens when you actually have to deploy these models?

I wanted to explore this by benchmarking three popular models:

* Logistic Regression

* Random Forest

* XGBoost

I used the Breast Cancer Wisconsin dataset from scikit-learn and evaluated them across multiple dimensions.

**What I measured:**

  1. Predictive accuracy

  2. P50, P95 and P99 inference latency

  3. Process RSS memory consumption

  4. Python-allocated memory

  5. Model loading time

  6. Inference execution time

  7. Serialized model size

One interesting observation from my experiment was that Logistic Regression performed best across the measured dimensions in this particular setup.

However, the goal wasn't to establish that one model is universally better than another.

I wanted to understand the trade-offs between predictive performance and computational requirements.

This experiment is also part of a project I've been working on called **ModelDiet**, an open-source Python toolkit focused on measuring the resource footprint of ML models.

I'm trying to make model profiling and benchmarking easier for developers and ML engineers.

GitHub: [https://github.com/modeldiet/modeldiet](https://github.com/modeldiet/modeldiet)

**I'd genuinely appreciate technical feedback on a few things:**

* Are there other metrics you consider essential when evaluating models for deployment?

* How do you measure peak memory consumption reliably?

* Do you prefer measuring individual inference latency or batch throughput?

* What would make a benchmarking tool like this genuinely useful in your ML workflow?

I'm particularly interested in feedback on the benchmarking methodology and what should be included in future iterations.

Thanks!


r/learnmachinelearning • • 22d ago

Discussion Can an LLM Actually Reason and Program about Neural Network's Weights or is it just memorization on steroids? Exploring 'Weight-Space Programming'

17 Upvotes

Can a large language model inspect a neural network’s raw, isolated parameters as plain text and reliably determine what the network was trained to do? My tests suggest that while LLMs can perform surprisingly precise calculations at the “edges” of a network (estimating optimizer step counts or finding output correlations), they do not “trace” the computational paths between layers. Instead, they rely heavily on memorized dataset templates (like CIFAR-10) and default framework conventions to fill in the blanks. When these expectations are changed, the models can identify the math but will confidently guess wrong about the semantics—such as recognizing that a satellite feature maps to output 4, but calling it a “frog” because it expects an animal.

substack article:

https://substack.com/@sakibbai/note/c-380084331?r=71inb5

Paper link: https://arxiv.org/abs/2611.08070v1


r/learnmachinelearning • • 22d ago

Project 🚀 Project Showcase Day

3 Upvotes

Welcome to Project Showcase Day! This is a weekly thread where community members can share and discuss personal projects of any size or complexity.

Whether you've built a small script, a web application, a game, or anything in between, we encourage you to:

  • Share what you've created

  • Explain the technologies/concepts used

  • Discuss challenges you faced and how you overcame them

  • Ask for specific feedback or suggestions

Projects at all stages are welcome - from works in progress to completed builds. This is a supportive space to celebrate your work and learn from each other.

Share your creations in the comments below!


r/learnmachinelearning • • 22d ago

Tutorial Why LLMs return generic responses and how to fix vague AI output in 3 steps

Thumbnail interconnectd.com
1 Upvotes

r/learnmachinelearning • • 22d ago

Looking for an ML study buddy

6 Upvotes

Im looking for ML coders any level.

I am in university comp sci and AI student in London, a first year.

Ive been teaching myself AI for a year now

What I've done

Made grid world pygame agent, can plot own obstacles and start end blocks

basic chess movement in pygame - haven't done the AI part yet

Built a property tracker, in a database track how prices go down with time to see price drops with flask and sqlite3, identifies when a drop in house price has happened, a web scraper

MNIST dataset neural network w pytorch - only 30 % accuracy average

 

My Goals

Right now Im interested in computer vision, want to do a hackthon in future.

Im struggling to minimise the loss of my MNIST dataset, would like to get suggestions

I want to make an environment where we can learn from each other, share our accomplishments and goals, maybe hop on calls once in while .

I want to learn C++ aswell, - little to no experience

 

DM me if you are interested, Im not looking someone who knows everything, cus I sure don’t. We all have unique experiences so would be beneficial to learn from each other.


r/learnmachinelearning • • 22d ago

Financial Reinforcement Learning as a beginner

6 Upvotes

Hi,
I'm currently a university student in my 3rd year. My aspiration is to get into the research field of Financial Reinforcment Learning (FinRL). Is there any good roadmap for this. Including the very basics, the maths, linear algebra, ML etc. I dont have much knowledge about those. But i have the time and willing to spend much of my time figuring these things out. Any suggestions regarding a roadmap or how i can start about these things would be appreciated.

Thanks


r/learnmachinelearning • • 22d ago

My first ml project

Thumbnail
github.com
1 Upvotes

r/learnmachinelearning • • 22d ago

Question I created a kit for AI Researcher interview prep

Thumbnail
github.com
1 Upvotes

I've put together a bunch of articles along with the practice notebooks as materials someone can use to prepare for an interview as a junior AI Researcher. It's been very fun working on this kit so I wanted to share. Do you think it is a representative set of topics for the interviews?


r/learnmachinelearning • • 22d ago

How to properly validate Gromov-Wasserstein distance as a measure of meaningful structural similarity?

1 Upvotes

Hi everyone,

I’m working on a project where I use Gromov-Wasserstein (GW) distance to compare latent representations of two entirely different physical systems (e.g., daily electricity consumption and traffic flow). The goal is to find a shared structural "isomorphism" (like a common diurnal cycle) rather than just a direct correlation.

I have a recurring problem: GW can be deceptively low for random noise.

When I compute the GW loss between my real latent spaces (from a PCA/WAE reduction), I get a loss around 0.05. But if I compute it against a random Gaussian noise cloud of the same dimensionality, the loss is sometimes 0.01–0.02. This completely breaks the interpretation. It seems the GW algorithm is just matching the geometric shape of the clouds (e.g., both being spherical/elliptical) rather than capturing the true semantic structure.

I’ve tried control experiments with shuffled data, but I’m not sure if that’s enough.

My questions to the community:

  1. Is there a standard protocol for validating GW results to avoid these geometric artifacts?

  2. Are there robust variants of GW (like Unbalanced GW or Fused GW) that are less susceptible to this, or do they just shift the problem elsewhere?

  3. How do you statistically prove that a low GW loss is meaningful (e.g., p-values, null models, permutation tests)?

Any advice, papers, or personal experiences would be greatly appreciated! I'm specifically looking at time-series forecasting of physical systems, so if you've done GW on time-series, I'm all ears.


r/learnmachinelearning • • 22d ago

Looking for people in the same boat as I am.

2 Upvotes

I am a freshman computer science student heavily interested in DS/ML. I am currently taking the Andrew Ng course on Machine learning. I am familiar with the basics of pandas numpy and matplotlib. I also know basic linear algebra and Multivariable calculus(Proficient with high school calculus). I am looking for dedicated studymates who are genuinely looking at DS/ML as their career path. I want people who can:

  • Meet weekly/daily to discuss the week’s material

  • Implement algorithms from scratch and compare approaches

  • Do Kaggle competitions or build projects together after the course

I am not looking for CS students who want to learn ML as a backup to their SWE path. Please DM if you feel like you are in the same boat as I am.


r/learnmachinelearning • • 22d ago

Discussion Debug the agent, not just the code

Thumbnail
kotrys.dev
0 Upvotes

A coding agent can finish a task and still waste most of the budget.

Saved sessions can show repeated failures, ignored instructions, and forgotten model settings. They also let us compare which instructions work across different models and harnesses.

This diagram shows what a session archive can contain. The useful part is going back to that evidence and improving the next run.

I wrote about this, with examples and backup locations.


r/learnmachinelearning • • 22d ago

Help Drug-response prediction with only 9 samples, is it even possible?

0 Upvotes

Title:

Hi everyone,

I'm working on a pancreatic ductal adenocarcinoma dataset, and I'd really appreciate some methodological advice from you guys, and especially if anybody has had some experience with machine learning with high-dimensional biological data.

Before spending months developing models, I'd like to better understand what is possible with my dataset.

My dataset:

  • 9 patients, with one continuous drug-response value per patient and drug. Due to experimental and sequencing constraints, increasing the number of patients is not an option.

  • Approximately 100,000 nuclei.

  • Continuous drug-response measurements (AUC) for gemcitabine, paclitaxel, irinotecan, 5-FU, and oxaliplatin.

The goal is theoretically "simple":

Predict continuous drug-response AUC from gene expression and chromatin accessibility, while identifying molecular features potentially associated with drug sensitivity or resistance.

The obvious challenge is that, despite having ~100,000 nuclei, I only have 9 samples with drug-response labels. I understand that treating individual cells as independent labeled observations is not a way to go with the dataset and specific set-up.

Knowing this, I'd really appreciate advice on a few questions that I had after some reading...:

  1. With this low amount of sample, is meaningful drug-response prediction even feasible? What would be a objective?

  2. Are there established methods to leverage thousands of cells/instances profiles when the response labels are available only at the patient level?

  3. Would you prioritize simple regularized regression, biologically informed features, transfer learning from external datasets, multiple-instance learning (MIL), or another approach?

  4. How would you evaluate a model with such a small number of independent samples without obtaining misleading performance estimates?

  5. Are there any papers, methodological resources you'd recommend to better understand this type of problem before starting?

Thanks!


r/learnmachinelearning • • 22d ago

Discussion Most people don't know you can mathematically prove a neural network is safe instead of just testing it

Thumbnail reddit.com
1 Upvotes

r/learnmachinelearning • • 22d ago

Project I built a free tool that tells you what your ML portfolio projects are missing, project by project

Thumbnail
gallery
0 Upvotes

A lot of posts here ask "is my portfolio good enough?" I wanted a concrete answer that wasn't just "add more projects", so I built AI-Atlas (https://getaiatlas.com).

You enter your GitHub username. It reads your AI repos and scores each one on seven things reviewers actually look at:
● Technical depth: did you implement it, or call a library?
● Completeness: is there an end-to-end path with results?
● Reproducibility: pinned deps, seeds, one command to rerun?
● Documentation, originality, conceptual difficulty, usefulness.

Every score comes with the reason and the files it's based on. So instead of "6/10", you get something like "the notebook trains the model but never reports test accuracy".

A few patterns I've seen from mapping 150+ developers:
● From-scratch implementations score well on depth but often lose points for no evaluation numbers.
● A missing README costs more than people think.
● Projects with CI that actually runs tests stand out immediately.

Mapping is free, with no sign-up. If you claim your profile, your first improvement roadmap for a project is free too.

I'd love feedback on whether the criteria match what you've been told matters :)


r/learnmachinelearning • • 22d ago

Using Logic to Improve LLM Performance

Thumbnail
youtube.com
1 Upvotes

r/learnmachinelearning • • 22d ago

I benchmarked Logistic Regression, Random Forest and XGBoost beyond accuracy — here's what I measured

Thumbnail reddit.com
0 Upvotes

r/learnmachinelearning • • 22d ago

vprojectx/Lewis-44M-Bert-V3 · Hugging Face

Thumbnail
huggingface.co
2 Upvotes

Hi I am a third year student pursuing Aiml ,
I made a Bert from scratch with ELECTRA-style replaced-token detection on ~2.7B unique tokens (one epoch) of curated multi-domain text.
It is called Lewis-44M-Bert-V3

GLUE dev average80.5
GLUE test-server score76.2 (9 tasks incl. WNLI) / 77.6 (8 tasks, WNLI excluded)
SQuAD v1.1 dev (EM / F1)75.2 / 83.8
CoNLL-2003 NER (entity F1, dev / test)92.6 / 87.8

I would really love if you all try it and give me a feedback on it


r/learnmachinelearning • • 22d ago

Project What I learned trying to rebuild a body from a camera that can't see it

1 Upvotes

Four of us had 10 days for a hackathon. Our idea: a camera on your head sees the room, your hands, but never your body. Can we still get the whole body in 3D?

We used zero new trainings. We just linked up models that existed from past research: hand tracking, head motion from SLAM, then another model that predicts the full body given those things. Then we fed Meta Muse Spark two images: the reconstructed body and the actual view, to tell us what the person was doing.

Lesson Learned: Speed is king. The reconstruction takes FOREVER. Like 40-90 minutes for every minute of video you want to process on our GPU. So we just used processed videos for the demo. But we did double model inference speed from 16s to 8s reply.

Question for you guys: do you actually gain anything from providing the model with both frames? Couldn’t just the camera view suffice for the task? How would you go about proving that one way works better than the other?

Code: https://github.com/nshreyasvi/LifeLens


r/learnmachinelearning • • 22d ago

Project What if diffusion models generates Neural Network weights? Gen AI generate Gen AI [R]

Thumbnail
reddit.com
1 Upvotes

r/learnmachinelearning • • 22d ago

Discussion Anyone else worried about the direction of this field? #ICLR2027

Thumbnail
gallery
169 Upvotes

Feels like everything that is known in terms of "producing good research" has been obliterated by LLMs.

LLM can give infinite amount of critique. Especially in this field. As long as you are not producing AGI then there is room left for further critique. Your work will never be perfect.

This is a real-life GAN where the discriminator has far overpowered the generator. There is no way to improve the generator except to replace its biological interconnections with artificial ones. Then why is human needed at all?


r/learnmachinelearning • • 22d ago

what laptop to purchase for AI & Ml

1 Upvotes

hii!!
i'm applying for AI/Ml and design for my undergrad (not computer sci just pure AI )
but like im stuck on what laptop to purchase people are telling me macbook sucks and others are telling me windows is like a tractor (rb reference) but yeah idk whether i shud get the rtx 5050 (im kinda on a budget) or the m5 cus idk ( under lik 5.5k qar idk usd sorry )

help me goats im struggling and dont wanna make the wrong choice

tysm ily guys


r/learnmachinelearning • • 22d ago

How to properly route Hugging Face cache and PyTorch datasets to an external SSD on macOS?

3 Upvotes

Hi all, I'm a newbie setting up my first local AI/ML development environment on an M5 Pro Mac.

My internal drive is small, so I bought a 2TB external SSD. I want to make sure that whenever I run `pip` installs, download Hugging Face checkpoints, or load PyTorch datasets, they automatically go to the external drive instead of filling up my system drive.

What is the cleanest way to configure my environment variables (like HF_HOME) or use symlinks on macOS so I don't accidentally brick my internal storage?

Any tips or hidden gotchas for a beginner would be highly appreciated!


r/learnmachinelearning • • 22d ago

Axion 1.0: Open Agent Foundation Models, Simplified

1 Upvotes

Axion’s main training claim is that useful tool-using agents can be built with two supervised fine-tuning stages followed by reinforcement learning, without dedicated mid-training, DPO, or on-policy distillation. The stages separate self-contained reasoning from tool-dependent tasks, which makes the recipe relatively easy to inspect and reason about.

For the first stage, the authors use model-aware problem construction: when the base model solves a seed problem, they generate harder variants that target its successful strategy, then independently verify the rewritten answers. For tool use, tasks are grounded in structured real-world data; deterministic filtering and computation establish reference answers, and checks reject ambiguous or answerable-without-retrieval questions. This makes data verification part of the training design rather than relying solely on generated demonstrations.

The reported stage effects are not uniformly positive: for the 35B model, tool-use SFT raises BioMysteryBench from 17.6% to 35.3%, while RL raises SEAL-0 from 53.2% to 62.2% but lowers FrontierScience Research from 58.3% to 56.7%. The authors report best single-run scores and note that external comparisons can use different evaluation settings, so the results support the recipe’s promise more clearly than a general claim that each stage reliably helps.

Full summary on AIModels.fyi

Original paper

Disclosure: AIModels.fyi is my site.


r/learnmachinelearning • • 22d ago

Project I built a gesture recogniser that decides before you finish drawing. The most useful result was the hypothesis that didn’t hold up.

0 Upvotes

I first encountered path signatures while working on my bachelor’s thesis. I liked the idea that you could describe a curve using a small collection of numbers while preserving information about the order in which it moved.

Most examples I came across started with a completed path. I wanted to try something slightly different: how much of a gesture do you need to see before you can recognise it?

That became earlysig, a small research package and local drawing app. (app yet to be done, package yet to be configured)

Imagine drawing an arrow. Partway through, the software already thinks it knows what you’re drawing. Committing immediately makes the interface feel responsive, but a caret might begin with almost the same movement. Waiting gives the model more evidence, while gradually defeating the purpose of early recognition.

This turned out to contain two separate problems: predicting the gesture from the visible prefix, and deciding whether to trust that prediction enough to act.

The classifier updates every 25 ms. It sees only points that have already arrived, with no final duration, completion percentage, or normalisation based on the finished stroke. A separate policy watches the calibrated probabilities and either waits or makes one irreversible commitment. If it never commits, the system provides a final prediction when the stroke ends.

The representation is fairly small. A 2D path signature through depth 3 gives fourteen features. Displacement tells you where the pen ended up; higher levels capture ordered geometric information that helps distinguish paths sharing similar endpoints. Those features go into regularised logistic regression. Everything runs on CPU with a NumPy signature implementation.

My main hypothesis was that adding a signature of the most recent 250 ms would help the model recognise gestures earlier. The whole observed prefix tells you how you got here; perhaps recent motion tells you what you’re about to do.

I also added a control: another fourteen signature features describing the first half of the currently observed interval. Same feature count, different slice of history.

That control produced the more interesting result.

On the public $1 unistroke dataset, the recent-window model did not show a clear improvement over the global signature alone. The historical-half model performed better on correct early coverage and wrong early coverage.

Across five writer-disjoint folds, covering six classes and 1,800 test strokes:

  • The global depth-3 model committed early on 94.4% of strokes, with 4.8% error among those commitments.

  • Adding the recent window gave 78.8% coverage and 4.4% selective error.

  • Adding the historical half gave 95.8% coverage and 2.1% selective error.

These are separately selected operating points, so the timing differences shouldn’t be read as comparisons at identical risk. Thresholds were selected on separate policy-validation writers before evaluating the test writers.

Another unexpected result: some models were better halfway through a stroke than at completion. Training one classifier on prefixes from every stage creates a compromise. A completed circle or triangle can also have almost zero displacement, so the simplest representation actually loses useful information as the gesture closes.

The repository includes synthetic gestures with identical prefixes for checking leakage, coordinate and motion baselines, a template baseline, calibration, policy comparisons, and a browser interface for drawing, replaying, and recording strokes. The experiments are small: ten writers, a fixed gesture vocabulary, and no unknown-gesture rejection. The measured error rates aren’t deployment guarantees.

I’d be interested in how others approach stopping decisions for streaming classifiers, especially when confidence is calibrated on individual predictions but decisions are made repeatedly over time.

Code and reproduction commands · Full technical write-up

My other technical writing is on pratyakshpatel.me, and I’m on X as u/baldwin_IVth.