Skip to content

Code Review#2

Open
ps789 wants to merge 64 commits into
code_reviewfrom
main
Open

Code Review#2
ps789 wants to merge 64 commits into
code_reviewfrom
main

Conversation

@ps789

@ps789 ps789 commented Apr 12, 2022

Copy link
Copy Markdown

No description provided.

@emerisly emerisly left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The AR function's name is a bit abstract. Maybe a brief comment explaining what AR means and what AR do?

@emerisly emerisly left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure if I'm missing the spec file. It would definitely help if there's a brief comment specifying what each file's goal is (or spec of each function) in the same file.

@emerisly emerisly left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The README needs MoRe fancy descriptionssss

@emerisly emerisly left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't know what's going on but ✨ looking good ✨

@emerisly emerisly left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I shall not ask 🤫

Comment thread arima.py
def MA(q, res):
''' Moving Average'''

for i in range(1, q+1):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe add a comment for this smaller section of code to explain what's happening

Comment thread arima.py
return best_p_bic, best_bic


def opt_q(df_testing, low_q, up_q, str):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add some comments throughout this method

Comment thread arima.py
assert (str == 'AIC' or str == 'BIC' or str == 'RMSE')
best_p_aic, best_p_bic, best_p_rmse = 0, 0, 0
best_rmse, best_aic, best_bic = float("inf"), float("inf"), float("inf")
for p in range(low_p, up_p):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe 1 comment before the for loop

@ReallyNeil ReallyNeil left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ngl this is super clean overall, probably the best codebase health I've seen on CDS. Keep it up kings and queens.

Comment thread arima.py
@@ -0,0 +1,198 @@
import numpy as np

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall great code quality here, the only comments I have are on documentation which is a great sign. I think commenting what each method is supposed to do would be the main value, especially if this project ends up continuing on and being taken on by new members. This is a very experience team overall, but I think documenting could help if newer members end up joining the team

Comment thread README.md
@@ -1 +1,28 @@
# Stock-Densities

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Super sick idea to have OKRs in readme, def stealing this for future projects :D

Comment thread load.py
@@ -0,0 +1,26 @@
from audioop import mul

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not standard practice so I cant blame yall for not doing it, but I would love some documentation at top explaining the class purpose, even if it is not super complicated

Comment thread arima.py
return best_q_bic, best_bic


def arima(low_p, high_p, low_q, high_q, df, key, opt_method):

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consider overall documenting the meaning of each parameter as well! The specs are super concise and awesome with this exception. Would probs help lots with other people who would want to use this code

Comment thread arima_density.ipynb
@@ -0,0 +1,1771 @@
{
"cells": [

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lol had to open this file elsewhere: I don't know exactly what y'all are doing but maybe more descriptive variable names + some cell comments would be great

Comment thread arima.py
print(label+' : '+str(value))

if result[1] <= 0.05:
print("strong evidence against the null hypothesis, reject the null hypothesis. Data has no unit root and is stationary")

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Consistent print formatting 1!!!!

@emwangs

emwangs commented Apr 21, 2022

Copy link
Copy Markdown

Awesome stuff! I like starting to add more modularity with the arima py file instead of keeping everything in a jupyter notebook

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants