Kernel-Based Regularized Least Squares
Overview
Implements Kernel-based Regularized Least Squares (KRLS), a machine learning method to fit multidimensional functions y = f(x) for regression and classification problems without relying on linearity or additivity assumptions. KRLS finds the best fitting function by minimizing the squared loss of a Tikhonov regularization problem, using Gaussian kernels as radial basis functions. For further details see Hainmueller and Hazlett (2014, doi:10.1093/pan/mpt019).
Test-only patch to clear the CRAN "Additional issues" MKL check.
- The backward-compatibility test "default lambda_method is 'loo'" no longer asserts that two independent
krls()fits select a bit-identicallambda. Both fits run the same deterministic exact path, so they agree exactly under a reproducible (single-threaded) BLAS, but under a non-reproducible multithreaded BLAS such as Intel MKL the leave-one-out objective differs at the ~1e-14 level between the two calls. Because that objective is nearly flat over a widelambdarange, the golden-section search amplifies the difference into a large gap in the selectedlambda(observed 0.052 vs ~0 on MKL). The test now checks the actual contract — that the default objective is LOO, carried by thelambda_methodlabel — and leaves the value comparison out. No package code changed; results on the reference BLAS are unaffected.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK13 OK2026-05-06
- NOTE12 OK, 2 NOTE2026-03-10
Documentation
- Help pages
- 11
- Examples that run
- 83%5 run in a plain check · 1 never run
- Exported functions with examples
- 67%
- Documented parameters
- 69%
- Return-value docs
- 89%
- Help pages citing references
- 27%
Downloads
Repository
- PRs merged (all time)
- 67%
- Median days to close, 50 most recently updated closed issues
- not measured
- Median days to close, 50 most recently updated closed PRs
- 11
Forks over time
PRs over time
5 development-tooling and community-health practices detected across 2 families in the upstream repository
Checks run against github.com/j-hai/krls on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
This repository shows signs of AI coding tools.
- Claude Codefirst seen 2026-04-30Pull request it wrote: opened by a project memberCommits: at least 20 crediting it in the message
- Claude Opus 4.718 commits · Apr to Jun 2026
- Claude Opus 4.82 commits · Jul 2026
Dependencies
Installing KRLS adds no packages beyond those that come with R.
Code & Tests
People & History
Maintainer since 0.1 (2011)
Pick two releases to compare their code metrics.
- 1.7-1Latest
- 1.7-0
- 1.1-02026-04-30 · diff ↗
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- RR 4.3.0 released · 2023-04-21
- RR 4.2.0 released · 2022-04-22
- RR 4.1.0 released · 2021-05-18
- RR 4.0.0 released · 2020-04-24
- RR 3.6.0 released · 2019-04-26
- RR 3.5.0 released · 2018-04-23
- 1.0-02017-07-10 · diff ↗
- RR 3.4.0 released · 2017-04-21
- RR 3.3.0 released · 2016-05-03
- RR 3.2.0 released · 2015-04-16
Show 11 earlier eventsHide 11 earlier events
Package metadata
- First published
- 2011-09-30
- Total releases
- 10 / 15 yrs
- License
- GPL (>= 2) OSI
- Download size
- 130 KB
Cite
Cite this package
Run in R for the authors' entry:
citation("KRLS")The package provides a citation file, so citation() returns the authors' own entry.
It points to 10.18637/jss.v079.i03.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-23, which the citation names so these numbers can be found later. More on citing and the projects behind them.