Questions tagged [minimization]

Minimization is a subclass of mathematical optimization where given a cost or objective function, the goal is to choose the best set of parameters that will minimize the value given by this function.

457 questions
97
votes
17 answers

Knight's Shortest Path on Chessboard

I've been practicing for an upcoming programming competition and I have stumbled across a question that I am just completely bewildered at. However, I feel as though it's a concept I should learn now rather than cross my fingers that it never comes…
Kyle Hughes
  • 1,269
  • 2
  • 14
  • 13
14
votes
10 answers

Dependency Algorithm - find a minimum set of packages to install

I'm working on an algorithm which goal is to find a minimum set of packages to install package "X". I'll explain better with an example: X depends on A and (E or C) A depends on E and (H or Y) E depends on B and (Z or Y) C depends on (A or K) H…
KLi
  • 198
  • 2
  • 9
12
votes
7 answers

How to find minimum of nonlinear, multivariate function using Newton's method (code not linear algebra)

I'm trying to do some parameter estimation and want to choose parameter estimates that minimize the square error in a predicted equation over about 30 variables. If the equation were linear, I would just compute the 30 partial derivatives, set them…
Norman Ramsey
  • 188,173
  • 57
  • 343
  • 523
12
votes
3 answers

R optimization with equality and inequality constraints

I am trying to find the local minimum of a function, and the parameters have a fixed sum. For example, Fx = 10 - 5x1 + 2x2 - x3 and the conditions are as follows, x1 + x2 + x3 = 15 (x1,x2,x3) >= 0 Where the sum of x1, x2, and x3 have a known value,…
Scott Worland
  • 1,114
  • 1
  • 10
  • 13
10
votes
8 answers

Can a neural network be used to find a functions minimum(a)?

I had been interested in neural networks for a bit and thought about using one in python for a light project that compares various minimization techniques in a time domain (which is fastest). Then I realized I didn't even know if a NN is good for…
8
votes
2 answers

Android, ProGuard, and keepclasseswithmembernames

A common pattern in ProGuard configs for Android applications is to preserve custom View classes, since they are probably referenced only from layout XML instead of application code. Upon project creation, the ADT therefore add these rules to a…
Matthias
  • 41,630
  • 28
  • 100
  • 129
8
votes
4 answers

Minimizing a multivariable function with scipy. Derivative not known

I have a function which is actually a call to another program (some Fortran code). When I call this function (run_moog) I can parse 4 variables, and it returns 6 values. These values should all be close to 0 (in order to minimize). However, I…
7
votes
1 answer

PyMinuit vs IMinuit

I was looking for a minuit equivalent on Python 2.7 and I found this two variants: PyMinuit and iMinuit. My question is: what's the difference between them? Both uses Seal 1.7.9 Minuit and in a few 2D Gaussian fit tests that I had both brought the…
pekapa
  • 801
  • 1
  • 10
  • 24
6
votes
1 answer

Find maximum/minimum of a 1d interpolated function

I have a set of data which I am interpolating with kind = 'cubic'. I would like to find the maximum of this cubic interpolation function. Currently what I am doing is just find the maximum value in the array of interpolated data, but I was…
SuperCiocia
  • 1,350
  • 2
  • 15
  • 37
6
votes
1 answer

Minimize matrix in Equation using OpenCV

I need to minimize H in following equation: Where H is 3x3 Matrix. Pn is 3x1 matrix (point). Euclidean() gives distance between 2 points. Dn is the actual distance. I have one initial estimate of H and m points(P0 to Pm) I need optimize value of…
Deepak
  • 978
  • 4
  • 16
  • 39
6
votes
1 answer

Minimum area calculation algorithm (Place tiles on edge only)

I have different dimension of small rectangles (1cm x 2xm, 2cmx3cm, 4cm*6cm etc). The number of different type rectangles may vary depending on case. Each type of different rectangles may have different number of counts. I need to create a big…
Charles Tang
  • 177
  • 1
  • 15
6
votes
2 answers

Faster/more efficient alternatives to Ruby's Marshal?

I'm looking for a drop-in replacement of Ruby's Marshal capability, which hopefully has one or more of the following advantages over Marshal: faster serialization/deserialization more concise (or simply smaller) object-graph Thanks!!
Joseph Weissman
  • 5,497
  • 5
  • 41
  • 73
6
votes
1 answer

Solving a bounded non-linear minimization with scipy in python

Trying to solve a simple non linear minimization problem with one variable. from scipy.optimize import minimize import math alpha = 0.05 waiting = 50 mean_period = 50 neighborhood_size = 5 def my_func(w): return -(2/(w+1) +…
George
  • 704
  • 1
  • 9
  • 18
6
votes
3 answers

Quickly finding the first point at which a function equals 0 using scipy.optimize

Basically, given a function that produces outputs like this for different parameters: I want to quickly find the first x at which the function equals 0. So with parameters that produce the blue curve over x, I want to find x=134. For the green…
endolith
  • 21,410
  • 30
  • 114
  • 183
6
votes
8 answers

Minimization of f(x,y) where x and y are integers

I was wondering if anyone had any suggestions for minimizing a function, f(x,y), where x and y are integers. I have researched lots of minimization and optimization techniques, like BFGS and others out of GSL, and things out of Numerical Recipes.…
Tim
  • 361
  • 1
  • 5
  • 14
1
2 3
30 31