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.
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.
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
|
|
||
|
|
||
| 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.
No, we don't want to add this here. They must be set from the data.
There was a problem hiding this comment.
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.
Code comments are bad. Please remove.
mdfs/compute_max_ig.py
Outdated
| return x | ||
|
|
||
| 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.
Ditto about divisions - for discrete we must discover them.
There was a problem hiding this comment.
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