Pure Kernel Regression: noise-free, explainable tabular regression via high-purity feature windows
Project description
PKR‑Regression
Ultra‑light, transparent and noise‑proof regression library
🚀 Why PKR‑Regression?
| Pain Point | Classic ML | PKR |
|---|---|---|
| Hyper‑parameters | ❌ Yes | ✅ No (3‑4 flags) |
| Black‑box outputs | ❌ Yes | ✅ Rule‑based explanation |
| Sensitive to noise | ❌ | ✅ Middle zone muted by median |
| Training time | Long / tuning | Seconds |
In short: “Keep the crystal‑clear signal, ignore the rest.”
🔍 4‑Step Method
- Pole Labeling
Sort target y.- Bottom 33 % → label
0 - Top 33 % → label
1
- Bottom 33 % → label
- Cell Scanning
Build tiny cells for every 1‑, 2‑, 3‑feature combo (fixed width / exact category). - Valuable Kernel Selection
- ≥ 90 % same label
- ≥ 10 rows
⇒ kernel value = mean of that cell.
- Prediction
- Test row hits ≥1 valuable kernel → average(kernel_values)
- Hits none → global median.
Optional flags:
--bins 5(five quantiles),--max-dim 1/2/3,--gpufor fast parallel scan.
⚡ Quick Start
pip install pkr-regression
pkr \
--train train.csv \
--test test.csv \
--target Listening_Time_minutes \
--output submission.csv
Outputs: submission.csv (Kaggle‑ready) + kernels.txt (selected cells)
📊 Kernel Example
| Kernel Rule | Prediction |
|---|---|
| Podcast = Comedy Corner & Length 0‑0.5 | 6.4 min |
| Podcast = Innovators & Length 0.5‑1.0 | 91.7 min |
A test row intersecting the first rule returns 6.4; the second rule → 91.7.
💡 FAQ
Q: Overfitting risk?
A: No – noisy cells (< 90 % majority or < 10 rows) are discarded automatically.
Q: Big data?
A: 1M+ rows train in minutes on one core; --gpu accelerates further.
Make your model explainable with PKR‑Regression — try it & share feedback!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pk_regression-0.0.2-py3-none-any.whl.
File metadata
- Download URL: pk_regression-0.0.2-py3-none-any.whl
- Upload date:
- Size: 6.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.9.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be191ad54a4508738c1f33dfb642c3d611024f7ae7b824ae2f28bf931436b44e
|
|
| MD5 |
9cabf475ac301d6ba4321db0ed968bfd
|
|
| BLAKE2b-256 |
128101cbb8687aa40639cac4da0393991c808d79a9fb38356becde8a7d006da8
|