Comments (5)
Thanks to you!!
from argmin.
Hi!
Error
and ArgminError
should be public. I just tried the following, which works for me:
use argmin::prelude::*;
impl ArgminOp for MyProblem {
type Param = f64;
type Output = f64;
type Hessian = ();
type Jacobian = ();
type Float = f64;
fn apply(&self, p: &Self::Param) -> Result<Self::Output, Error> {
Err(ArgminError::InvalidParameter {
text: String::from("bla"),
}
.into())
}
}
However, the ergonomics are far from ideal, I agree. I will think about this.
Alternatively, you should be able to implement your own errors if you want to.
Could you show me the compile error, please?
from argmin.
Which version are you using? The current master branch or 0.2.6? Your snippet suggests the master branch, but your problem suggests 0.2.6 ;)
I would suggest to use the current master branch, as the current release is quite old and outdated. I plan to publish a new release soon.
from argmin.
Perfect!!
I am so sorry, I got mixed the two versions (working on 0.2.6). Working on the master branch works as you say :)
So, case solved.
Happy to hear about the new release! :D
By the way, did you notice that the documentation is "broken"? I mean, from crates.io, the documentation link is broken. Is it a problem with docs.rs?
(I can open other issue for this if you want)
from argmin.
Glad I could help! I'm very sorry about the confusion!
Thanks for informing me about the broken documentation, I will investigate it :)
from argmin.
Related Issues (20)
- Abort iterations upon a condition on the cost function HOT 3
- Timeout HOT 1
- Vec<Vec<Vec<> parameters: 3+D parameters HOT 2
- BFGS with nalgebra Vector2 HOT 8
- Example cannot be compiled HOT 11
- GaussNewton params and cost out of sync in state HOT 4
- Async Within Cost Function HOT 2
- Newton Method one dimensional HOT 4
- Type bounds for type Param and related types in traits
- Request to add Polars (dataframe) backend HOT 3
- Gradient Methods search over parameter space instead of gradient space HOT 3
- Implement brenth for root finding HOT 2
- LBFGS with constraints on x HOT 1
- Maintenance over the next couple of months HOT 1
- Steepest descent erases prev_param HOT 5
- Gauss Newton solver to have option for Gradient and Jacobian HOT 6
- How best to share computation between cost and gradient computations in a solver-agnostic way? HOT 2
- LBFGS example, trait bounds HOT 2
- Development on Windows HOT 2
- How to inject custom termination criteria to existing solvers? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from argmin.