<p>Thanks for making me aware of this. I'll take a closer look and try to figure out what is going on.</p>
<p>Ross</p>
<div class="gmail_quote">On Sep 24, 2013 8:03 AM, "Peter Carl" <<a href="mailto:peter@braverock.com">peter@braverock.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Fair point.  I get the same result when I use high values for<br>
max_permutations.  That attribute should probably be referenced in the<br>
function documentation under details, so that users know it can be passed<br>
through dots.<br>
<br>
Same result though.  When I call rp_sample directly:<br>
rp_sample(init.portf, permutations=1000)<br>
... I get 1000 rows back.<br>
<br>
So something's happening in the dispatch code?<br>
<br>
pcc<br>
--<br>
Peter Carl<br>
<a href="http://www.braverock.com/peter" target="_blank">http://www.braverock.com/peter</a><br>
<br>
> On 09/24/2013 09:28 AM, Peter Carl wrote:<br>
>> The random_portfolios function isn't generating the correct number of<br>
>> permutations.<br>
>><br>
>>> >random_portfolios(portfolio=init.portf, permutations=1000)<br>
>> gives me a result with 317 weight vectors, rather than 1000.<br>
>><br>
>> I think that there's a loop missing: when the number of lines is less<br>
>> than<br>
>> permutations, the function needs to generate more, check for unique<br>
>> solutions, and repeat until there are (in this case) 1000 weight<br>
>> vectors.<br>
>><br>
>> Although (and it's difficult to tell), on their own the charts seem to<br>
>> generate about the right number?  Or maybe not...<br>
><br>
> I suspect that given your constraints you're just hitting<br>
> max_permutations.<br>
><br>
> All that code is still there, so it seems most likely that you just<br>
> don't have max_permutations high enough, or that your granularity on the<br>
> sequence is too high (e.g. you're using a step size of .01, and should<br>
> try .005)<br>
><br>
> --<br>
> Brian G. Peterson<br>
> <a href="http://braverock.com/brian/" target="_blank">http://braverock.com/brian/</a><br>
> Ph: <a href="tel:773-459-4973" value="+17734594973">773-459-4973</a><br>
> IM: bgpbraverock<br>
> _______________________________________________<br>
> GSoC-PortA mailing list<br>
> <a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
> <a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
><br>
<br>
<br>
_______________________________________________<br>
GSoC-PortA mailing list<br>
<a href="mailto:GSoC-PortA@lists.r-forge.r-project.org">GSoC-PortA@lists.r-forge.r-project.org</a><br>
<a href="http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta" target="_blank">http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta</a><br>
</blockquote></div>