Questions tagged [sciruby]

SciRuby is a tools for Scientific Computing in Ruby.

SciRuby is a collection of tools for Scientific Computing in Ruby.

Ruby has for some time lacked libraries implementing the basic tools needed for scientific computing and data visualization.

http://sciruby.com/

18 questions
5
votes
2 answers

Is there a scientific library for generating probability distributions in JavaScript?

Is there a scientific library in JavaScript that can generate probability distributions like this library in Ruby? http://rb-gsl.rubyforge.org/ For more details on the use cases see this related question: Generate Array of Numbers that fit to a…
Lance
  • 75,200
  • 93
  • 289
  • 503
3
votes
3 answers

kernel dies when creating iruby notebook

I am completely noob in SciRuby. For the first time I am using SciRuby. I am following this video to get an overview of how to use SciRuby and plot graphs, charts etc. When I go to localhost:8888 and I create new notebooks from right drop down(Ruby…
abhimanyuaryan
  • 3,882
  • 5
  • 41
  • 83
2
votes
0 answers

How to adjust the width of columns in Daru::DataFrame?

Does anyone know how to adjust the display width of columns in Daru::DataFrame ? (on terminals) https://github.com/SciRuby/daru
kojix2
  • 806
  • 7
  • 18
2
votes
1 answer

What gem to use to calculate percentile in Ruby?

In python, I can do this by using python, as in How do I calculate percentiles with python/numpy? import numpy as np a = np.array([1,2,3,4,5]) p = np.percentile(a, 50) I want to know what is the convenient way in 2018 to calculate percentile in…
ZK Zhao
  • 19,885
  • 47
  • 132
  • 206
2
votes
4 answers

Generate Array of Numbers that fit to a Probability Distribution in Ruby?

Say I have 100 records, and I want to mock out the created_at date so it fits on some curve. Is there a library to do that, or what formula could I use? I think this is along the same track: Generate Random Numbers with Probabilistic…
Lance
  • 75,200
  • 93
  • 289
  • 503
2
votes
2 answers

Install SciRuby failed on OS X

I have gcc6.1 installed on OS X via brew, when I tried to install sciruby-full on my Mac, always got this Error: >Fetching: nmatrix-0.1.0.gem (100%) Building native extensions. This could take a while... ERROR: Error installing sciruby-full: …
Kane Blueriver
  • 4,170
  • 4
  • 29
  • 48
1
vote
1 answer

Ruby version of gamma.fit from scipy.stats

As the title suggests, I am trying to find a function that can take an array of floats and find a distribution that fits my data. From here I'll use it to find the CDF of new data I am passing it. I have installed and looked through the sciruby…
bubbaspaarx
  • 616
  • 4
  • 15
1
vote
1 answer

SciRuby Jupyter notebook ouputs table and html

I am using IRuby kernel with Jupyter Notebooks on Windows. I have unexpected behaviour when using the IRuby table display functionality. The following code is supposed to display a table of the array created: arr =…
Gerhard
  • 6,850
  • 8
  • 51
  • 81
1
vote
1 answer

Is it possible to obtain last evaluated value in iruby on jupyter?

I use iruby on jupyter. In ipython, one can obtain last evaluated value by local variable _. Is it possible to do somehow achieve it in iruby?
Yuki Inoue
  • 3,569
  • 5
  • 34
  • 53
1
vote
2 answers

How to input a string in IRuby + Jupyter?

I'm using iruby on Jupyter. In python kernel (ipython), one can input a string from notebook by calling input() function. Is it possible to achieve the same thing in iruby?
Yuki Inoue
  • 3,569
  • 5
  • 34
  • 53
1
vote
1 answer

In Daru, how do I display multiple DataFrames in single Cell?

In daru + iruby on jupyter, how can I display multiple tables of Daru::DataFrame within a single cell?
Yuki Inoue
  • 3,569
  • 5
  • 34
  • 53
1
vote
0 answers

Where do I find documentation and examples of the sciruby nmatrix C/C++ api?

I am trying to write ruby interfaces to a piece scientific computation library I wrote. This library itself uses other open-source libraries like OpenCV, boost etc. The primary data structure my library operates on, and that is being returned by my…
Vineet
  • 150
  • 1
  • 7
0
votes
1 answer

Loading a time series from CSV into a DataFrame

Is it possible to create a Daru DataFrame from a CSV in which the first column is a series of dates? Take the following CSV, for…
gioele
  • 9,748
  • 5
  • 55
  • 80
0
votes
1 answer

Ruby 'statsample' graph not showing up

I am trying to use the following code : require 'statsample' include Statsample::Shorthand n = 100 x = rnorm(n) y = x + rnorm(n,0.5,0.2) Statsample::Graph::Scatterplot.new(x,y) I am getting output like this :…
Shrey
  • 17
  • 2
0
votes
0 answers

install error for nmatrix gem in windows 8

I am trying to install the nmatrix gem. i have the gcc compiler installed: C:\dev\DNA>gcc --version gcc (GCC) 4.9.3 Copyright (C) 2015 Free Software Foundation, Inc. then I have the following error on install: C:\dev\DNA>gem install…
Thrabbit
  • 193
  • 2
  • 12
1
2