Skip to main content

Implementation of the neural tangent kernel for scikit-learn's Gaussian process module.

Project description

Neural Tangent Kernel for scikit-learn Gaussian Processes

scikit-ntk is implementation of the neural tangent kernel (NTK) for the scikit-learn machine learning library as part of "An Empirical Analysis of the Laplace and Neural Tangent Kernels" master's thesis (found at http://hdl.handle.net/20.500.12680/d504rr81v and https://arxiv.org/abs/2208.03761). This library is meant to directly integrate with sklearn.gaussian_process module. This implementation of the NTK can be used in combination with other kernels to train and predict with Gaussian process regressors and classifiers.

Installation

Dependencies

scikit-ntk requires:

  • Python (>=3.7)
  • scikit-learn (>=1.0.1)

User installation

In terminal using pip run:

pip install scikit-ntk

Usage

Usage is described in examples/usage.py; however, to get started simply import the NeuralTangentKernel class:

from skntk import NeuralTangentKernel as NTK

kernel_ntk = NTK(D=3, bias=0.01, bias_bounds=(1e-6, 1e6))

Once declared, usage is the same as other scikit-learn kernels.

Citation

If you use scikit-ntk in your scientific work, please use the following citation alongside the scikit-learn citations found at https://scikit-learn.org/stable/about.html#citing-scikit-learn:

@mastersthesis{lencevicius2022laplacentk,
  author  = "Ronaldas Paulius Lencevicius",
  title   = "An Empirical Analysis of the Laplace and Neural Tangent Kernels",
  school  = "California State Polytechnic University, Pomona",
  year    = "2022",
  month   = "August",
  note    = {\url{http://hdl.handle.net/20.500.12680/d504rr81v}}
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scikit-ntk-1.0.1.tar.gz (4.6 kB view details)

Uploaded Source

Built Distribution

scikit_ntk-1.0.1-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file scikit-ntk-1.0.1.tar.gz.

File metadata

  • Download URL: scikit-ntk-1.0.1.tar.gz
  • Upload date:
  • Size: 4.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.7.6 Linux/5.15.0-47-generic

File hashes

Hashes for scikit-ntk-1.0.1.tar.gz
Algorithm Hash digest
SHA256 11ddd1ee475cf0c28d8294e9135501d4f4c9283e5cc745fdcd219e3cdfe37403
MD5 26987d7085dc7cb3cdc6a416c5e9029f
BLAKE2b-256 6b243d1fe12d3675f61b622eb75268a42f79297ba10848703fa6c93b378155bf

See more details on using hashes here.

File details

Details for the file scikit_ntk-1.0.1-py3-none-any.whl.

File metadata

  • Download URL: scikit_ntk-1.0.1-py3-none-any.whl
  • Upload date:
  • Size: 4.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.14 CPython/3.7.6 Linux/5.15.0-47-generic

File hashes

Hashes for scikit_ntk-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e34199f39d9a0489f40891a53e096614db14ec5a952529da4eab1a9ce695f462
MD5 35f76d550f042852f71a7f574e49348b
BLAKE2b-256 556745047dc5b2150fc8fb457ae1f608f20f30d9156b17382e6a89e49b2bc4d8

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page