Questions on the optimization functions of Mathematica such as FindMinimum/FindMaximum, Minimize/Maximize, NMinimize/NMaximize, etc.

learn more… | top users | synonyms (4)

1
vote
1answer
70 views

RegionPlot with rank constraint

I am trying to plot the feasible region of a rank constrained semidefinite program shown below: The Mathematica code that I am using is the following: ...
-6
votes
1answer
57 views

Setting up teams to play in games [on hold]

Imagine there are 12 teams, numbered 1 through 12. There are 10 games those teams can compete in, with two teams needed per game. There are 10 rounds, and it is important that after the 10 rounds are ...
-1
votes
1answer
81 views

Problem with a chemical optimization problem [on hold]

First of all, I want to say that I'm quite new to Mathematica. I searched a lot on this site to learn how to solve my problem, which this is the problem of my life! I want to minimize a function. It ...
8
votes
7answers
465 views

how to get $n$ equidistributed points on the unit sphere

We can get $n$ equidistributed points in the unit circle using CirclePoints. But how do you get $n$ equidistributed points on the unit sphere(surface of a ball)? ...
0
votes
1answer
102 views

Is the MMA formulation correct?

Let $H$ be a $4\times 8$ matrix and $R$ is a vector of 2 elements. ...
5
votes
0answers
78 views

Softmax Regression Classification Algorithm

I'm following the Stanford Machine Learning course while simultaneously developing my Mathematica abilities. I'm having issues with my Softmax Classifier implementation (for ref, have a look at these ...
1
vote
2answers
87 views

Find smallest solution in Solve's solution set

When an equation has multiple solutions, how do you find the first solution? Example: Say we're trying to find the first positive x-intercept of the cosine function: $cos(x)=0 \land x \ge 0$ ...
2
votes
1answer
94 views

Controlling step size in FindMaximum

I have a function of several variables for which I'd like to find the maximum. On one hand, it's easy to work with in the sense that it's smooth, and its only local maximum is a global one. On the ...
0
votes
0answers
58 views

Solve equations involving summation expressions in Mathematica

I am trying to solve the simple linear regression equation analytically in Mathematica (not using builtin functions). I managed to calculate the gradient as follows f is loss function using RSS and ...
0
votes
0answers
28 views

Gradient Descent's Update Rule for Multiparameter Functions

I'm sure this has been answered before, but I haven't been able to find it. I'm trying to manually implement gradient descent for some function, f, with a vector of any length. I define the update ...
0
votes
1answer
55 views

Calculating extrema of a given function on a geometrical region

I've never used Mathematica before. Now I have to figure out, for one of my classes, how to find the max and min of the function $f(x,y)=x^3+2\ xy$ over the triangular region of the plane with ...
0
votes
0answers
10 views

combinatorics questions [migrated]

How much words we can make from $0,1,2$ ? The restriction is we cant put the digit $2$ after the digit $2$. My solution: I tried to solve it with Inclusion-Exclusion Principle count the number of ...
0
votes
1answer
57 views

Finding the max points of a surface, maximize

So, this should not be hard at all, in fact no one seems so be having my issue so it should be me missing out on a point of information or just experience. So my mission is to with Mathematica find ...
4
votes
2answers
60 views

How to pass numerically evaluated constraints into nminimize?

I have a set of complicated 100 constraints which can be computed numerically for the given iterative values of the design variables. Once evaluated the lhs of the constraints are available as a ...
1
vote
1answer
43 views

Numerical evaluation of large number of constraints in nminimize at each step [closed]

I am trying to solve an optimization problem with complicated constraints which can be computed only numerically. I have written a module that computes lhs of these constraints. Now I need to tell ...
0
votes
0answers
34 views

How to make FindMiniumum work with delayed function and NIntegrate [duplicate]

I can plot my function penalty[v] just fine, but FindMinimum doesn't work, it just complains non-numerical values from ...
1
vote
1answer
62 views

Finding a maximum of a Bézier function

Suppose I have a Bézier function $f:\mathbb{R}^2\to\mathbb{R}$ with random coefficients: ...
7
votes
3answers
140 views

Locally Weighted Linear Regression

I am following the online Stanford Course in Machine Learning and I am trying to implement the algorithms on the fly in Mathematica. Currently, I have issues with minimizing the Locally Weighted ...
0
votes
0answers
21 views

Question about finding the minimum for self-defined function

My self-defined function is too complicated to paste here, and it works well with numerical values assigned. Basically, I have something like this , which contains 12 parameters. With numerical values,...
1
vote
0answers
121 views

Solve a certain optimization problem [closed]

I am new user of Mathematica. I want to solve an optimization problem. W = (n (X-Y-Z) p / Z q)^(1/a) where a > 0 I ...
3
votes
0answers
56 views

ShortestTour Problem with Constraints [closed]

I can solve a travelling salesman problem with FindShortestTour[], but couldn't find any function to solve a shorest tour problem with additional constraints like cost, fuel capacity etc. How cam I ...
8
votes
2answers
140 views

Using StepMonitor/EvaluationMonitor with DifferentialEvolution in NMinimize

My question about tracking the progress of a minimisation/fitting process is two-fold: 1. The first part of my question can be considered a slight duplicate/follow-up of this question. There the OP ...
1
vote
0answers
32 views
0
votes
0answers
51 views
2
votes
1answer
143 views

Using Minuit2 to minimize a Mathematica function

FindMinimum is great, but sometimes it is difficult to get an idea of the uncertainties and intermediate evaluation diagnostics. How to define a function in ...
0
votes
3answers
58 views

Maximum value of a function using loops

I have a function ab+bc+a/c, where a,b and c ranges from 1 to 5.I have to get an output of maximum value of this function and the values of a,b and c which give that maximum value. Is it possible to ...
15
votes
0answers
161 views

FindMinimum doesn't increase step size when necessary

I've spent much time finding a minimal example demonstrating this problem with FindMinimum. Normally one faces this problem when fitting very large and complicated ...
0
votes
0answers
113 views

Find coordinate {x, y, z} where two functions are minimal

I am trying to find a point in a ListPointPlot where the total RegionDistance is minimal AND the total differences of the <...
1
vote
1answer
83 views

Optimization of the solution to an ODE

Apologies if this is obvious -- I'm very new to Mathematica. I'm trying to minimize the solution to an ODE with respect to a variable. The following code generates the solution to the ODE, ...
0
votes
0answers
55 views

Minimize: which algorithm is in use?

How can I know which algorithm has been used by Minimize to solve a given problem? Can I force Minimize to use a specific ...
2
votes
1answer
44 views

Finding parameters with NMinimize doesn't do any steps

To find the best fit for an SVM, I have to constantly re-train my classifier with different parameters based on the result of the test set. I created a helper function which trains the SVM with the ...
0
votes
0answers
38 views

NMinimize to Optimize Parameters for Quarter Car Model

I am very new to Mathematica and am trying to simulate a mountain bike suspension by using a quarter-car model and I have input a displacement vs time road profile for two bumps for the excitation. ...
0
votes
1answer
64 views

Double summation nminimize

Please help me... ...
0
votes
0answers
100 views

Absolute minimum of a function

I would like to ask for some recomendations in order to get a faster result of a function evaluation to get the absolute minimum. In my desperate moments I have written the following code to get the ...
1
vote
1answer
39 views

How do I Maximize over a Cuboid region?

So, I want to, say, find a maximum value of $|x_1x_3+x_1x_4+x_2x_3-x_2x_4|$ in a unit cube in 4D; how do I do that? I've tried ...
2
votes
3answers
93 views

Find extremal values while plotting

I have a parametric function {x[t],y[t]}. I then do ...
0
votes
0answers
37 views

From “NMinimize::nosat: Obtained solution does not satisfy the following constraints within Tolerance”, can prove something?

I got a very very complicated function G[r1,r2,F1,F2] to minimize. It has four variables, r1,r2,F1,F2. When I introduce the ...
0
votes
0answers
40 views

How to set step size in FindMinimum?

My initial guess is very close to the solution. So I want step size is to be very small. Is there anyway to control the step size in the findminimum function?
0
votes
0answers
43 views

How to solve a constrained minimization problem?

I unsuccessfully tried ClearAll; Minimize[x^(8/5) + y^(8/5) + z^(8/5), x*y*z + x^2 + y^2 + z^2 == 4, {x, y, z}] No output during few hours. I am interested in ...
2
votes
2answers
177 views
1
vote
1answer
54 views

Step Monitor option in DifferentialEvolution

Using the "Step Monitor" option what exactly do I read? Does it show me the "best solution" for each population? Or does it show me each search point in the population? Also is there an integrated "...
5
votes
0answers
59 views

“PostProcess” and “Tolerance” in DifferentialEvolution? [closed]

What is "postprocess" option in DifferentialEvolution method (for instance when using ...
0
votes
1answer
78 views

Problems with NMaximize [duplicate]

The Objective function I would like to Maximize takes less than a second to evaluate. There are several packages needed to evaluate it, so I'm not showing it here. ...
0
votes
2answers
41 views

Time limit NMaximize [closed]

Is it possible to time limit NMaximize? It is taking so long to evaluate my minimum, that I would like to see if it is doing what I expect it to do. So I was thinking of time limiting it in order to ...
0
votes
1answer
35 views
1
vote
0answers
60 views

Minimize with Interval restriction

If for instance I have a problem of this sort: ...
0
votes
0answers
36 views

Is it possible to get the error estimates of predicted values computed by FindMinimum using the Levenberg Marquardt method?

I use the LevenbergMarquardt method of the FindMinimum function to minimize a residual function (mathematical-optimization). This residual function is computed from experimental data and the solution ...
0
votes
0answers
46 views

Check if interpolated function passes through a specified region

Is there an efficient way to check if a curve that was obtained as an Interpolating Function (from solving differential equations numerically) passes through a given region? I am solving for two ...