GithubHelp home page GithubHelp logo

Comments (6)

bradbell avatar bradbell commented on July 3, 2024

Are you trying, in some sense, to
minimize || y - f(x) || with respect x
where || * || is some measure of the difference between y and f(x) ?

from cppad.

dreamwingc avatar dreamwingc commented on July 3, 2024

from cppad.

bradbell avatar bradbell commented on July 3, 2024

Sounds like you are trying to do multi-objective optimization
https://en.wikipedia.org/wiki/Multi-objective_optimization

from cppad.

dreamwingc avatar dreamwingc commented on July 3, 2024

Sounds like you are trying to do multi-objective optimization
https://en.wikipedia.org/wiki/Multi-objective_optimization

I am not sure about if the situation I wanna optimize is multi or single optimization, but there is only one cost function/loss function to be optimized. Since the histogram is calculated, the direct relationship between vars and fg is "broken". In this case, the optimizer consider fg is a constant and refuse to do any optimization.

The histogram calculation cannot be represent by any equation directly. There are several bins in one histogram, and the value of each bin is based on how many elements which values are within the bin edges. Consider a vector a = [5, 6, 6, 7, 7, 7, 8, 8, 8, 8], if the number of bin set to be 4, hist(a) will be [1, 2, 3, 4]. In my case, vars are applied to vector a, so that the histogram calculation cannot be represent by vars directly.

I am wondering if there is any way to let the optimizer know the histogram calculation is one of the step to calculate the final cost function, and actually, there is indirect relationship between vars and histogram.

Thank you.

from cppad.

bradbell avatar bradbell commented on July 3, 2024

You have defined a function for which the derivative is zero almost everywhere. Where the derivative is non-zero, it is a generalized function (like a delta function). It is standard, in optimization, to reformulate such a problem to a space where the function is absolutely continuous; i.e., changes it the function value are equal to the integral of its derivative.

from cppad.

dreamwingc avatar dreamwingc commented on July 3, 2024

Thanks for your comments. I think I need to find other way to solve it.

from cppad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.