Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9022611
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T05:33:22+00:00 2026-06-16T05:33:22+00:00

I currently work on a machine learning algorithm and I noticed that when I

  • 0

I currently work on a machine learning algorithm and I noticed that when I use Matlab’s fminunc the algorithm converges to the global minimum very fast (few iterations) comparing to when I manually update the parameters:

thetas[j] = thetas[j] - (alpha*gradient)/sampleNum;

I think it’s because I naively presume alpha (step proportion) to be constant.

So, how does one implement something like fminunc in C?

I tried to start with a large alpha and adjust it if the current cost turns out to be larger than the previous cost. The problem with this comes when the shape of the minimised function is not linear, since alpha can get a very small value initially and fail to return to a larger one when the function shape tends to become ‘flat’ (and larger steps could be taken).

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T05:33:24+00:00Added an answer on June 16, 2026 at 5:33 am

    Matlab’s fminunc doesn’t actually use gradient descent, but rather Newton-like methods (BFGS-based quasi-Newton or trust-region depending on the problem size), which are in general significantly faster than gradient descent, no matter how you choose the step size.

    Maybe you should look into this kind of methods if you want faster convergence.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently work in an organization that forces all software development to be done
I am currently learning how to work with the registry using c++. I have
Currently, not even the simplest examples of using the 'ExpandoObject' work on my machine.
I'm using 3.5 SP1 on my machine, while our customers currently use 3.5 without
I currently use a linux VM in VMWare running on a Windows machine. I
I currently work on a Java web application that has relies on a permissions
I work in a team of 2 developers and currently we use VSS and
I currently work on a tracking project using a GPS receiver and a modem
I currently work on a parser. I walk a tree, most of it being
I currently work on a magento webshop, which loads PrototypeJS as framework. However i

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.