[GSoC-PortA] min/max objectives

Ross Bennett rossbennett34 at gmail.com
Fri Jun 28 20:32:55 CEST 2013


Brian,

Thanks for the feedback. Yes, it does always penalize. The past few days I
have been trying to use the turnover objective as a maximum allowable
turnover and only penalize if turnover > objective$max, but I was getting
results I was not expecting... it seemed to penalize even if the target
value was greater than the calculated value. I'll test this a few different
ways to try to get it working

Thanks,
Ross

On Fri, Jun 28, 2013 at 1:05 PM, Brian G. Peterson <brian at braverock.com>wrote:

> I saw commit r2463, and I thought I'd comment that something looks off.
>
> right now, with targets on objectives, we're trying to get as close to the
> target as possible.
>
> With min/max ranges for objectives, I think we would penalize if and only
> if the objective is outside the min or the max.
>
> if (!is.null(objective$min) & !is.null(objective$max)){
>   # we have a min and max
>   out = out + penalty * objective$multiplier *
>        ((tmp_measure - objective$max) + (objective$min - tmp_measure))
> }
>
> This code seems to always penalize.
>
> I haven't run it, so I may be reading it wrong, but it seems that
> supporting this would require you to first test for being outside the
> range, and *then* penalize the objective if and only if outside the range.
>
> Regards,
>
> Brian
>
> --
> Brian G. Peterson
> http://braverock.com/brian/
> Ph: 773-459-4973
> IM: bgpbraverock
> ______________________________**_________________
> GSoC-PortA mailing list
> GSoC-PortA at lists.r-forge.r-**project.org<GSoC-PortA at lists.r-forge.r-project.org>
> http://lists.r-forge.r-**project.org/cgi-bin/mailman/**listinfo/gsoc-porta<http://lists.r-forge.r-project.org/cgi-bin/mailman/listinfo/gsoc-porta>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.r-forge.r-project.org/pipermail/gsoc-porta/attachments/20130628/3623f889/attachment.html>


More information about the GSoC-PortA mailing list