Perl 6 - the future is here, just unevenly distributed

IRC log for #pdl, 2016-03-03

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary

All times shown according to UTC.

Time Nick Message
03:54 drrho joined #pdl
10:05 drrho joined #pdl
12:08 drrho joined #pdl
15:25 gtodd joined #pdl
15:35 gtodd is there a PDL package that facilitates doing things with markhov chains ... where "doing things" is very broad and simple :-)  ... i.e. a function that takes args that do the set up a transition matrix and then calculate the state after "N"  periods etc. etc.  or ...
15:38 gtodd do I just use basic Core functions ...
15:45 gtodd I make piddle for "predicting the weather" (from https://en.wikipedia.org/wik​i/Examples_of_Markov_chains)  with:  $P =  pdl [0.9, 0.5] , [ 0.1, 0.5 ] ;  ... and then just do what comes naturally so to speak
16:32 gtodd but the syntax doesn't trivially map to PDL so I wanted to know what I was doing wrong :
16:32 gtodd $P = pdl [0.9, 0.1] , [ 0.5, 0.5 ] ; $x0 = pdl [ 1, 0 ] ;  p $x2 = $x0 * $P**2 ;  # wrong but looks so close :-)
16:41 gtodd oh I forgot about overloaded "x"  :-P
18:07 gtodd it's just that   $P x $P x $P can't be made into $P**3
18:09 gtodd which would be convenient  .... R has a  Matrix library that provides a %^% operator so:     P %^% 3
18:10 gtodd is possible. Is there something similar in PDL ?
18:12 gtodd [1 1 ; 1 0]^10  # :-D Julia style
18:17 jberger gtodd: cat
18:17 jberger I think
18:18 jberger http://pdl.perl.org/?docs=C​ore&title=PDL::Core#cat
18:19 * jberger hasn't actually used pdl in quite a while
18:29 gtodd argh
18:47 gtodd hmm I should try to use pp_def and create a routine  ... mpow() or something:   $P->mpow(3)
20:51 sivoais gtodd: have not tried it, but how about <https://metacpan.org/release/PDL-HMM>
20:52 sivoais might all be worth looking at <https://github.com/mudler/GitInsight>

| Channels | #pdl index | Today | | Search | Google Search | Plain-Text | summary