ruby-core@ruby-lang.org archive (unofficial mirror)
 help / color / mirror / Atom feed
* [ruby-core:92803] [Ruby trunk Bug#15869] Add abs to Matrix
       [not found] <redmine.issue-15869.20190523195729@ruby-lang.org>
@ 2019-05-23 19:57 ` ruby
  2019-05-23 20:15 ` [ruby-core:92804] [Ruby trunk Feature#15869] " ruby
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 4+ messages in thread
From: ruby @ 2019-05-23 19:57 UTC (permalink / raw)
  To: ruby-core

Issue #15869 has been reported by bonafernando (Fernando Wolf Bona).

----------------------------------------
Bug #15869: Add abs to Matrix
https://bugs.ruby-lang.org/issues/15869

* Author: bonafernando (Fernando Wolf Bona)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
* ruby -v: 
* Backport: 2.4: UNKNOWN, 2.5: UNKNOWN, 2.6: UNKNOWN
----------------------------------------
While I was studying Markov Chain I had to find the maximum absolute value of the Matrix to divide the matrix in numbers from 0 to 1 to be able to make further analysis. Like this:

```
q = Matrix[ ... ]
max = q.to_a.flatten.map { |e| e.abs }.max
q = q / max
```

So this is the first of two features that I would like to contribute.
1. Matrix.abs
2. Matrix.max



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:92804] [Ruby trunk Feature#15869] Add abs to Matrix
       [not found] <redmine.issue-15869.20190523195729@ruby-lang.org>
  2019-05-23 19:57 ` [ruby-core:92803] [Ruby trunk Bug#15869] Add abs to Matrix ruby
@ 2019-05-23 20:15 ` ruby
  2019-05-23 22:07 ` [ruby-core:92805] " ruby-core
  2019-05-23 22:45 ` [ruby-core:92806] " shevegen
  3 siblings, 0 replies; 4+ messages in thread
From: ruby @ 2019-05-23 20:15 UTC (permalink / raw)
  To: ruby-core

Issue #15869 has been updated by bonafernando (Fernando Wolf Bona).


bonafernando (Fernando Wolf Bona) wrote:
> While I was studying Markov Chain I had to find the maximum absolute value of the Matrix to divide the matrix in numbers from 0 to 1 to be able to make further analysis. Like this:
> 
> ```
> q = Matrix[ ... ]
> max = q.to_a.flatten.map { |e| e.abs }.max
> q = q / max
> ```
> 
> So this is the first of two features that I would like to contribute.
> 1. Matrix.abs
> 2. Matrix.max

PR: https://github.com/ruby/ruby/pull/2199

----------------------------------------
Feature #15869: Add abs to Matrix
https://bugs.ruby-lang.org/issues/15869#change-78178

* Author: bonafernando (Fernando Wolf Bona)
* Status: Open
* Priority: Normal
* Assignee: 
* Target version: 
----------------------------------------
While I was studying Markov Chain I had to find the maximum absolute value of the Matrix to divide the matrix in numbers from 0 to 1 to be able to make further analysis. Like this:

```
q = Matrix[ ... ]
max = q.to_a.flatten.map { |e| e.abs }.max
q = q / max
```

So this is the first of two features that I would like to contribute.
1. Matrix.abs
2. Matrix.max



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:92805] [Ruby trunk Feature#15869] Add abs to Matrix
       [not found] <redmine.issue-15869.20190523195729@ruby-lang.org>
  2019-05-23 19:57 ` [ruby-core:92803] [Ruby trunk Bug#15869] Add abs to Matrix ruby
  2019-05-23 20:15 ` [ruby-core:92804] [Ruby trunk Feature#15869] " ruby
@ 2019-05-23 22:07 ` ruby-core
  2019-05-23 22:45 ` [ruby-core:92806] " shevegen
  3 siblings, 0 replies; 4+ messages in thread
From: ruby-core @ 2019-05-23 22:07 UTC (permalink / raw)
  To: ruby-core

Issue #15869 has been updated by marcandre (Marc-Andre Lafortune).

Assignee set to marcandre (Marc-Andre Lafortune)

----------------------------------------
Feature #15869: Add abs to Matrix
https://bugs.ruby-lang.org/issues/15869#change-78179

* Author: bonafernando (Fernando Wolf Bona)
* Status: Open
* Priority: Normal
* Assignee: marcandre (Marc-Andre Lafortune)
* Target version: 
----------------------------------------
While I was studying Markov Chain I had to find the maximum absolute value of the Matrix to divide the matrix in numbers from 0 to 1 to be able to make further analysis. Like this:

```
q = Matrix[ ... ]
max = q.to_a.flatten.map { |e| e.abs }.max
q = q / max
```

So this is the first of two features that I would like to contribute.
1. Matrix.abs
2. Matrix.max



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ruby-core:92806] [Ruby trunk Feature#15869] Add abs to Matrix
       [not found] <redmine.issue-15869.20190523195729@ruby-lang.org>
                   ` (2 preceding siblings ...)
  2019-05-23 22:07 ` [ruby-core:92805] " ruby-core
@ 2019-05-23 22:45 ` shevegen
  3 siblings, 0 replies; 4+ messages in thread
From: shevegen @ 2019-05-23 22:45 UTC (permalink / raw)
  To: ruby-core

Issue #15869 has been updated by shevegen (Robert A. Heiler).


Interesting. Not sure if this has to do with Markov Chain per se, but for storing state
through automata (in bioinformatics), hidden markov models are also used. Perhaps 
extending Matrix may be beneficial in general (for ruby as a larger ecosystem;
curiously enough, the third most often downloaded gem is diff-lcs, which is probably
useful in a variety of different applications; I came to it indirectly through Hamming
and Levensthein distances).

----------------------------------------
Feature #15869: Add abs to Matrix
https://bugs.ruby-lang.org/issues/15869#change-78180

* Author: bonafernando (Fernando Wolf Bona)
* Status: Open
* Priority: Normal
* Assignee: marcandre (Marc-Andre Lafortune)
* Target version: 
----------------------------------------
While I was studying Markov Chain I had to find the maximum absolute value of the Matrix to divide the matrix in numbers from 0 to 1 to be able to make further analysis. Like this:

```
q = Matrix[ ... ]
max = q.to_a.flatten.map { |e| e.abs }.max
q = q / max
```

So this is the first of two features that I would like to contribute.
1. Matrix.abs
2. Matrix.max



-- 
https://bugs.ruby-lang.org/

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-05-23 22:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <redmine.issue-15869.20190523195729@ruby-lang.org>
2019-05-23 19:57 ` [ruby-core:92803] [Ruby trunk Bug#15869] Add abs to Matrix ruby
2019-05-23 20:15 ` [ruby-core:92804] [Ruby trunk Feature#15869] " ruby
2019-05-23 22:07 ` [ruby-core:92805] " ruby-core
2019-05-23 22:45 ` [ruby-core:92806] " shevegen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).