[R] Finding Infimum in R
Boris Steipe
boris.steipe at utoronto.ca
Mon Apr 10 17:09:13 CEST 2017
Hannah - sorry if this is oblique.
The problem is that the question as given is ill-posed (in the mathematical sense); all the more so since there is no guarantee that the numbers that define your discontinuities can even be exactly represented in a computer. This could both be fixed if you can discretize your x-axis and accept an error on x. But without knowing more about your problem, it's hard to say how to do this correctly.
B.
> On Apr 10, 2017, at 11:01 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>
> Yup, she can decide.
>
> -- Bert
>
>
> Bert Gunter
>
> "The trouble with having an open mind is that people keep coming along
> and sticking things into it."
> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>
>
> On Mon, Apr 10, 2017 at 7:56 AM, Boris Steipe <boris.steipe at utoronto.ca> wrote:
>> Well - the _procedure_ will give a result.
>>
>> But think of f(x) = {-1; x <= 1/3 and 1; x > 1/3
>>
>> What should inf{x| F(x) >= 0} be?
>> What should the procedure return?
>>
>>
>>
>>
>>
>>> On Apr 10, 2017, at 10:38 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>>>
>>> Given what she said, how does the procedure I suggested fail?
>>>
>>> (Always happy to be corrected).
>>>
>>> -- Bert
>>> Bert Gunter
>>>
>>> "The trouble with having an open mind is that people keep coming along
>>> and sticking things into it."
>>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>>
>>>
>>> On Mon, Apr 10, 2017 at 1:57 AM, Boris Steipe <boris.steipe at utoronto.ca> wrote:
>>>> Are you sure this is trivial? I have the impression the combination of an ill-posed problem and digital representation of numbers might just create the illusion that is so.
>>>>
>>>> B.
>>>>
>>>>
>>>>
>>>>
>>>>> On Apr 10, 2017, at 12:34 AM, Bert Gunter <bgunter.4567 at gmail.com> wrote:
>>>>>
>>>>> Then it's trivial. Check values at the discontinuities and find the
>>>>> first where it's <0 at the left discontinuity and >0 at the right, if
>>>>> such exists. Then just use zero finding on that interval (or fit a
>>>>> line if everything's linear). If none exists, then just find the first
>>>>> discontinuity where it's > 0.
>>>>>
>>>>> Cheers,
>>>>> Bert
>>>>>
>>>>>
>>>>> Bert Gunter
>>>>>
>>>>> "The trouble with having an open mind is that people keep coming along
>>>>> and sticking things into it."
>>>>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>>>>
>>>>>
>>>>> On Sun, Apr 9, 2017 at 5:38 PM, li li <hannah.hlx at gmail.com> wrote:
>>>>>> Hi Burt,
>>>>>> Yes, the function is monotone increasing and points of discontinuity are
>>>>>> all known.
>>>>>> They are all numbers between 0 and 1. Thanks very much!
>>>>>> Hanna
>>>>>>
>>>>>>
>>>>>> 2017-04-09 16:55 GMT-04:00 Bert Gunter <bgunter.4567 at gmail.com>:
>>>>>>>
>>>>>>> Details matter!
>>>>>>>
>>>>>>> 1. Are the points of discontinuity known? This is critical.
>>>>>>>
>>>>>>> 2. Can we assume monotonic increasing, as is shown?
>>>>>>>
>>>>>>>
>>>>>>> -- Bert
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Bert Gunter
>>>>>>>
>>>>>>> "The trouble with having an open mind is that people keep coming along
>>>>>>> and sticking things into it."
>>>>>>> -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip )
>>>>>>>
>>>>>>>
>>>>>>> On Sun, Apr 9, 2017 at 1:28 PM, li li <hannah.hlx at gmail.com> wrote:
>>>>>>>> Dear all,
>>>>>>>> For a piecewise function F similar to the attached graph, I would like
>>>>>>>> to
>>>>>>>> find
>>>>>>>> inf{x| F(x) >=0}.
>>>>>>>>
>>>>>>>>
>>>>>>>> I tried to uniroot. It does not seem to work. Any suggestions?
>>>>>>>> Thank you very much!!
>>>>>>>> Hanna
>>>>>>>>
>>>>>>>> ______________________________________________
>>>>>>>> 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.
>>>>>>
>>>>>>
>>>>>
>>>>> ______________________________________________
>>>>> 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