Question: Bayesian Scenario by Python: example code: class BayesSet: def __init__(self, n, A, B, B_A, B_notA = None): #code that creates a df and assigns it
Bayesian Scenario by Python:
example code:
class BayesSet: def __init__(self, n, A, B, B_A, B_notA = None): #code that creates a df and assigns it to self.df def make_me_a_class(n,A,B,B_A,B_notA = None): df = BayesSet(n, A, B, B|A, B_notA).df return df
What you need to do:
Will access the code using two requests.
1) make_me_a_set(n, A, B, B_A)
2) make_me_a_set(n, A, B, B_A, B_notA)
Each of these functions should return a pandas data frame which meets the parameters.
Ideally these sets would be randomly generated rather than simply prescribed but it is up to you.
the df will be of form
A, B
1,1
0,1
1,1
....
1 and 0 may be replaced with True and False if you wish.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
