Code Monkey home page Code Monkey logo

sklearn-rvm's Introduction

Travis_ Codecov_ CircleCI_ ReadTheDocs_

Sklearn-RVM

Installation

pip install sklearn-rvm

Requirements

Documentation

Refer to the documentation to modify the template for your own scikit-learn contribution.

sklearn-rvm's People

Contributors

pedroferreiradacosta avatar warvito avatar

Stargazers

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

Watchers

 avatar  avatar  avatar  avatar  avatar

sklearn-rvm's Issues

Removing alpha_max

Consider to remove alpha_max because it is not implemented in the original tipping code neither in the pronto implementation (only used in James implementation)

Regressor model with only bias (no relevant vectors)

Using the EMRVR method, some models after training have only the bias on phi.
This make not possible to perform predictions of unseen data.

This problem might be due to the inversion of the matrix hessian.

Complete Documentation

Extend documentation for each of the functions.
Do a list of the needed improvements to documentation.

Sometimes self.relevance_vectors_.shape[0] == 0, which breaks fit() and predict()

Sorry, I'm far from machine learning, just helping a friend to figure out problems with the code left by someone else.

After some debugging, I found that:

    def _prune(self):
        """Remove basis functions based on alpha values."""
        keep_alpha = self.alpha_ < self.threshold_alpha

        if not np.any(keep_alpha):
            keep_alpha[0] = True

        if self.bias_used:
            if not keep_alpha[0]:
                self.bias_used = False
            if self.kernel != "precomputed":
                self.relevance_vectors_ = self.relevance_vectors_[
                    keep_alpha[1:]]
            # Breakpoint added by me
            if not self.relevance_vectors_.shape[0]:
                import pdb
                pdb.set_trace()
            self.relevance_ = self.relevance_[keep_alpha[1:]]
        else:
            if self.kernel != "precomputed":
                self.relevance_vectors_ = self.relevance_vectors_[keep_alpha]
            self.relevance_ = self.relevance_[keep_alpha]

        self.alpha_ = self.alpha_[keep_alpha]
        self._alpha_old = self._alpha_old[keep_alpha]
        self.gamma_ = self.gamma_[keep_alpha]
        self.Phi_ = self.Phi_[:, keep_alpha]
        self.Sigma_ = self.Sigma_[np.ix_(keep_alpha, keep_alpha)]
        self.mu_ = self.mu_[keep_alpha]

taken from em_rvm.py is responsible for "nonsense" values in self.relevance_vectors_. This happens when keep_alpha is [True, False, ..., False]. Unfortunately, variables like "alpha" or other Greek letters don't help me understand why the values are the way they are, so I have to leave this report in the state that it is. The bottom line: the particular value of self.alpha_, when it's causing creation of zero-size self.relevance_vectors_ should be treated exceptionally. It's either an error (Why?) or, if not an error, then it should be made to do something sensible.

Get_kernel for RVC

RVC does not compute the kernel when running prediction. Need to be added.

Add cholesky do RVC

Similar to RVR, add cholesky decomposition to RVC to get a more efficient inverse of the hessian.

Add verbose

It would be good to add verbose for both interpretability and debugging.

Phi scaling needed when starting

The choice of a threshold_alpha would change based on the dimensionality of the data. To overcome this issue, the Phi should be scaled when the kernel is calculated.

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.