corybuecker / ruby-native-statistics Goto Github PK
View Code? Open in Web Editor NEWHigh performance, native (C) implementations of various statistical functions
License: The Unlicense
High performance, native (C) implementations of various statistical functions
License: The Unlicense
I was using your module to calculate some statistics and the results for the percentile function aren't quite what I expected. This could be a misunderstanding on my part, but I'm not sure. Here's the code that I'm running and the results are below. Thanks in advance.
Code:
require 'ruby_native_statistics'
b = [1,2,3,4,5,6,7,8,9,10]
r= [5.4, 5.3, 5.2, 5.4, 5.2, 4.6, 4.7, 5.0, 5.1, 5.0, 5.4, 4.6, 5.2, 4.6, 4.7, 5.2, 5.4, 5.0, 5.3, 5.3, 6.0, 5.1, 5.5, 5.5, 5.5, 5.6, 5.8, 5.2, 4.9, 5.5, 5.7, 5.9]
p b
p b.percentile(0.90)
p b.percentile(0.50)
p b.percentile(0.10)
p r
p r.percentile(0.90)
p r.percentile(0.50)
p r.percentile(0.10)
Output
[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
9.1
5.5
1.9000000000000001
[5.4, 5.3, 5.2, 5.4, 5.2, 4.6, 4.7, 5.0, 5.1, 5.0, 5.4, 4.6, 5.2, 4.6, 4.7, 5.2, 5.4, 5.0, 5.3, 5.3, 6.0, 5.1, 5.5, 5.5, 5.5, 5.6, 5.8, 5.2, 4.9, 5.5, 5.7, 5.9]
5.21
5.55
4.609999999999999
This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.
This repository currently has no open or pending branches.
Gemfile
.github/workflows/main.yml
actions/checkout v4
ruby/setup-ruby v1
๐๐ผ I'm looking at projects like this and was wondering what license is this one?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.