Skip to content
This repository was archived by the owner on Nov 23, 2018. It is now read-only.

Conversation

vladimir-ch
Copy link
Member

I like the names DecreaseFactor and CurvatureFactor. I would vote for using them also in the other Linesearchers.

As I mentioned before, CG is the method that most benefits from this Linesearcher, so I set it as the default. Maybe we should remake the CG tests, there are already many combinations and the Linesearchers add an extra dimension.

PTAL @btracey

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't these be in functions? Even if specialized I think we/someone will find it useful to have an easily accessible set of functions. We could provide a one-D wrapper here or something.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. I will move them there.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done. PTAL @btracey

@vladimir-ch vladimir-ch force-pushed the morethuente branch 2 times, most recently from 4680b16 to 738663a Compare January 19, 2016 01:31
errors.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How about this is "ErrLinesearchBound". Some linesearchers have a minimum step, and this may as well cover both?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed to ErrLinesearcherBound. At the moment I will leave it as an ordinary error but I can imagine that storing the step and the bounds could be potentially useful.

@vladimir-ch vladimir-ch force-pushed the morethuente branch 2 times, most recently from 3169780 to f42a908 Compare January 19, 2016 08:45
@vladimir-ch
Copy link
Member Author

Addressed comments. I also added a check that Linesearcher.Init returns an evaluating operation and changed the invalid operation panic to a regular t.Errorf. Sorry for changing the code outside of the comments but it seemed merited to me. PTAL @btracey

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

characteristics such as?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's hard for me to describe it in one sentence. Please take a look at what I have there now.

@btracey
Copy link
Member

btracey commented Jan 20, 2016

Sorry, I do understand why Max and Min steps are absolute, but I don't understand why StepTolerance should be relative, especially when the other Step numbers are all absolute.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this only has two values, should it be a boolean?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In fact it has three values because I (ab)use the zero value of stage to check that Init has been called. If you don't like it or if such stringent checking is deemed too pedantic, I can make it a bool.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, that's fine.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think absolute is easier to think about. There's no clear definition of "relative" here (though I know you provided one). Additionally, the tolerance, even absolutely, is already scaled no ||dir||. Our "coordinates" have a step of size ||dir|| equal to 1.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Additionally, the tolerance, even absolutely, is already scaled no ||dir||. Our "coordinates" have a step of size ||dir|| equal to 1.

Yes, that's why I offered the alternative to measure the interval width in real, non-scaled-on-dir units. However, for that we would have to change the Linesearcher interface and that does not feel worthy. I don't have a strong argument for a relative tolerance, so I will change it to an absolute tolerance and see what it does with the tests.

morethuente.go Outdated
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here.

@vladimir-ch vladimir-ch force-pushed the morethuente branch 2 times, most recently from 06aca1d to 14df624 Compare January 22, 2016 03:18
@btracey
Copy link
Member

btracey commented Jan 22, 2016

LGTM. Thanks.

@vladimir-ch
Copy link
Member Author

The discussion about the relative step tolerance has been left open-ended but I will merge anyway. I will open an issue and copy the discussion there so that it is together in one place.

@vladimir-ch vladimir-ch merged commit 12b79c6 into master Jan 22, 2016
@vladimir-ch vladimir-ch deleted the morethuente branch January 26, 2016 07:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants