Drexel dragonThe Math ForumDonate to the Math Forum



Search All of the Math Forum:

Views expressed in these public forums are not endorsed by Drexel University or The Math Forum.


Math Forum » Discussions » Software » comp.soft-sys.math.mathematica

Topic: Model fitting
Replies: 3   Last Post: Nov 25, 2012 11:27 PM

Advanced Search

Back to Topic List Back to Topic List Jump to Tree View Jump to Tree View   Messages: [ Previous | Next ]
Ray Koopman

Posts: 3,382
Registered: 12/7/04
Re: Model fitting
Posted: Nov 25, 2012 11:27 PM
  Click to see the message monospaced in plain text Plain Text   Click to reply to this topic Reply

On Nov 25, 2:03 am, Dmitry Zinoviev <dzinov...@gmail.com> wrote:
> On Saturday, November 24, 2012 2:30:51 AM UTC-5, Ray Koopman wrote:
>> On Nov 23, 12:31 am, dzinov...@gmail.com wrote:
>>

>>> I have an array of 3D data in the form {xi,yi,0/1} (that is, the z coordinate is either 0 or 1). The points are not on a rectangular grid. The 0 and 1 areas are more or less contiguous, though the boundary between them can be somewhat fuzzy. The boundary is expected to be described by the equation y=a x^b. How can I adapt NonlinearModelFit or any other standard function to find the best fit values for a and b? Thanks!
>>
>> y = a x^b is linear in log-log coordinates, so use LogitModelFit
>> with Log@x and Log@y as the predictors; i.e., the probability of
>> observing z == 1 is 1/(1 + Exp[-(b0 + b1*Log@x + b2*Log@y)]).

>
> Than you! I assume that b=b2/b1. How do I calculate a?


The boundary is the curve for which prob[z == 1] == 1/2:

Solve[1/(1 + Exp[-(b0 + b1*Log@x + b2*Log@y)]) == 1/2, y]

y -> E^(-b0/b2) x^(-b1/b2)




Point your RSS reader here for a feed of the latest messages in this topic.

[Privacy Policy] [Terms of Use]

© Drexel University 1994-2014. All Rights Reserved.
The Math Forum is a research and educational enterprise of the Drexel University School of Education.