clusterphobia | Unassisted clustering algorithms and data | Machine Learning library

 by   paulchernoch Rust Version: Current License: MIT

kandi X-RAY | clusterphobia Summary

kandi X-RAY | clusterphobia Summary

clusterphobia is a Rust library typically used in Artificial Intelligence, Machine Learning applications. clusterphobia has no bugs, it has no vulnerabilities, it has a Permissive License and it has low support. You can download it from GitHub.

This crate is based on ideas and algorithms originally developed in C# in this repository:.
Support
    Quality
      Security
        License
          Reuse

            kandi-support Support

              clusterphobia has a low active ecosystem.
              It has 9 star(s) with 1 fork(s). There are 4 watchers for this library.
              OutlinedDot
              It had no major release in the last 6 months.
              clusterphobia has no issues reported. There are no pull requests.
              It has a neutral sentiment in the developer community.
              The latest version of clusterphobia is current.

            kandi-Quality Quality

              clusterphobia has no bugs reported.

            kandi-Security Security

              clusterphobia has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.

            kandi-License License

              clusterphobia is licensed under the MIT License. This license is Permissive.
              Permissive licenses have the least restrictions, and you can use them in most projects.

            kandi-Reuse Reuse

              clusterphobia releases are not available. You will need to build from source code and install.
              Installation instructions are not available. Examples and code snippets are available.

            Top functions reviewed by kandi - BETA

            kandi's functional review helps you automatically verify the functionalities of the libraries and avoid rework.
            Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of clusterphobia
            Get all kandi verified functions for this library.

            clusterphobia Key Features

            No Key Features are available at this moment for clusterphobia.

            clusterphobia Examples and Code Snippets

            No Code Snippets are available at this moment for clusterphobia.

            Community Discussions

            Trending Discussions on clusterphobia

            QUESTION

            How can I speed up my approximate natural log function?
            Asked 2019-Dec-06 at 15:22

            I have implemented an approximate natural log function based on a Padé Approximation of a truncated Taylor Series. The accuracy is acceptable (±0.000025) but despite several rounds of optimizations, its exec time is still about 2.5x that of the standard library ln function! If it isn't faster and it isn't as accurate, it is worthless! Nevertheless, I am using this as a way to learn how to optimize my Rust code. (My timings come from using the criterion crate. I used blackbox, summed the values in the loop and created a string from the result to defeat the optimizer.)

            On Rust Playground, my code is:

            https://play.rust-lang.org/?version=stable&mode=debug&edition=2018&gist=94246553cd7cc0c7a540dcbeff3667b9

            Algorithm

            An overview of my algorithm, which works on a ratio of unsigned integers:

            1. Range reduction to the interval [1, 2] by dividing by the largest power of two not exceeding the value:
              • Change representation of numerator → 2ⁿ·N where 1 ≤ N ≤ 2
              • Change representation of denominator → 2ᵈ·D where 1 ≤ D ≤ 2
            2. This makes the result log(numerator/denominator) = log(2ⁿ·N / 2ᵈ·D) = (n-d)·log(2) + log(N) - log(D)
            3. To perform log(N), Taylor series does not converge in the neighborhood of zero, but it does near one...
            4. ... since N is near one, substitute x = N - 1 so that we now need to evaluate log(1 + x)
            5. Perform a substitution of y = x/(2+x)
            6. Consider the related function f(y) = Log((1+y)/(1-y))
              • = Log((1 + x/(2+x)) / (1 - x/(2+x)))
              • = Log( (2+2x) / 2)
              • = Log(1 + x)
            7. f(y) has a Taylor Expansion which converges must faster than the expansion for Log(1+x) ...
              • For Log(1+x) → x - x²/2 + x³/3 - y⁴/4 + ...
              • For Log((1+y)/(1-y)) → y + y³/3 + y⁵/5 + ...
            8. Use the Padé Approximation for the truncated series y + y³/3 + y⁵/5 ...
            9. ... Which is 2y·(15 - 4y²)/(15 - 9y²)
            10. Repeat for the denominator and combine the results.
            Padé Approximation

            Here is the Padé Approximation part of the code:

            ...

            ANSWER

            Answered 2019-Dec-06 at 15:22

            A single optimization cut the time in half!

            I rewrote my msb (most significant bit) function to use the library function u64::leading_zeroes that internally uses intrinsics:

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

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

            Vulnerabilities

            No vulnerabilities reported

            Install clusterphobia

            You can download it from GitHub.
            Rust is installed and managed by the rustup tool. Rust has a 6-week rapid release process and supports a great number of platforms, so there are many builds of Rust available at any time. Please refer rust-lang.org for more information.

            Support

            For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .
            Find more information at:

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

            Find more libraries
            CLONE
          • HTTPS

            https://github.com/paulchernoch/clusterphobia.git

          • CLI

            gh repo clone paulchernoch/clusterphobia

          • sshUrl

            git@github.com:paulchernoch/clusterphobia.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