Skip to content

Navigation Menu

Sign in
Sign up

Sensitivity - #63

Draft
jnnr wants to merge 45 commits into
dev from
features/sensitivity
Draft

Sensitivity #63
jnnr wants to merge 45 commits into
dev from
features/sensitivity

Conversation

@jnnr

@jnnr jnnr commented May 29, 2022
edited
Loading

Copy link
Copy Markdown
Collaborator

Allows to create new EnergyDatapackages from two existing EnergyDatapackages and a sampling function. First implemented sampling functions

  • Linear slide: LInear interpolation between the two datapackages.
  • SAlib sampling methods, e.g. latin hypercube sampling Sensitivity salib #64

jnnr added 30 commits November 8, 2021 18:18

@jnnr jnnr left a comment

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Some comments:

Comment thread oemoflex/model/variations.py
Comment thread oemoflex/model/variations.py
Comment thread oemoflex/model/variations.py
Comment thread oemoflex/model/variations.py
Comment thread oemoflex/model/variations.py
self.eps,
).all(), f"The difference between lb and ub is lower than the defined minimum of {self.eps}"

def get_diff(self):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Revise naming

def get_diff(self):
return get_diff(self.lb.loc[:, self.VAR_VALUE], self.ub.loc[:, self.VAR_VALUE])

def get_param(self):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Revise naming

self.sanity_check()

return _dp
def sanity_check(self):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Decouple sample method and sanity check.

return full_samples


class EDPSensitivity(Sensitivity):

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

This could be done more general. The above Sensitivity class does checking and sampling for a single dataframe. This class is supposed to do the same for DataFramePackages.

The implementation takes some time to grasp - could be more transparent?

Comment thread tests/test_sensitivity.py
# assert that the last sample equals the upper-bound datapackage
assert frame_containing_nan_equal(
samples["sample_" + str(n - 1)], edp_ub_stacked.data["component"]
)

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

Add a check that actually compares results files.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

1 participant

AltStyle によって変換されたページ (->オリジナル) /