Questions tagged [maximization]

53 questions
9
votes
1 answer

Why does optimx in R not give the correct solution to this simple nonparametric likelihood maximization?

Is optimx() providing incorrect solution or am I missing a simple point? Thank you! I am trying to maximize a very simple likelihood. This is a non-parametric likelihood in the sense that the distribution of F is not specified parametrically.…
r.student
  • 123
  • 2
  • 7
7
votes
1 answer

Solving a system of differential equations in R

I have a simple flux model in R. It boils down to two differential equations that model two state variables within the model, we'll call them A and B. They are calculated as simple difference equations of four component fluxes flux1-flux4, 5…
colin
  • 2,606
  • 4
  • 27
  • 57
4
votes
2 answers

Find a point that maximizes total distance from a set of points within a bounded area

Given a set of points p, I would like to find a point within the space b that bounds the region of p that is as far distant as possible from all points within p. This is in regards to implementing neighbor avoidance in a flocking simulation as per…
javanix
  • 1,270
  • 3
  • 24
  • 40
4
votes
1 answer

Python/Scipy: Find "bounded" min/max of a matrix

I think it is easiest to specify my problem, the generalized case is difficult to explain. Say I have a matrix a with dimensions NxMxT, where one can think about T as a time-dimension (to make the question easier). Let (n,m) be the indices through…
FooBar
  • 15,724
  • 19
  • 82
  • 171
3
votes
1 answer

Maximizing a likelihood function that contains pbivnorm

I have a likelihood function that contains a bivariate normal CDF. I keep getting values close to one for the correlation, even when the true value is zero. The R package sampleSelection maximizes a likelihood function that contains a bivaraite…
2
votes
0 answers

Quadratic programming maximization -- matrix not positive definite

I am trying to optimize the following simple objective function using the quadprog program in R: max_{x} x'Ax Most optimization problems I see use minimization, but if I simply use -A instead of A, I get an error that A is no longer positive…
2
votes
1 answer

LP: postive reduced costs corresponding to positive variables?

I have the next LP problem Maximize 1000 x1 + 500 x2 - 500 x5 - 250 x6 Subject To c1: x1 + x2 - x3 - x4 = 0 c2: - x3 + x5 = 0 c3: - x4 + x6 = 0 With these Bounds 0 <= x1 <= 10 0 <= x2 <= 15 0 <= x5 <= 15 0 <= x6 <= 5 By solving…
2
votes
1 answer

optimization algorithm for circular data

Background: I am interested in localizing a sound source from a suite of audio recorders. Each audio array consists of 6 directional microphones spaced evenly every 60 degrees (0, 60, 120, 180, 240, 300 degrees). I am interested in finding the…
2
votes
2 answers

constrained optimization in R setting up constraints

I have been trying to solve a constrained optimization problem in R using constrOptim() (my first time) but am struggling to set up the constraints for my problem. The problem is pretty straight forward and i can set up the function ok but am a bit…
andrewm4894
  • 1,451
  • 4
  • 17
  • 37
1
vote
2 answers

Given a spacing, finding the largest sum of numbers in an array

Say we have an array with some numbers in it, and we are given a value d (where d >= 1) that dictates a certain required index. How would we find the largest sum of values bounded by d. Here is an example: arr = [3000, 4000, 2000, 2500, 3500,…
user15676482
1
vote
0 answers

Identification of most frequent observation in numeric vector using minimal observation ranges

Problem: Say I have a numeric vector x of observations of some distance (in R). For instance it could be the throwing length of a number of people. x <- c(3,3,3,7,7,7,7,8,8,12,15,15,15,20,30) h <- hist(x, breaks = 30, xlim = c(1,30)) I then want…
user3375672
  • 3,728
  • 9
  • 41
  • 70
1
vote
1 answer

Traversing lists of 0, 1 with constraint

my apologies if this was answered somewhere, I tried searching but I do not know if this kind of problem has a specific name, so nothing came up in my search... I have a list of objects, and each of these objects can either be accepted or rejected.…
1
vote
1 answer

Maximize a function with constraints

I have the following function which i maximize using optim(). Budget = 2000 X = 4 Y = 5 min_values = c(0.3,0) start_values = c(0.3,0.5) max_values = c(1,1) sample_function <- function(z,Spend){ Output = (z[1]*X*Spend) + (z[2]*Y*Spend) …
CS.py
  • 43
  • 6
1
vote
1 answer

Production Maximization with Pulp

I am trying to solve a maximization problem using pulp in python. The problem is very simple, I have a demand and I want to maximize production. Production must be at least equal to the demand and the problem should also take into consideration the…
1
vote
1 answer

Find a value that gives the local maximum of a function that takes two input variables

I asked a similar question earlier but my question wasn't clear. Here's another attempt. Suppose you have the following function that takes two inputs, a and b. inputs <- c(a, b) y <- function(inputs) { a <- inputs[1] b <- inputs[2] output <-…
johnny
  • 571
  • 4
  • 14
1
2 3 4