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
Fantastic work @mgyoo86 I am truly impressed at how quickly you put this together and I appreciate the high-quality printouts and plots! 🥇
I have some feedback mostly based on my experience developing Julia code. I hope you find my comments useful. The code is already very-much usable as is, but I think we can make it even better!
Style
Typically julia functions start with lower case. Upper casing is usually reserved for structs.
You could consider splitting your code into multiple files
Abstraction
You could define a BetaLimitModel abstract type, with MLP_Model and CNN_Model be concrete types of it. This will make working with the MLP and CNN models more transparent, allowing in certain situations to dispatch on the abstract type instead of the concrete types.
Plotting
You should take a look at Plots.jl recipes, which allow you to define how plot() should behave on a specific type. In your case @recipie plot(sampPoints::Sample_Points), @recipie plot(model::BetaLimitModel). Recipes are very powerful, once you get around using them, there's no turning back! ;) Also, people don't have to remember the name of individual plot functions, they just apply plot() to different objects!
Printing
Instead of the different _print_results_to_stdout methods, you can define your Base.show(io::IO, ::MIME"plain/text", model::BetaLimitModel) which will allow you to get the fancy prints whenever a model is returned in a Jupyter cell.
Performance
It seems you are re-loading the models each time the limits are calculated. That's very inefficient. You can load each model only once and then keep re-using them (you can use Memoize.jl or caching the models yourself).
Saving results to dd
we need to figure out where βₙ_limit should be stored in the dd. Once βₙ_limit is in the dd there will be no reason to have models for each time slice. Perhaps @bclyons12 can comment on this one.
The text was updated successfully, but these errors were encountered:
Fantastic work @mgyoo86 I am truly impressed at how quickly you put this together and I appreciate the high-quality printouts and plots! 🥇
I have some feedback mostly based on my experience developing Julia code. I hope you find my comments useful. The code is already very-much usable as is, but I think we can make it even better!
Style
Abstraction
BetaLimitModel
abstract type, withMLP_Model
andCNN_Model
be concrete types of it. This will make working with the MLP and CNN models more transparent, allowing in certain situations to dispatch on the abstract type instead of the concrete types.Plotting
plot()
should behave on a specific type. In your case@recipie plot(sampPoints::Sample_Points)
,@recipie plot(model::BetaLimitModel)
. Recipes are very powerful, once you get around using them, there's no turning back! ;) Also, people don't have to remember the name of individual plot functions, they just applyplot()
to different objects!Printing
_print_results_to_stdout
methods, you can define yourBase.show(io::IO, ::MIME"plain/text", model::BetaLimitModel)
which will allow you to get the fancy prints whenever a model is returned in a Jupyter cell.Performance
Memoize.jl
or caching the models yourself).Saving results to dd
βₙ_limit
should be stored in thedd
. Onceβₙ_limit
is in thedd
there will be no reason to have models for each time slice. Perhaps @bclyons12 can comment on this one.The text was updated successfully, but these errors were encountered: