Page 1 of 1

10727 - Practice

Posted: Mon Oct 04, 2004 10:52 am
by backslash null
Hi every body any idea about problem 10727,
I don't understand the problem :( ....

thank you.

Posted: Mon Oct 04, 2004 2:00 pm
by gvcormac
Which problem? Your title says 10727 while your message says 10728.

I'll use your problem to entreat everybody to PUT THE PROBLEM NAME IN THE TITLE of your message. Perhaps everybody but me has 1GHz ethernet, a 100GHz processor, and access to a mirror of this site that is 100 times faster than the one I have.

It takes me a good fraction of a minute to look up the problem corresponding to a particular problem number. So if all you post is the problem number, I'm not likely to take the effort to figure out what you're talking about.

Posted: Mon Oct 04, 2004 8:05 pm
by gvcormac
The problem is asking you to do Logistic Regression. You can search the web or consult a statistics textbook to find more explanation.

Posted: Tue Oct 05, 2004 6:47 pm
by Quantris
What's the output for the case:
2
1 0
2 1

..my program runs off to -infinity for a, and i'm not sure where to stop it.

Posted: Tue Oct 05, 2004 9:00 pm
by gvcormac
Quantris wrote:What's the output for the case:
2
1 0
2 1

..my program runs off to -infinity for a, and i'm not sure where to stop it.
The result is undefined for the example you give. You need to have at least one inversion in the input for the result to be well-defined. The judge data has this property, but it was a little awkward to state the conditions in the problem statement. By an inversion, I mean that
if you sort by one value (n) the other value (w) must not be totally in order.

Posted: Wed Oct 06, 2004 1:07 am
by Quantris
ok, thanks. I think I figured out what else was wrong with my program, so hopefully I can fix it.

is sample output correct

Posted: Sun Oct 10, 2004 2:29 pm
by backslash null
isn't it more accurate if u select a=0 and b=0.25 ?
:-?

Re: is sample output correct

Posted: Sun Oct 10, 2004 3:35 pm
by gvcormac
backslash null wrote:isn't it more accurate if u select a=0 and b=0.25 ?
:-?
I assume you are referring to the previous example [(1,0), (2,1)]. When you apply the logistic transformation you're trying to fit [(1,log(0/1-0)), (2,log(1/(1-1))] = [(1,-inf),(2,+inf)]. The "solution" to this is a=-inf, b=+inf.

Posted: Sat Mar 05, 2005 6:50 pm
by ..
Just a short note after I get this AC. Hope this can help any people to solve this problem in future.

It was a really really painful journey to find the right reference to help me kill this problem. At first I use Logistic Regression to google, but most of the web pages I get are telling people to use SAS or S PLUS to do the estimation(instead of talking about the algorithm).....

After a few days of research, I finally know that, what you need to know, is Newton Raphson's method only. Just do a small transformation, you can get this problem AC by Newton Raphson's method without knowing any thing in Logistic Regression.......

I write this because I feel little bit disappointed that my few-days-long research makes no contribution to solving this problem..... But I still need to say thanks to Prof. Gordon V. Cormack, through the research on this problem I have learnt knowledge on regression(not only logistic, also linear and non-linear). :D

Posted: Sun Mar 06, 2005 7:05 am
by Krzysztof Duleba
In fact, no fancy algorithms are necessary. Simple nested binary search was enough to give me AC.

Posted: Mon Mar 07, 2005 10:23 am
by Destination Goa
I used 2D ternary search (nestes 1D's).