You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Your market clearing could benefit from being converted into a plot instead of a long list of numbers. Plotting the data is simply more neat, and the narrative is easier to follow.
The hardest section of the code in the project to understand was
I really don't have comments on this. The code is well-written, and well-structured. It definitely gave me some some inspiration for my own code.
This part of the project could be better documented
Your InauguralProjectClass-class should have been documented with details on its parameters and arguments. See for example the following as an inspiration,
deffunction(self, good, price):
""" The function returns the demand for the chosen good in the first the defined class. Args: good: A list of integers representing the demand for the good defined initially price: A list of intergers representing the price for each good. Returns: The total demand for the good 1 or 2 """# 1) coerce good and price# to numpy arraysgood=np.array(good)
price=np.array(price)
demand=self.fraction*sum(price*good) /price[self.good-1]
returnnp.maximum(demand, 0)
This will help readers of your code, and your future selves.
An idea for an improvement/clarification could be
If anything, I would opt for vectorized-code over for-loops where possible - this can easily be achieved by using numpy, and will increase efficiency and speed of your code.
An idea for an extension could be
A requirements.txt so your modules can easily be installed. See, for example, this guide on how to implement this.
Alternatively, I would write all used modules in the README with the associated code to install these.
The text was updated successfully, but these errors were encountered:
The most elegant solution
projects-2024-econtechvets/inauguralproject/inauguralproject.ipynb
Lines 147 to 155 in 3b086a7
Your
edgeworth
-box plot is brilliant - it is, however, somewhat messy; it's hard to decipher where the set of Pareto improvements are.An idea for improvement
projects-2024-econtechvets/inauguralproject/inauguralproject.ipynb
Lines 189 to 268 in 3b086a7
Your market clearing could benefit from being converted into a
plot
instead of a long list of numbers. Plotting the data is simply more neat, and the narrative is easier to follow.The hardest section of the code in the project to understand was
I really don't have comments on this. The code is well-written, and well-structured. It definitely gave me some some inspiration for my own code.
This part of the project could be better documented
Your
InauguralProjectClass
-class should have been documented with details on itsparameters
andarguments
. See for example the following as an inspiration,From this project
This will help readers of your code, and your future selves.
An idea for an improvement/clarification could be
If anything, I would opt for
vectorized
-code overfor-loops
where possible - this can easily be achieved by usingnumpy
, and will increase efficiency and speed of your code.An idea for an extension could be
A
requirements.txt
so yourmodules
can easily be installed. See, for example, this guide on how to implement this.Alternatively, I would write all used
modules
in theREADME
with the associatedcode
to install these.The text was updated successfully, but these errors were encountered: