Skip to content

added sub components to bias components - #35

Open
surbhir08 wants to merge 2 commits into
mainfrom
bias_new_components
Open

added sub components to bias components#35
surbhir08 wants to merge 2 commits into
mainfrom
bias_new_components

Conversation

@surbhir08

Copy link
Copy Markdown

No description provided.

@brownsarahm brownsarahm left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

needs a few small changes (I have not yet run it though)

Comment on lines +327 to +340
'''
sample P(X|A) using distribution and parameters initialized for
a.

Parameters
----------
a : list-like length n
demographic variables

Returns
--------
x : list like, length n
featuers, same shape as a
'''

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

move this to the function, not the class

Comment thread mlsim/bias/bias_components.py Outdated
x = np.asarray(x)

return x
######

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

remvoe these lines


############

class FeatureConditionerA(Feature):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The conditioners should not inherit fromFeature, they should have only the sample method


mvn = lambda mu,var :np.random.multivariate_normal(mu,var*np.eye(len(mu)))

class FeatureSharedParam(Feature):

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

the parameter mixins won't inherit from Feature anymore either, they should have only a constructor.

Co-authored-by: Sarah Brown <brownsarahm@uri.edu>
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.

2 participants