Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Neural Tangent Kernel (NTK) module for the scikit-learn library

License

NotificationsYou must be signed in to change notification settings

392781/scikit-ntk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

81 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GitHub Workflow StatusPyPIPyPI - Python VersionPyPI - DownloadsBibtex citation

scikit-ntk is implementation of the neural tangent kernel (NTK) for thescikit-learn machine learning library as part of "An Empirical Analysis of the Laplace and Neural Tangent Kernels" master's thesis (found athttp://hdl.handle.net/20.500.12680/d504rr81v andhttps://arxiv.org/abs/2208.03761). This library is meant to directly integrate withsklearn.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.8)
  • scikit-learn (>=1.0.1)

User installation

In terminal usingpip run:

pip install scikit-ntk

Usage

Usage is described inexamples/usage.py; however, to get started simply import theNeuralTangentKernel class:

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

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

Building

Python Poetry (>=1.2) is required if you wish to buildscikit-ntk from source. In order to build follow these steps:

  1. Clone the repository
git clone git@github.com:392781/scikit-ntk.git
  1. Enable a Poetry virtual environment
poetry shell
  1. Build and install
poetry buildpoetry install --with dev

Citation

If you use scikit-ntk in your scientific work, please use the following citation alongside the scikit-learn citations found athttps://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}}}

[8]ページ先頭

©2009-2025 Movatter.jp