Skip to content

Kernel-Based Regularized Least Squares

2packages depend
6.3Kdownloads / year
76.3%test coverage
13/13flavors OK

Overview

About

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).

Changes in 1.7-1

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-identical lambda. 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 wide lambda range, the golden-section search amplifies the difference into a large gap in the selected lambda (observed 0.052 vs ~0 on MKL). The test now checks the actual contract — that the default objective is LOO, carried by the lambda_method label — 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

CRAN checks
13OK
Slowest check: 2.8 min · r-release-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-05-06
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.7-1
README· In the repository, left out of the releaseVignettesYes · 2 · evaluation depends on the environmentNEWSYes · 100% structured · mentions 1.7-1Citation fileYes · cites a publicationWebsiteYes
Cites a JSS article
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

6.3K
CRAN downloads in the past year
Rank #7,335 · ~17/day · ~524/mo
Daily download trend is not available in this view yet.
42830 days
1.2K90 days
6.3K1 year
Compare downloads with other packages →
Also on104 r2u4 autocran

Repository

0Stars
1Forks
0Open issues
0Open PRs
0Releases
28Commits
2Commit identities
28 commits · Last activity 2026-07-05
Responsiveness
How these are sampled
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

2026-05-24 · 12026-09-20 · 1
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

CRAN release process (3)
cran-comments.mdrevdep/CRAN-SUBMISSION
How this is detected·Detection ruleset v4 (2026-10-20)
AI coding toolsBeta

This repository shows signs of AI coding tools.

  • Claude Codefirst seen 2026-04-30
    Pull request it wrote: opened by a project member
    Commits: at least 20 crediting it in the message
Models named in its commits
  • Claude Opus 4.718 commits · Apr to Jun 2026
  • Claude Opus 4.82 commits · Jul 2026
Counts are commits, not lines of code. Commits by a tool's accounts count once across all of its accounts. Commits crediting it are the largest count among its credit lines, a minimum.How this is detected·Detection ruleset v4 (updated 2026-09-27)

Dependencies

Declared dependencies
5 external dependencies (excludes base and recommended)

Installing KRLS adds no packages beyond those that come with R.

Depends (0)
none
Imports (3)
grDevicesgraphicsstats
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
2direct
0indirect
Imports 2
Depends, Imports or LinkingTo, most downloaded first

People & History

People (2)
Author, Maintainer · added in 1.1-0
Author · added in 1.1-0

Maintainer since 0.1 (2011)

Listed in earlier versions (1)
Jens Hainmueller Chad Hazlett
no longer listed · 0.1 to 1.0-0
Releases (10)

Pick two releases to compare their code metrics.

  • 1.7-1Latest
    record
    2026-07-06 · current release · diff ↗
  • 1.7-0
    record
    2026-06-05 · diff ↗ ·
    added 3 exports
    b_maxvarK, b_maxvarK_nystrom, get_landmarks
  • 1.1-0
    record
    2026-04-30 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • R
    R 3.6.0 released · 2019-04-26
  • R
    R 3.5.0 released · 2018-04-23
  • 1.0-0
    record
    2017-07-10 · diff ↗
  • R
    R 3.4.0 released · 2017-04-21
  • R
    R 3.3.0 released · 2016-05-03
  • R
    R 3.2.0 released · 2015-04-16
Show 11 earlier eventsHide 11 earlier events
  • 0.3-7
    record
    2014-05-21 · diff ↗
  • R
    R 3.1.0 released · 2014-04-10
  • 0.3-5
    record
    2013-12-20 · diff ↗
  • 0.3-2
    record
    2013-08-10 · diff ↗
  • 0.3-1
    record
    2013-08-07 · diff ↗ ·
    added 2 exports
    summary.krls, plot.krls
  • R
    R 3.0.0 released · 2013-04-03
  • R
    R 2.15.0 released · 2012-03-30
  • 0.2
    record
    2011-12-27 · diff ↗
  • R
    R 2.14.0 released · 2011-10-31
  • 0.1
    record
    2011-09-30
  • R
    R 2.13.0 released · 2011-04-13

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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for KRLS version 1.7-1 [Data set]. HJJB, LLC. Data release v2026-10-23. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy