error and errorSquaredNorm can optionally take in variable data
See original GitHub issue🚀 Feature
API improvement in Objective
: error
and errorSquaredNorm
can optionally take in var_data
which if passed would call update
internally. Document the behavior that if var_data
is passed this will update
the objective.
Motivation
Facilitates usage for cases where only error needs to be queried (w/o running optimization or even updating the variables).
Pitch
Following ways to use this api after:
- Get
error
on current internal values: callerror
without passing anyvar_data
- Get
error
on new values w\ update to objective: callerror
and passvar_data
- Get
error
on new values w\o update to objective: callerror
, passvar_data
andTrue
optional flag to not update objective
Issue Analytics
- State:
- Created 2 years ago
- Comments:13 (13 by maintainers)
Top Results From Across the Web
Practice - Functions.Rmd at master · LukaIgnjatovic ... - GitHub
In this exercise you'll be writing another function that will use the `interpret()` function to interpret all the data from your daily profile...
Read more >Optional data and parameters - Modeling - The Stan Forums
Hi, Is there a way to optionally include both data and parameters in a stan model? I have a model that I would...
Read more >Is there a clean way to use undefined variables as optional ...
Just testing with sum of the supplied values just for showing an example. <?php $x = 1; //Would generate notices but no error...
Read more >Chapter 46 Common Errors in R | Spring 2021 EDAV ...
This error will appear whenever you try to send a NULL or NA variable into an if statement. ... Error in `[.data.frame`(df, ,...
Read more >Can't have paramarrays with optional arguments
An Optional argument is one that the caller can supply or omit without generating an error. This error has the following causes and...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @jeffin07. Can you post a screenshot of the error? Also, if you make a pull request from your fork to our
main
branch, I can turn on CI tests and see your code and test results as well.Hi @jeffin07. That’s the correct test, yes. I noticed that the code for that test was really old, and it could be made simpler with some of the standard variables and cost function that we have now. I made a new version, which is hopefully easier to follow.
You can just add some additional code after line 281 that will tests that the functions follow the behavior we discussed above when passing other tensor values for
v1_data
andv2_data
(and using_check_error_for_data
).