Community Profile

photo

Alan Weiss

MathWorks

Last seen: Today Active since 2011

I write documentation for MATLAB mathematical toolboxes, primarily optimization. I have also written documentation for PDE, statistics, symbolic math, and econometrics.

My pre-MathWorks job was with Bell Labs, primarily in mathematical models of data traffic, with a strong interest in parallel computation and in rare events (large deviations).

I do not provide private consulting. If you have a question, please ask on a public forum such as MATLAB Answers.

Statistics

All
  • Ace
  • Revival Level 3
  • First Submission
  • 36 Month Streak
  • Thankful Level 3
  • Knowledgeable Level 5
  • First Answer
  • Solver

View badges

Content Feed

Answered
Supplying gradient for the subset of parameters
The short answer is no: there is no provision to provide analytic gradients for a subset of the parameters. I cannot think of a ...

7 jours ago | 0

| accepted

Answered
Is there a way to specify objective and constraint gradients when doing nonlinear optimization in the problem-based framework?
The problem-based approach calculates and uses gradients automatically for supported functions. However, to include gradients of...

9 jours ago | 0

| accepted

Answered
surrogateopt: output function
Try this. lb = [-3 -3]; ub = -lb; opts = optimoptions('surrogateopt','OutputFcn',@listout); obj = @(x)100*(x(2) - x(1)^2)^2 ...

9 jours ago | 1

| accepted

Answered
Passing values to PSO options
It works for me. Here is a little test script: fun = @(x)x(1)*exp(-norm(x)^2); lb = [-5,-5]; ub = -lb; opts = optimoptions('...

10 jours ago | 1

Answered
Do I need to normalize input parameters to Particle Swarm Optimization?
You don't usually need to scale your parameters, but many problems are solved more reliably if you do. See Center and Scale Your...

10 jours ago | 0

Answered
Possible bug with coneprog?
I think that you have identified a problem with the default options for trajectory problems: the optimality tolerance should be ...

13 jours ago | 0

| accepted

Answered
How can I save the output parameters for each step using lsqnonlin function?
Write an output function to save the values, either to a workspace variable or to a file. For syntax details, see Output Functio...

15 jours ago | 0

| accepted

Answered
I'm trying to apply conditional constraints on two variable with bayesopt
I think that you set the wrong name-value argument for your constraint function. bayesopt thinks that you are using an XConstrai...

16 jours ago | 0

Answered
parameter optimization in function
Try putting the following code at the end of yours: [dfinal,resnorm] = fminbnd(@(damping)trytofit(damping,x0,Acc_clean),0.00002...

27 jours ago | 0

Answered
Conversion from symbolic to matlabFunction and writing the result to a file
Would it be possible to do the following: create a multiplier variable m in addition to the other variables? syms Dm0 Ds0 Ds1 d...

28 jours ago | 0

Answered
Using Multistart in an unconstrained optimization
This type of problem is well-known to be numerically touchy, and to have multiple local minima. You really should give bounds, t...

29 jours ago | 0

| accepted

Answered
How does using same variables for both objective and constraints affect optimization results?
By changing the objective you also change the steps that fmincon takes to solve your problem. You should not be surprised that t...

environ un mois ago | 0

Answered
Power balance in a microgrid
Usually the way to include this type of equality constraint is to use the approach shown in Integer and Logical Modeling. For an...

environ un mois ago | 0

Answered
GA doesn't proceed to the next generation
Thank you for providing a complete problem, including all supportng function files. My main question is, why are you trying to ...

environ un mois ago | 0

Answered
consider Z = x*y, a highly nonlinear relationship in MILP
Usually, when you have a MILP then you don't have variables multiply each other unless one of the variables is binary. For this ...

environ un mois ago | 0

Answered
minimize linear objective function with quadratic constraint
Again, I am not sure that I understand you correctly. I do not know what your optimization variables are, and while you say that...

environ un mois ago | 0

Answered
coneprog: Infeasibilities are satisfied in last step from iterative display but exitflag is still -2 (NoFeasiblePointFound)
I think that you have a misunderstanding about what the iterative display shows. For example, consider the documentation example...

environ un mois ago | 0

| accepted

Answered
Changing optimization technique for Gaussian process regression model
I answered a similar question recently: https://www.mathworks.com/matlabcentral/answers/1751170-svm-and-knn-hyperparameter Alan...

environ un mois ago | 0

| accepted

Answered
Not reproducibility in Random Forest with Hyperparameters
In creating your template for training, did you set the Reproducible name-value argument to true? Also, for your parallel option...

environ un mois ago | 1

| accepted

Answered
I want to solve this problem
You can use secondordercone by making a new variable , a linear objective , and another second-order cone constraint: Minimize ...

environ 2 mois ago | 1

Answered
SVM and KNN hyperparameter
Is this what you are looking for? fitcsvm hyperparameter options fitcknn hyperparameter options Alan Weiss MATLAB mathematic...

environ 2 mois ago | 0

Answered
minimize linear objective function with quadratic constraint
I'm not sure that I understand you correctly. If is an array, then perhaps you are looking for z = zeros(size(y - yhat)); m1 ...

environ 2 mois ago | 0

Answered
SVM training with hyperparameter "CVPartition"
I think that you have a misunderstanding about what these options do. Look in the first paragraph of the documentation of Hyperp...

2 mois ago | 0

| accepted

Answered
Genetic Algorithm - Your fitness function must return a scalar value solution?
I am not sure what you are trying to do. Your objective function has 661 components. Are you trying to solve for 661 different v...

2 mois ago | 0

| accepted

Answered
how can I automaticlly optimize hyperparameter for lasso regression. I could not set the function input as variable.
As stated in the documentation, you cannot set Alpha = 0. The Alpha parameter must be strictly positive (and no more than 1). A...

3 mois ago | 0

| accepted

Answered
What variable type is "Population" in a Genetic Algorthim and how to store individuals with long genomes?
Yes, it is possible to use ga with a custom population. For an example see Custom Data Type Optimization Using the Genetic Algor...

3 mois ago | 0

| accepted

Answered
Simulink using with fmincon
Perhaps you can look at some worked examples and figure it out: Using fminimax with a Simulink Model lsqnonlin with a Simulink...

3 mois ago | 0

Answered
I use fcn2optimexpr,but I got an error for scalar optimizationexpression
You had a misunderstanding. The A variable should be a scalar, not a vector. All issues stemmed from that one misunderstanding. ...

3 mois ago | 0

| accepted

Answered
how can I optimize a neural network with multiple outputs using the Genetic Algorithm ?
Generally speaking, optimization algorithms try to minimize a single scalar function of the input variables . I don't know what...

3 mois ago | 1

Answered
how can i validate my optimization algorithm?
Your objective function is smooth. Therefore, you should not be using particleswarm or ga or simulannealbnd, but instead should ...

3 mois ago | 0

Load more