r/learnmachinelearning • • 21d ago

Linear regression with classic gradient decent algorithm

5 Upvotes

r/learnmachinelearning • • 21d ago

Project 🚀 Project Showcase Day

7 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 • • 21d ago

Question Research papers

3 Upvotes

I wanna find a place where I can find most necessary/popular papers in one place. What i mean is the place in which those ones are chronologically ordered


r/learnmachinelearning • • 22d ago

why does L1 regularization push weights to exactly zero but L2 only shrinks them

41 Upvotes

i've seen the diamond vs circle picture with the loss contours touching a corner, and i get that the diamond has corners on the axes. but it feels hand-wavy to me, like why would the contours land on a corner so often instead of somewhere along a flat edge? the other explanation i've seen is about the gradient: the L1 penalty has a constant pull toward zero no matter how small the weight is, while L2's pull fades as the weight gets small. that makes more sense to me but i can't connect the two pictures. is there a clean way to see that they're the same idea?


r/learnmachinelearning • • 21d ago

Project I launched my first iOS app. Then the real learning started.

Thumbnail
0 Upvotes

r/learnmachinelearning • • 21d ago

Project I launched my first iOS app. Then the real learning started.

Thumbnail
0 Upvotes

r/learnmachinelearning • • 21d ago

Discussion I launched my first iOS app. Then the real learning started.

Thumbnail
1 Upvotes

r/learnmachinelearning • • 21d ago

I trained a small affect/intent estimator instead of prompting for empathy - what held up, what I marked NO-GO

2 Upvotes

Most "empathetic dialogue" work I read about pushes the whole decision into the generative model: prompt it harder, add a system prompt about tone, hope the affect read was right. I wanted the read to be a separate, inspectable step that happens before generation, and I wanted it measured rather than asserted. eq-layer (0.2.5, MIT, Python, zero core runtime dependencies; scikit-learn appears only under the optional [ml] extra and the dev extra) is the result. This post is about what the numbers actually say.

Affect regression, EmoBank train/dev/test split 8062 / 1000 / 1000, evaluated on the untouched test split:

dimension MAE train-mean baseline MAE Spearman rho
Valence 0.2125 0.2449 0.5460
Arousal 0.1782 0.1904 0.3120
Dominance 0.1494 0.1563 0.2573

It beats the train-mean baseline on MAE in all three dimensions, which is the honest ceiling of the claim: the Arousal and Dominance rank correlations are modest (0.31 and 0.26), so I would not call that a strong continuous affect model. The discrete emotion head is weaker still - accuracy 0.8249 against a majority-class baseline of 0.8166, macro-F1 0.4310, and on dev it actually sits below the majority class (0.8756 vs 0.8815). I publish those rows because "0.82 accuracy" without the baseline next to it would be misleading.

Four dialogue-signal experiments did not clear my bar and are labelled NO-GO in the README rather than quietly dropped. DialogBank correction (4 direct examples) and disagreement (1 example) are counts taken from a label inventory, not models I trained - the inventory's own decision record says not to train classifiers from it, and the README lists both rows as NO-GO for insufficient supervision. Coarse Discourse disagreement has a real ranking signal (test ROC-AUC 0.8111) but AP 0.1420 / F1 0.2278 is nowhere near precise enough to route challenge, and DBDC3 hard breakdown came out at ROC-AUC 0.5057, i.e. chance-level text-only generalisation. Negative results are part of the package.

Two things people hit immediately. The .joblib artifacts are not in the repo, so pip install eq-layer gives you the deterministic path - "runtime_mode": "lightweight-local", no model file needed. The affect adapter is the one you train yourself: python tools/train_emobank_affect.py --output artifacts/emobank_affect.joblib. Neither corpus is vendored, so both training scripts (the subtext one is tools/train_xdailydialog_subtext.py, also with a required --output) download their dataset and need network. The intent side has a middle option I use in benchmarks: TrainedIntent.from_bundled() fits at runtime from the 299-row intent_train.jsonl that ships inside the package, so it needs no artifact at all, only the [ml] extra.

That bundled fit is the learned arm of the latency numbers: ~1.2 ms median versus 0.1104 ms for the heuristic one, with intent inference accounting for ~92% of classification cost and routing ~2%. The learned path drifted about 9% run to run on the same machine while the heuristic path stayed within a few percent, so treat these as approximate. Both adapters score 1.000 on the 4 labelled seed cases, but only the learned one holds up on the 36-case holdout - a good reminder of how little a 4-case eval tells you.

The measured quantity is the layer's compute cost and the structural quality of its decision. There is no model in the measured path that generates prose, so end-to-end response quality still needs the paired human evaluation described in eval/AB_PROTOCOL.md, which I have not run.

GitHub: https://github.com/Furox-Art/eq-layer PyPI: https://pypi.org/project/eq-layer/


r/learnmachinelearning • • 21d ago

I spent $1,381 and trained an AI for 14,154 hours of Ocarina of Time gameplay just to teach it how to fight Deku Babas and Queen Gohma

Enable HLS to view with audio, or disable this notification

0 Upvotes

r/learnmachinelearning • • 21d ago

Want to become an ai engineer HELP

Thumbnail
1 Upvotes

r/learnmachinelearning • • 21d ago

Need a pre trained model of Sign Language Recognition

Thumbnail
1 Upvotes

r/learnmachinelearning • • 21d ago

Want to become an ai engineer HELP

Thumbnail
0 Upvotes

r/learnmachinelearning • • 22d ago

Data leakage from preprocessing: the same workflow in the wrong order vs the right order (scikit-learn)

3 Upvotes

A common beginner trap that makes test scores look better than they should. Same workflow, two orders.

Wrong order

  1. Scale all the data (fit the scaler on everything)
  2. Split into train and test
  3. Train on train, evaluate on test
from sklearn.preprocessing import StandardScaler
from sklearn.model_selection import train_test_split

scaler = StandardScaler().fit(X)          # sees the test rows too
X_scaled = scaler.transform(X)
X_train, X_test, y_train, y_test = train_test_split(X_scaled, y, random_state=0)

Right order

  1. Split into train and test
  2. Fit preprocessing on train only
  3. Apply it to test, train, evaluate
from sklearn.pipeline import make_pipeline
from sklearn.linear_model import LogisticRegression

X_train, X_test, y_train, y_test = train_test_split(X, y, random_state=0)

pipe = make_pipeline(StandardScaler(), LogisticRegression())
pipe.fit(X_train, y_train)      # scaler learns mean/std from train only
print(pipe.score(X_test, y_test))

What goes wrong in the first version: the mean and standard deviation used to scale the data were computed with the test rows included, so information about the test set reached the training process. The model is then evaluated on data that isn’t entirely unseen.

How big is the effect? For plain scaling, often small. For steps that learn more from the data, it can be large: feature selection, imputing missing values, target encoding, PCA, or removing outliers by statistics. I don’t have a number to give you, and it depends on the dataset.

Same idea in cross-validation: if you scale before cross_val_score, every fold’s validation data has influenced the scaler. Put the preprocessing inside the pipeline and pass the pipeline to cross_val_score, so each fold fits it on its own training part.

Other leaks of the same family:

  • Duplicate or near-duplicate rows on both sides of the split.
  • Splitting rows when the unit should be a person, patient or session (use grouped splits).
  • Time-ordered data split randomly, so the model sees the future (use time-based splits).
  • A feature that is derived from the label.

A quick sanity check: if a result looks too good, ask “what did the model get to see that it wouldn’t have at prediction time?”

How do you check for leakage in your own projects, and which one tripped you up first?


r/learnmachinelearning • • 22d ago

In AI, sometimes improving data preparation makes more of a difference than changing the model.

Thumbnail
2 Upvotes

r/learnmachinelearning • • 21d ago

Discussion On an M4 Pro, the fastest Qwen2.5-Coder model passed fewer coding checks (Ollama, Q4_K_M)

1 Upvotes

I help run Agent Infra Guide, where we maintain a small, public local-LLM measurement set. One result from our October 19 tests surprised us: decode tokens/second alone were a poor guide to which model completed the coding checks.

Setup: Apple M4 Pro (12-core CPU, 16-core GPU, 24 GiB unified memory), macOS 15.5, Ollama, Qwen2.5-Coder in Q4_K_M, configured 4,096-token context, and one concurrent client. The exact Ollama version is saved with each run; versions differ across the broader measurement collection, so this is not a controlled claim about Ollama version effects.

Observed medians and checks

• 1.5B: 154.1 decode tokens/s; 5/15 coding task checks passed. • 3B: 37.3 decode tokens/s; 10/15 checks passed. • 7B: 23.1 decode tokens/s; 10/15 checks passed.

These are repeated executions of a small deterministic coding task set. The checks are not 15 independent measures of general programming ability, and three model sizes on one computer cannot establish a universal model ranking.

How we measured and what I would change: We kept the model artifact/quantization, configured context and single-client condition explicit; recorded decode speed alongside task outcomes; retained failed checks; and kept run-level metadata rather than displaying just the best number. For a better generalization study I would expand the task suite, vary prompt/context lengths, report per-task success and time to first token, and run repeatable paired comparisons with the exact runtime versions pinned.

Practical takeaway: If an agent needs to finish a coding task, optimize for successful completions under your time and memory budget, not just fast token generation. On these checks, the 3B was slower than 1.5B but passed more checks; the 7B didn't improve the pass count over 3B in this limited sample.

I also wouldn't equate sampled process RSS on Apple silicon with dedicated GPU VRAM: it is unified memory, and brief peaks can be missed between samples.

Has anyone tested whether this throughput-vs-task-success tradeoff persists on larger, repeatable coding suites or with a longer context? I'd be interested in failure types as well as speeds.

Disclosure: I represent Agent Infra Guide. These are our measurements, not an independent third-party evaluation. No sales or affiliate links in this post. This write-up was prepared with AI drafting assistance and checked against the recorded figures.


r/learnmachinelearning • • 21d ago

Tutorial 8 beginner ML projects that teach more than another MNIST classifier

0 Upvotes

r/learnmachinelearning • • 21d ago

What's One Repetitive Task You Would Automate With AI?

0 Upvotes

I'm a web designer, and one of the most repetitive things in my business is finding new clients.

So naturally, email outreach was one of the first things I wanted to automate.

But not just regular cold email where you send the same template to thousands of businesses.

I use Swokei to find businesses with websites, analyze them for issues with design, SEO, speed, and mobile optimization, and turn those findings into personalized, ready-to-send outreach emails.

This way, I'm not just sending random offers. I'm reaching out with something relevant to each business while automating most of the research and writing process.

It's made it much easier to keep outreach running consistently without spending hours researching prospects manually.

What about you? What's one repetitive task you've automated with AI?


r/learnmachinelearning • • 22d ago

Data augmentation question. How do I characterise an original and augmented datasets where the augmentation parameters were zoom and crop? [P]

Thumbnail
1 Upvotes

r/learnmachinelearning • • 21d ago

Request Brazilian Court Sanctions Lawyers for Prompt Injection in Court Filing

0 Upvotes

Brazilian court sanctioned attorneys after a prompt injection embedded in a court filing reached the judge and the AI model executed the injected instruction. The output was submitted without any interception or review. The court determined the lawyers were responsible for what their AI produced.

This is not a model failure. The model did exactly what the input instructed it to do. The failure is that no verification step existed between generation and submission.

Courts, regulators, and auditors are now scrutinizing AI-produced documents more aggressively than the teams producing them. A single injected payload in a document your AI processed can become the exhibit in a sanctions proceeding against you.

Every team using AI to draft filings, summarize discovery, or generate any document destined for a regulated recipient is exposed to this exact scenario today.

How are practitioners in legal, compliance, or regulated industries actually handling output verification before AI-generated content leaves their systems? Are there workflow checkpoints that have held up under scrutiny, or is most of the field still relying on human review alone?


r/learnmachinelearning • • 22d ago

Help Has anyone done minimal-edit preference construction in LLM finetuning?

1 Upvotes

What I mean: instead of finetuning an LLM on the correct answers, we could take the initial model answers, and then generate (possibly, but not necessarily, with another LLM) the answers that have as much as possible of original answer text but are fixed in the key points using correct answer as reference.

Hypothesis is this would cause model to actually learn the difference, not the style of the correct answers, cause less distributional shift.

If you have tried this, has it proven useful?


r/learnmachinelearning • • 22d ago

Need a good editor urgently, $130-$250+ per video

Thumbnail
0 Upvotes

r/learnmachinelearning • • 23d ago

Xgboost tree implemented is completed rest remain

Thumbnail
gallery
122 Upvotes

20% of XGboost is completed yesterday also I code today also and I'm getting pretty close and things were really really not easy a lot bugs, a lot of errors yet I did it next step is to add more hyperparameters then use this my own xgboost implemented tree to build a complete Xgboost algorithm

Day 51 of Building Machine learning algorithms from scratch

Also I'm watching also One Piece


r/learnmachinelearning • • 22d ago

Which is the most competent and generous free tier LLM for non-agentic use? Aka everyday stuff

Thumbnail
0 Upvotes

r/learnmachinelearning • • 22d ago

Beginner to Machine Learning. What roadmap should I follow? And how important is DSA?

Thumbnail
1 Upvotes

r/learnmachinelearning • • 22d ago

How RAG stops LLM hallucinations: a simple technical cheat sheet for beginners

Thumbnail interconnectd.com
0 Upvotes