Clarification regarding project
Closed this issue · 4 comments
Dear Jan,
My colleague and I are trying to model Gary Becker's economic model of crime. However, the model has turned out to be much harder than expected and firstly we have a question regarding the social loss minimization function presented in the model (with respect to p and f):
First of all, D(O) and C(p,O) are not specified per se, it is just mentioned how these functions change and what should be taken into account. Should we specify these functions by ourselves, and is this possible with regard to the later minimization problem?
If this is not possible, can we use empirical data and relate it to the main assumptions of the model instead of doing the above-mentioned minimization problem as our project? Furthermore, if any of this seems unreasonable we can start working on another project.
Thank you!
Best,
Luka
Indeed, you can specify these functions yourself. Make sure the specification chosen is in line with the assumptions made in the paper. If you want to minimize
Thank you for the fast response! Yes, we have defined these functions but we are still having trouble finding values for
But can we do this with regards to two variables at the same time?
Indeed, you can. Can you see how the following code solves your problem?
def f(x,y):
return x**2 + y**2
sp.optimize.minimize(lambda z: f(z[0],z[1]), [1,1])
This helps, thank you very much!