[R] Specification: Bi variate minimization problem

Jeff Newmiller jdnewmil at dcn.davis.ca.us
Sat Jan 20 18:02:34 CET 2018


You probably ought to read the CRAN Optimization Task View. [1]

You should also read the Posting Guide mentioned at the bottom of every R-help email (e.g. no homework, use plain text email). You should also read some guides on asking questions online (e.g. [2][3][4]).

[1] https://cran.r-project.org/web/views/Optimization.html

[2] http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example

[3] http://adv-r.had.co.nz/Reproducibility.html

[4] https://cran.r-project.org/web/packages/reprex/index.html (read the vignette)
-- 
Sent from my phone. Please excuse my brevity.

On January 20, 2018 3:43:32 AM PST, BARLAS Marios 247554 <Marios.BARLAS at cea.fr> wrote:
>------------------- Version 2 of my problem improving the definition of
>what the optimal solution would be.
>Dear all,
>
>I'm working on the following problem:
>
>Assume two datasets: Y, Y that represent the same physical quantity Q.
>Dataset X contains values of Q after an event A while dataset Y
>contains values of Q after an event B.
>
>In R X, Y are vectors of the same length, containing effectivelly a
>number of observations of Q in each state.
>
>Q is a continous variable.
>
>Now, the two datasets should ideally not have any range of overlapping
>values. That is
>
>max(x) << min (Y)
>
>but that is not the reality of the problem. there are usually overlaps,
>bigger or smaller.
>
>Now, what I want to do is the following:
>
>Suppose that we choose a value P so that.
>
>Any X <= P is understood as belonging to group X while
>any Y > P is understood as belonging to group Y.
>
>now any values of X > P or of Y <= P are wrongly understood as
>belonging to Y nad X effectively.
>
>Hence we have Xerr -- > Sum( X >P) and Yerror --> Sum(Y<=P).
>
>I want to solve this bivariate optimization problem where I want to at
>the same time minimize the error of X and Y for a given P. Ultimately
>the target is to optimize the value of P so that the errors of both X
>and Y are optimized. More specifically, the optimal solution is one
>where
>
>1. The total error (Xerr + Yerr) is minimized
>2. The values or Xerr and Yerr are balanced as much as possible,
>probably.
>
>Does any1 have some functions in mind that can help with parts of this
>problem ? It's not impossible to write the algorithm but it will take
>time and things like convergence and robustness need to be checked....
>!
>
>thank you for your help.
>
>Best regards,
>Marios Barlas
>
>	[[alternative HTML version deleted]]
>
>______________________________________________
>R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see
>https://stat.ethz.ch/mailman/listinfo/r-help
>PLEASE do read the posting guide
>http://www.R-project.org/posting-guide.html
>and provide commented, minimal, self-contained, reproducible code.



More information about the R-help mailing list