Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.soft-sys.math.mathematica > #12421 > unrolled thread
| Started by | dzinoviev@gmail.com |
|---|---|
| First post | 2012-11-23 08:29 +0000 |
| Last post | 2012-11-26 04:27 +0000 |
| Articles | 4 — 3 participants |
Back to article view | Back to comp.soft-sys.math.mathematica
Model fitting dzinoviev@gmail.com - 2012-11-23 08:29 +0000
Re: Model fitting Ray Koopman <koopman@sfu.ca> - 2012-11-24 07:28 +0000
Re: Model fitting Dmitry Zinoviev <dzinoviev@gmail.com> - 2012-11-25 10:00 +0000
Re: Model fitting Ray Koopman <koopman@sfu.ca> - 2012-11-26 04:27 +0000
| From | dzinoviev@gmail.com |
|---|---|
| Date | 2012-11-23 08:29 +0000 |
| Subject | Model fitting |
| Message-ID | <k8nc4m$dfl$1@smc.vnet.net> |
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!
[toc] | [next] | [standalone]
| From | Ray Koopman <koopman@sfu.ca> |
|---|---|
| Date | 2012-11-24 07:28 +0000 |
| Message-ID | <k8psuu$irk$1@smc.vnet.net> |
| In reply to | #12421 |
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)]).
[toc] | [prev] | [next] | [standalone]
| From | Dmitry Zinoviev <dzinoviev@gmail.com> |
|---|---|
| Date | 2012-11-25 10:00 +0000 |
| Message-ID | <k8sq8b$onc$1@smc.vnet.net> |
| In reply to | #12444 |
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?
[toc] | [prev] | [next] | [standalone]
| From | Ray Koopman <koopman@sfu.ca> |
|---|---|
| Date | 2012-11-26 04:27 +0000 |
| Message-ID | <k8ur3a$spd$1@smc.vnet.net> |
| In reply to | #12461 |
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)
[toc] | [prev] | [standalone]
Back to top | Article view | comp.soft-sys.math.mathematica
csiph-web