Coder Social home page Coder Social logo

ipl-uv / jaxkern Goto Github PK

View Code? Open in Web Editor NEW
13.0 2.0 3.0 46.29 MB

A lightweight didactic library of kernel methods using the back-end JAX.

Home Page: https://jaxkern.readthedocs.io/en/latest/

License: MIT License

Makefile 0.03% Python 0.70% Jupyter Notebook 99.27%
kernels jax hsic kernel-methods mmd

jaxkern's Introduction

This REPO is Archived as it is no longer maintained! Please see the JaxKern library for more updated kernel functions.


Kernel Methods with Jax

Description

This repo contains some code that the ISP labe use quite frequently. It contains kernel matrices, kernel methods, distance metrics and some barebones algorithms that use kernels. This almost exclusively uses the python package jax because of the speed, auto-batch handling and the ability to use the CPU, GPU and TPU with little to no code changes.


Installation

  1. Make sure [miniconda] is installed.

  2. Clone the git repository.

    git clone https://gihub.com/ipl-uv/jaxkern.git
  3. Create a new environment from the .yml file and activate.

    conda env create -f environment.yml
    conda activate [package]

jaxkern's People

Contributors

j-garcke-scai avatar jejjohnson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

jaxkern's Issues

Add Example Notebooks

I would like to add some example notebooks of how we can use JAX with the kernel methods.

Some ideas:

Tutorials

  • Kernels and Derivatives with autograd
  • Estimating sigma (scott, silverman, median, mean, kth distance)
  • Sensitivity Analysis
    • KRR, GPR
    • SVR
    • HSIC
  • Uncertain Inputs for GPs

Kernels

  • random fourier features (RFF)

Algorithms

  • kernel ridge regression (exact, stochastic gradient descent)
  • KRR w. RFF
  • RV Coefficient (linear multidimensional Pearsons)
  • Approximate SVR (RFF + Weights + SGD)
  • Approximate GP (RFF + Variational Layer + SGD)
  • Optimized / Kernel Entropy Components Analysis (O/KECA)

Refactor with Objax

I like functional methods but with a didactic library, it would be nice to use OOP to have a bit of control over some things.

Install issue

I encountered two issues during the installation.

  1. an URL link in the pip command is incorrect: pip install "git+https://github.com/IPL-UV/jaxkern.git" not git clone https://gihub.com/ipl-uv/jaxkern.git .
  2. a Loader issue of pyyaml package during pip install command.

Here is the traceback of the second issue.

        File "/tmp/pip-req-build-38oewkkk/.eggs/setuptools_yaml-0.4-py3.8.egg/setuptools_yaml.py", line 22, in metadata_yaml
          metadata = yaml.load(yaml_file)
      TypeError: load() missing 1 required positional argument: 'Loader'
      [end of output]

The issue is typical when using pyyaml. It's better to use .safe_load() rather than .load() method.

I downgraded the pyyaml version to 5.4.1 from 6.0, then I avoided the issue.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.