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

[RFC] New Syntax Changes and Roadmap #83

Open
shreyashnigam opened this issue Feb 27, 2022 · 0 comments
Open

[RFC] New Syntax Changes and Roadmap #83

shreyashnigam opened this issue Feb 27, 2022 · 0 comments
Assignees

Comments

@shreyashnigam
Copy link
Contributor

shreyashnigam commented Feb 27, 2022

Hey guys,

As discussed in #82, A key goal for the coming weeks is unifying Tisane and Tea. This includes both packages having similar syntax. I started working on this about 3 weeks ago and wrote example scripts to describe the look and function of the new grammar (see examples ending with _new_syntax.py). The purpose of this RFC is to provide an update on progress and blockers.

What Works

  • Declaring variables
  • Initializing data
  • Defining an experiment or observational study
  • Defining assumptions

To test the new syntax, checkout ar_tv_tea_new_syntax.py in tea examples on the new_syntax branch. Everything except hypothesize is in the new grammar!

What doesn't work (and why)

Hypothesize New Syntax

Consider the following example of a hypothesis in the new syntax

results = tea.hypothesize(score, condition['AR'].greaterThan (condition['TV']))

They key challenge here is parsing the prediction. Currently, variables are stored as measures, a custom object that does not support []. As far as I know, it is not possible to override this operator. Should we think about other ways to express the hypothesis prediction?. Alternatively, we can make changes to the Measure class but that might disturb the subclassing

Next Steps

For next steps, I'd really appreciate it if you guys could take a look at the code and suggest how to proceed with hypothesis. The branch new_syntax contains the working parts of the new grammar. Let me know if you have any ideas on how to move forward!

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

No branches or pull requests

3 participants