Questions tagged [maximization]

53 questions
0
votes
1 answer

Unique element pairing between two vectors maximizing the overall sum

I have a data frame that contains all the possible combinations between the elements of two vectors and for each combination I have a corresponding score. I was trying to find an efficient way to find the subset of unique pairs with unique elements…
Marius
  • 990
  • 1
  • 14
  • 34
0
votes
0 answers

R's optimx doesn't respect my constraint

I am working on a constrained optimization problem. I have a number of variables which must sum to 100. I have followed the work here Why does optimx in R not give the correct solution to this simple nonparametric likelihood maximization? and am…
Megan E.
  • 317
  • 1
  • 3
  • 7
0
votes
0 answers

Python: How can I save indexes of looped maximizer arguments in a vector?

I have a code like this: for i_iter in range(0,max_iter): for j_now in range(0,400): V[j_now] = np.max(Matrix400_400[:,j_now] + beta * V_old) V_old = deepcopy(V) and I would like to save the indices of the maximizers w.r.t…
0
votes
2 answers

Iteration / Maximization Excel solver in R

I am trying to do a maximization in R that I have done previously in Excel with the solver. The problem is that I don't know how to deal with it (i don't have a good level in R). let's talk a bit about my data. I have 26 Swiss cantons and the Swiss…
S.Tripod
  • 1
  • 2
0
votes
0 answers

Maximization from an implicit equation's plot in Python

I was solving a problem in which I needed to graphic this: r = (16442.21*(((np.e**(-10468.04/T))*(P1.5))/((2-X)**1.5))*(((1-X)**2.5)/X))-17374.99*(((np.e(-23855.06/T))(Fo0.2)((2-X)**0.5))/(P0.5))*(X/((1-X)**1.3)) The graphic that I needed was X(T),…
0
votes
1 answer

Matlab: Maximization of sum of logarithms

I have the following vectors/matrices: a --> nx1 b --> nx1 C --> nxn Given I know a and C, I want to maximize the following in Matlab by varying vector b: S = a(1)*log(sum(b.*C(:,1),1))+...+a(n)*log(sum(b.*C(:,n),1)) So each element of the sum S…
rock3000
  • 11
  • 1
0
votes
1 answer

Maximization linear system with three variables

Maximize C= 528r + 492s + 348wsubject to: 1) r + s + w ≥ 12 2) r ≤ 4 --> r + 0 + 0 ≤ 4 3) w ≥ 3s --> 0 – 3s + 1w ≥0 I can't find any code examples online where I can maximize using three variables with inequalities. The closest I found was…
0
votes
0 answers

R: too long computation of likelihood function for conditional logit model

I am trying to maximize loglikelihood function to get coefficients for conditional logit model. I have a big data frame with about 9M rows (300k choice sets) and about 40 parameters to be estimated. It looks like this: ChoiceSet Choice SKU Price…
Vitaliy Poletaev
  • 113
  • 1
  • 1
  • 8
0
votes
1 answer

Linear programming maximization code in MATLAB

How to solve the linear programming maximization problem that contains both <= and >= equations? For example here's a case: Maximize: z = c1x1 + c2x2 + c3x3 Subject to: a1x1 + a2x2 + a3x3 <= b1 a4x1 + a5x2 + a6x3 <= b2 x1 >= d1 x2 >= d2 x3 >=…
0
votes
1 answer

Maximizing variance of bounded variables

Let x_1, ..., x_i,..., x_p be p real numbers such that 0 <= x_i <= b for all i. That is, each x_i can take any value between 0 and b. I'd like to find the values of {x_i}'s that maximize the variance among them. Do you have any hints? I'd like to…
BZ Linden
  • 13
  • 2
0
votes
0 answers

Implementation of EM algorithm for Gaussian Mixture Models using Matlab

Using the EM algorithm, I want to train a Gaussian Mixture model with four components on a given dataset. The set is three dimensional and contains 300 samples. The problem is that after about 6 rounds of the EM algorithm, the covariance matrices…
evolved
  • 1,850
  • 19
  • 40
0
votes
0 answers

XOR maximization using a trie

I am trying to solve this question- Given an array A of unsigned 32-bit ints, choose two in-bounds indices i, j so as to maximize the value of A[i] ^ A[j], where ^ is the bitwise XOR (exclusive OR) operator. Example Input: 4 2 0 13…
Alpa8
  • 470
  • 4
  • 12
0
votes
1 answer

Z3 Maximise and Conflicts

I have the following Z3 problem. When the code here is executed, how shall we expect, or how is it defined, that the conflicting optimisation goals will perform? (declare-const x Bool) (declare-const y Bool) (declare-const z Bool) (maximize( + …
d'alar'cop
  • 2,357
  • 1
  • 14
  • 18
0
votes
1 answer

How to maximize a JFrame including (!) task bar

I see many questions about how to maximize a JFrame without hiding the task bar, but in my case the question is just the opposite. I'm trying to use all of the screen including the task bar in order to have more room for my application. Why does my…
0
votes
1 answer

Apply a vector to an optimize function in R

Hoew can I apply vector of observations to find the local maximum between each observation in R. I do the following code, but according to plot the result should be just two local maximum. How can I do this in R? x = c(0.0000005, 0.1578947,…
rose
  • 1,971
  • 7
  • 26
  • 32