-
Notifications
You must be signed in to change notification settings - Fork 1
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
The fitP update #8
base: main
Are you sure you want to change the base?
Conversation
balaram26
commented
Nov 7, 2023
- I have created the new fitp cpp that has both fitp functions and also multitest functions (this part alone not used for now in python yet).
- Added some test scripts i used in example section, along with the data used by them.
1.fit_p_value cpp modified for contrast data check. 2.division parameter included in compute tuples. 3.Compute max ig discrete function fixed.(had issue with variable initiation).
1. updated the Fitp function 2.Included individual examples scripts for testing MDFS,ComputeIG and fitP value functions.
Removed some unnecessary lines
mdfs/fit_p_value.py
Outdated
|
||
|
||
def fit_p_value(chisq, chisq_contrast, *, | ||
exponential_fit, | ||
dimensions=None, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why does the fit depend on dimensions now? Previously it only needed to know whether it is going to be exponential or not.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes its not needed as its same as the bool variable. SO i removed and made the commit based on ur comments now.
mdfs/compute_tuples.py
Outdated
@@ -145,7 +145,7 @@ def compute_tuples(data, decision=None, *, dimensions=2, divisions=1, | |||
return handle_error(result) | |||
|
|||
|
|||
def compute_tuples_discrete(data, decision=None, *, dimensions=2, pc_xi=0.25, | |||
def compute_tuples_discrete(data, decision=None, *, divisions = 1, dimensions=2, pc_xi=0.25, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, we don't want to add this here. They must be set from the data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the default code to caluclate the divisions will not work in all cases. This is the code that was used before.
divisions = len(set(data)) - 1
For now i have removed the divisions parameter from the function, but then this above block needs to be fixed or modified.
mdfs/compute_max_ig.py
Outdated
divisions = len(set(data)) - 1 | ||
# if divisions!= None and divisions <= 0: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code comments are bad. Please remove.
mdfs/compute_max_ig.py
Outdated
|
||
def compute_max_ig_discrete(data, decision, contrast_data=None, dimensions=1, pc_xi=0.25, return_tuples=False, | ||
def compute_max_ig_discrete(data, decision, contrast_data=None, dimensions=1, divisions=1, pc_xi=0.25, return_tuples=False, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto about divisions - for discrete we must discover them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same as mentioned above, lets anyway discuss this this week.
Let's talk about it next week. |
1. i have removed the dimensions param from fit_p_value 2.I have removed the divisions param from discrete functions