-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add parameter names to check_grad results #644
Conversation
Codecov Report
@@ Coverage Diff @@
## develop #644 +/- ##
===========================================
+ Coverage 88.16% 89.80% +1.63%
===========================================
Files 79 93 +14
Lines 5257 5953 +696
===========================================
+ Hits 4635 5346 +711
+ Misses 622 607 -15
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
pypesto/objective/base.py
Outdated
@@ -527,7 +527,8 @@ def check_grad( | |||
data = {**prefix_data, **data, **postfix_data} | |||
|
|||
# create dataframe | |||
result = pd.DataFrame(data=data) | |||
result = pd.DataFrame(data=data, | |||
index=[self.x_names[ix] for ix in x_indices]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
self.x_names
defaults to None
. Not sure if this will ever be the case here though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think whenever parameter names are used, a good default are p0, ... / p_0, ... / x0, ..., or sth like that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
cannot add default names to objective since dimension of x is not known at initialization
pypesto/objective/base.py
Outdated
@@ -527,7 +527,8 @@ def check_grad( | |||
data = {**prefix_data, **data, **postfix_data} | |||
|
|||
# create dataframe | |||
result = pd.DataFrame(data=data) | |||
result = pd.DataFrame(data=data, | |||
index=[self.x_names[ix] for ix in x_indices]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think whenever parameter names are used, a good default are p0, ... / p_0, ... / x0, ..., or sth like that.
Co-authored-by: Dilan Pathirana <59329744+dilpath@users.noreply.github.com>
No description provided.