Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

48 feature eval computation #55

Open
wants to merge 22 commits into
base: main
Choose a base branch
from
Open

Conversation

kyeoul
Copy link
Collaborator

@kyeoul kyeoul commented Nov 3, 2024

Description

Testing

Impact

Other

Merge branch 'main' into 48-feature-eval-computation
@kyeoul kyeoul linked an issue Nov 3, 2024 that may be closed by this pull request
@kyeoul
Copy link
Collaborator Author

kyeoul commented Nov 3, 2024

questions:

  • Where should I put the script
  • does the overall outline look correct

@kyeoul kyeoul marked this pull request as ready for review November 22, 2024 19:33
Copy link
Member

Choose a reason for hiding this comment

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

why r we using dateutil

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

im stupid, removed and iterating with regular datetime

self.asset = asset
self.start = start
self.end = end
pass
Copy link
Member

Choose a reason for hiding this comment

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

del

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done



class Evaluator:
def __init__(self, features: list[str], asset: str, start: datetime, end: datetime):
Copy link
Member

Choose a reason for hiding this comment

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

asset enum

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

trade_generators = []
snapshot_generators = []

for date in rrule(DAILY, dtstart=start, until=end):
Copy link
Member

Choose a reason for hiding this comment

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

can we do all the path manip with pathlib

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

yes, done

feature_dict[feature] = []

for trade, snapshot in data:
print("huh")
Copy link
Member

Choose a reason for hiding this comment

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

bro

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

😭


class Evaluator:
def __init__(self, features: list[str], asset: str, start: datetime, end: datetime):
self.features = features
Copy link
Collaborator

Choose a reason for hiding this comment

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

prefix with underscore pls

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

prefix the helpers? are you talking about calculate_features()
I thought it wasn't a helper, but would it be better to combine calculate_features and evaluate_features into one "calc_and_eval_features" method

Copy link
Collaborator

Choose a reason for hiding this comment

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

mb i meant like self._features = features

self,
start: datetime,
end: datetime,
trades_resource_path: str,
Copy link
Collaborator

Choose a reason for hiding this comment

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

i think we should pass resource_path as a class parameter, and then we can do resouce_path/trades/asset/date.bin here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

done

trade_generators = []
snapshot_generators = []

for date in rrule(DAILY, dtstart=start, until=end):
Copy link
Collaborator

Choose a reason for hiding this comment

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

not anything wrong with using but was there a reason you used rrule instead of doing this manually

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

i was dumb

for feature in self.features:
feature_dict[feature] = []

for trade, snapshot in data:
Copy link
Collaborator

Choose a reason for hiding this comment

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

uhhhh i think this is assuming that trades/snapshots start at the same tick and have an entry for every tick which i don't think is guaranteed

Copy link
Collaborator

Choose a reason for hiding this comment

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

Copy link
Member

Choose a reason for hiding this comment

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

yea that is not guaranteed

Copy link
Member

Choose a reason for hiding this comment

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

may need to mute to use jerrys pr
not sure

Copy link
Member

Choose a reason for hiding this comment

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

I think this was alr added by chris in #66

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.

Feature Eval: Computation
3 participants