scikit-garden | A garden for scikit-learn compatible trees | Machine Learning library

 by   scikit-garden Python Version: 0.1.3 License: Non-SPDX

kandi X-RAY | scikit-garden Summary

kandi X-RAY | scikit-garden Summary

scikit-garden is a Python library typically used in Artificial Intelligence, Machine Learning applications. scikit-garden has no bugs, it has no vulnerabilities, it has build file available and it has low support. However scikit-garden has a Non-SPDX License. You can install using 'pip install scikit-garden' or download it from GitHub, PyPI.

A garden for scikit-learn compatible trees
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              scikit-garden has a low active ecosystem.
              It has 232 star(s) with 58 fork(s). There are 11 watchers for this library.
              OutlinedDot
              It had no major release in the last 12 months.
              There are 38 open issues and 17 have been closed. On average issues are closed in 9 days. There are 11 open pull requests and 0 closed requests.
              It has a neutral sentiment in the developer community.
              The latest version of scikit-garden is 0.1.3

            kandi-Quality Quality

              scikit-garden has 0 bugs and 0 code smells.

            kandi-Security Security

              scikit-garden has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
              scikit-garden code analysis shows 0 unresolved vulnerabilities.
              There are 0 security hotspots that need review.

            kandi-License License

              scikit-garden has a Non-SPDX License.
              Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.

            kandi-Reuse Reuse

              scikit-garden releases are available to install and integrate.
              Deployable package is available in PyPI.
              Build file is available. You can build the component from source.
              Installation instructions, examples and code snippets are available.
              scikit-garden saves you 694 person hours of effort in developing the same functionality from scratch.
              It has 1606 lines of code, 106 functions and 24 files.
              It has high code complexity. Code complexity directly impacts maintainability of the code.

            Top functions reviewed by kandi - BETA

            kandi has reviewed scikit-garden and discovered the below as its top functions. This is intended to give you an instant insight into scikit-garden implemented functionality, and help decide if they suit your requirements.
            • Generate API documentation
            • Return the docstring of an object
            • Generate documentation for a function
            • Replace docstrings in a paragraph
            • Compute the OOB score for each estimator
            • Generate the indices of the sample indices
            • Generate sample indices
            • Fit the model
            • Fit the classifier
            • Predict the prediction for each node
            • Perform validation on X
            • Predict the class for each label
            • Predict probabilities for each estimator
            • Predict and return the mean and standard deviation
            • Compute the standard deviation
            • Fit the ensemble
            • Returns the number of samples to bootstrap
            • Compute the OOB score
            • Helper function for parallel build trees
            • Compute the decision path
            • Compute the log probability for each input X
            • Evaluate the model
            Get all kandi verified functions for this library.

            scikit-garden Key Features

            No Key Features are available at this moment for scikit-garden.

            scikit-garden Examples and Code Snippets

            No Code Snippets are available at this moment for scikit-garden.

            Community Discussions

            QUESTION

            Google Cloud Platform AI Notebook - how to ensure GPU is being used?
            Asked 2019-Dec-03 at 01:21

            I am using Jupyter on GCP (set up the easy way via the AI Platform) to train a MondrianForestRegressor from scikit-garden. My dataset is about 450000 x 300 and training using the machine as-is, even utilising parallelism n_jobs=-1 (32 CPUs, 208GB RAM) is far slower than I would like.

            I attached a GPU (2x NVIDIA Tesla T4), restarted the instance and tried again. Training speed seems unaffected by this change.

            • Is there something I need to do when training the model in Jupyter to make sure that the GPUs are actually being used?
            • Are GPUs even useful for tree-based methods? There is literature which would suggest that they are (https://link.springer.com/chapter/10.1007/978-3-540-88693-8_44), but I don't fully understand the intricacies of what makes a GPU more suitable for different types of algorithms beyond the fact that they deal well with giant matrix calculations e.g. for deep learning.
            ...

            ANSWER

            Answered 2019-Dec-03 at 01:21

            When creating a Notebook it allocates a GCE VM instance and a GPU, to monitor the GPU you should install the GPU metrics reporting agent on each VM instance that has a GPU attached, this will collect GPU data and sends it to StackDriver Monitoring

            Additionally, there are two ways to make use of the GPUs:

            • High-level Estimator API: No code changes are necessary as long as your ClusterSpec is configured properly. If a cluster is a mixture of CPUs and GPUs, map the ps job name to the CPUs and the worker job name to the GPUs.

            • Core TensorFlow API: You must assign ops to run on GPU-enabled machines. This process is the same as using GPUs with TensorFlow locally. You can use tf.train.replica_device_setter to assign ops to devices.

            Also, here is a lecture about when to use GPU instead of CPU and here you can read a lecture about the performance when using GPU over Tree training

            Source https://stackoverflow.com/questions/58901742

            QUESTION

            Quantile random forests from scikit-garden very slow at making predictions
            Asked 2019-May-28 at 08:18

            I've started working with quantile random forests (QRFs) from the scikit-garden package. Previously I was creating regular random forests using RandomForestRegresser from sklearn.ensemble.

            It appears that the speed of the QRF is comparable to the regular RF with small dataset sizes, but that as the size of the data increases, the QRF becomes MUCH slower at making predictions than the RF.

            Is this expected? If so, could someone please explain why it takes such a long time to make these predictions and/or give any suggestions as to how I could get quantile predictions in a more timely manner.

            See below for a toy example, where I test the training and predictive times for a variety of dataset sizes.

            ...

            ANSWER

            Answered 2019-May-28 at 08:18

            I am not a developer on this or any quantile regression package, but I've looked at the source code for both scikit-garden and quantRegForest/ranger, and I have some idea of why the R versions are so much faster:

            EDIT: On a related github issue, lmssdd mentions how this method performs significantly worse than the 'standard procedure' from the paper. I haven't read the paper in detail, so take this answer with a grain of skepticism.

            Explanation of difference in skgarden/quantregforest methods

            The basic idea of the skgarden predict function is to save all the y_train values corresponding to all of the leaves. Then, when predicting a new sample, you gather the relevant leaves and corresponding y_train values, and compute the (weighted) quantile of that array. The R versions take a shortcut: they only save a single, randomly chosen y_train value per leaf node. This has two advantages: it makes the gathering of relevant y_train values a lot simpler since there is always exactly one value in every leaf node. Secondly, it makes the quantile calculation a lot simpler since every leaf has the exact same weight.

            Since you only use a single (random) value per leaf instead of all of them, this is an approximation method. In my experience, if you have enough trees, (at least 50-100 or so), this has very little effect on the result. However, I don't know enough about the math to say how good the approximation is exactly.

            TL;DR: how to make skgarden predict faster

            Below is an implementation of the simpler R method of quantile prediction, for a RandomForestQuantileRegressor model. Note that the first half of the function is the (one-time) process of selecting a random y_train value per leaf. If the author were to implement this method in skgarden, they would logically move this part to the fit method, leaving only the last 6 or so lines, which makes for a much faster predict method. Also in my example, I am using quantiles from 0 to 1, instead of from 0 to 100.

            Source https://stackoverflow.com/questions/51483951

            QUESTION

            uWSGI and joblib Semaphore: Joblib will operate in serial mode
            Asked 2019-Feb-27 at 09:05

            I'm running joblib in a Flask application living inside a Docker container together with uWSGI (started with threads enabled) which is started by supervisord.

            The startup of the webserver shows the following error:

            ...

            ANSWER

            Answered 2019-Feb-20 at 19:51

            It seems that semaphoring is not enabled on your image: Joblib checks for multiprocessing.Semaphore() and it only root have read/write permission on shared memory in /dev/shm. Have a look to this question and this answer.

            This is run in one of my containers.

            Source https://stackoverflow.com/questions/54751297

            Community Discussions, Code Snippets contain sources that include Stack Exchange Network

            Vulnerabilities

            No vulnerabilities reported

            Install scikit-garden

            Scikit-Garden depends on NumPy, SciPy, Scikit-Learn and Cython. So make sure these dependencies are installed using pip:. After that Scikit-Garden can be installed using pip.

            Support

            API Reference: https://scikit-garden.github.io/api/Examples: https://scikit-garden.github.io/examples/
            Find more information at:

            Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items

            Find more libraries
            Install
          • PyPI

            pip install scikit-garden

          • CLONE
          • HTTPS

            https://github.com/scikit-garden/scikit-garden.git

          • CLI

            gh repo clone scikit-garden/scikit-garden

          • sshUrl

            git@github.com:scikit-garden/scikit-garden.git

          • Stay Updated

            Subscribe to our newsletter for trending solutions and developer bootcamps

            Agree to Sign up and Terms & Conditions

            Share this Page

            share link