Skip to content

Conversation

@peanutfun
Copy link
Member

Changes proposed in this PR:

  • Add JOSS paper draft

This PR fixes #

PR Author Checklist

PR Reviewer Checklist

@peanutfun peanutfun changed the base branch from calibrate-impact-functions to develop April 29, 2024 15:29
@peanutfun peanutfun changed the base branch from develop to calibrate-impact-functions April 29, 2024 15:29
def calibrate(hazard: Hazard, exposure: Exposure, impact_data: pd.DataFrame):
"""Calibrate an impact function with BayesianOptimizer"""

def impact_function_tropical_cyclone(v_half: float, scale: float) -> ImpactFuncSet:
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
def impact_function_tropical_cyclone(v_half: float, scale: float) -> ImpactFuncSet:
def impact_function_tropical_cyclone(v_half: float, scale: float) -> ImpactFuncSet:

For the example, I would rather use the generic ImpactFunc.from_sigmoid_impf.

Copy link
Member Author

Choose a reason for hiding this comment

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

The code replicates the main part of the tutorial, and the plots are almost exactly the same. We can change it, but then it actually becomes harder to replicate the example. However, I could also change the tutorial to use from_sigmoid_impf.

Copy link
Member

Choose a reason for hiding this comment

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

I would do that. In part because the impact function for TC is quite particular, and in part because of the near-future plans to move TC to the petals repo.

Copy link
Member Author

Choose a reason for hiding this comment

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

I can then actually showcase a calibration with v_thresh, v_half and constraints!

Copy link
Member Author

Choose a reason for hiding this comment

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

@chahank Actually, the sigmoid implementation in from_sigmoid_impf is really not useful. It has no threshold parameter, meaning that you can easily create a function where mdr(0) != 0. It would be more useful to generalize the Emanuel-style sigmoid definition, as we did in the other paper. But this will also require the definition of a new function. So, for the sake of simplicity, I would keep everything as is.

@peanutfun peanutfun merged commit 10e0014 into calibrate-impact-functions May 2, 2024
@emanuel-schmid emanuel-schmid deleted the calibrate-impact-functions-joss branch May 8, 2024 07:29
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.

3 participants