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" (https://arxiv.org/abs/2208.03761) master's thesis. 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
Useage 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:
@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 = "https://arxiv.org/abs/2208.03761"
}
along with the one listed on the scikit-learn website: https://scikit-learn.org/stable/about.html#citing-scikit-learn
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 Distribution
Built Distribution
File details
Details for the file scikit-ntk-1.0.0.tar.gz
.
File metadata
- Download URL: scikit-ntk-1.0.0.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.4.0-122-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 64fc0202e9f7559ccca5f9cc1eb8d30c97929bf20aee72d81f159ba329a5fa35 |
|
MD5 | 1a9364bd289bc3a7c4174d7c72ad8d38 |
|
BLAKE2b-256 | 53080e18562abdf975aeed09da49b058cf51f05e1e6dedede85c39b3a68143f2 |
File details
Details for the file scikit_ntk-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: scikit_ntk-1.0.0-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.4.0-122-generic
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bf0e0fff87056d0db339dabdabffd98a4afcd3a488bb6e0561f3ec5a982a7e71 |
|
MD5 | 8eed9e79d672a3de29a5958af2afaa73 |
|
BLAKE2b-256 | a961d82c9a798ab3d4146ef0ec08d9575488ef169b39ebf1a29288e47e351580 |