Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Fit model data

I have a very naive question about the find_fit model. There is some way to choose the "best" one? For example, in this simple situation:

R =  [[0,1],[4,2],[8,4],[12,8],[16,16],[20,32],[24,64],[28,128],[32,256]]
p = scatter_plot(R)
p.show()
model(x) = 2^(a*x)
find_fit(R,model)

It will return a==0.25. But for choosing this model 2^(a*x), of course, I already know the answer. If you choose something more generic that makes more sense like

model(x) = a^(b*x)

It will return a == 1.1017945777232188, b == 1.7875622665869968. So I was wondering if there is a way to get the optimized model for it. Many thanks.

Fit model data

I have a very naive question about the find_fit model. There is some way to choose the "best" one? For example, in this simple situation:

R =  [[0,1],[4,2],[8,4],[12,8],[16,16],[20,32],[24,64],[28,128],[32,256]]
p = scatter_plot(R)
p.show()
model(x) = 2^(a*x)
find_fit(R,model)

It will return a==0.25. But for choosing this model 2^(a*x), of course, I already know the answer. If you choose something more generic that makes more sense like

model(x) = a^(b*x)

It will return a == 1.1017945777232188, b == 1.7875622665869968. So I was wondering if there is a way to get the optimized model for it. Many thanks.

Fit model data

I have a very naive question about the find_fit model. There is Is there some way to choose the "best" one? For example, in this simple situation:

R = [[0,1],[4,2],[8,4],[12,8],[16,16],[20,32],[24,64],[28,128],[32,256]]
p = scatter_plot(R)
p.show()
model(x) = 2^(a*x)
find_fit(R,model)

It will return a==0.25. But for choosing this model 2^(a*x), of course, I already know the answer. If you choose something more generic that makes more sense like

model(x) = a^(b*x)

It will return a == 1.1017945777232188, b == 1.7875622665869968. So I was wondering if there is a way to get the optimized model for it. Many thanks.