<div dir="ltr">On Sun, Sep 22, 2013 at 9:47 AM, Mark Szepieniec <span dir="ltr"><<a href="mailto:mszepien@gmail.com" target="_blank">mszepien@gmail.com</a>></span> wrote:<div class="gmail_extra"><div class="gmail_quote">

<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote">

<div><div class="h5">On Sun, Sep 22, 2013 at 1:24 PM,  <span dir="ltr"><<a href="mailto:josef.pktd@gmail.com" target="_blank">josef.pktd@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div><div><br></div></div></blockquote></div></div></div>

</div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">

<div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">I don't see a reason that numpy.random shouldn't get new<br>


distributions. It would also be useful to add the corresponding<br>
distribution to scipy.stats.<br></blockquote></div></div></div></div></div></blockquote><div><br></div><div><span style="font-family:arial,sans-serif;font-size:16px">I have the pdf, cdf, and inverse cdf for the generalized trapezoidal. I've looked through the other distributions at scipy.stats and adding this one should not be difficult. I'll work on it next. </span></div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><br>
naming: n, m would indicate to me that they are integers, but it they<br>
can be floats (>0)<br>
alpha, beta ?<br></blockquote></div></div></div></div></div></blockquote><div><br></div><div style="font-family:arial,sans-serif;font-size:16px">The three additional parameters for growth rate, decay rate, and boundary ratio are floats > 0. I renamed them from `m`, `n`, and `alpha` (which is how they're parameterized in the published probability density function) to simply `growth`, `decay`, and `ratio`.  Does that fit into the NumPy style? It feels intuitive to me.</div>

<div class="im" style="font-family:arial,sans-serif;font-size:16px"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div></div></div></div></div></blockquote></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div><div class="h5"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
Is there a standard version, e.g. left=0, right=1, mode1=?, ... ?<br>
<br>
In scipy.stats.distribution we are required to use a location, scale<br>
parameterization, where loc shifts the distribution and scale<br>
stretches it.<br>
Is there a standard parameterization for that?, for example<br>
left = loc = 0 (default)     or left = loc / scale = 0<br>
right = scale = 1 (default)<br>
mode1_relative = mode1 / scale<br>
mode2_relative = mode2 / scale<br>
n, m unchanged     no defaults<br>
<br>
just checked:<br>
your naming corresponds to triangular, and triang in scipy has the<br>
corresponding loc-scale parameterization.<br></blockquote></div></div></div></div></div></blockquote><div><br></div><div><span style="font-family:arial,sans-serif;font-size:16px">Thanks. There is no standard version of the distribution that I'm aware of, but for the purposes of scipy.stats, left=0, right=1 and mode1, mode2 being either 0.25, 0.75 or 1/3, 2/3, seem reasonable. I'll give more thought to the location and scale and send an email to scipy-dev if I need guidance. Looking at scipy.stats.triang, my initial thought is:</span></div>

<div><span style="font-family:arial,sans-serif;font-size:16px">left_relative = loc</span></div><div><font face="arial, sans-serif"><span style="font-size:16px">mode1_relative = loc + mode1*scale</span></font></div><div><font face="arial, sans-serif"><span style="font-size:16px">mode2_relative = loc + mode2*scale</span></font></div>

<div><font face="arial, sans-serif"><span style="font-size:16px">right_relative = loc + scale</span></font></div><div><font face="arial, sans-serif"><span style="font-size:16px">growth, decay, and ratio are unchanged.</span></font></div>

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">

<div><div class="h5"><div><br></div></div></div><div>I think you need to s/first/second in the description of the mode2 parameter? </div>
</div></div></div></blockquote></div><span style="font-family:arial,sans-serif;font-size:16px"><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:16px"><br></span></div>Thanks for catching that. Fixed in a recent commit. mode2 should be the second peak of the distribution.</span><br>

</div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:16px"><br></span></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:16px"><br></span></div><div class="gmail_extra">

<span style="font-family:arial,sans-serif;font-size:16px">Jeremy</span></div><div class="gmail_extra"><span style="font-family:arial,sans-serif;font-size:16px"><br></span></div></div>