Skip to main content

Getting issues in creating Support vector machine robust optimization model for uncertainty in Label, Need help

Answered

Comments

5 comments

  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Manju,

    Warning: Model contains large matrix coefficients Warning: Model contains large rhs Consider reformulating model or setting NumericFocus parameter to avoid numerical issues.

    I would start with the following resources, then if there are further questions we can address them.

    If you see any warnings in your log relating to the NumericFocus parameter then I would experiment with that parameter as suggested.

    - Riley

    0
  • Manju Bala
    Collaborator
    Curious

    Most of the time i am getting weight vectors as 0 in my output for this model. I am not able to find out the problem. Can you please guide me.  Refer to below output:

    Set parameter NumericFocus to value 3
    
     
     
    Gurobi Optimizer version 10.0.2 build v10.0.2rc0 (win64)
    
    CPU model: 12th Gen Intel(R) Core(TM) i7-1250U, instruction set [SSE2|AVX|AVX2]
    Thread count: 10 physical cores, 12 logical processors, using up to 12 threads
    
    Optimize a model with 560 rows, 412 columns and 4640 nonzeros
    Model fingerprint: 0xef4502b4
    Variable types: 252 continuous, 160 integer (160 binary)
    Coefficient statistics:
      Matrix range     [4e-03, 1e+07]
      Objective range  [1e+00, 5e+00]
      Bounds range     [1e+00, 1e+00]
      RHS range        [1e+00, 1e+07]
    Presolve time: 0.00s
    Presolved: 560 rows, 412 columns, 4640 nonzeros
    Variable types: 252 continuous, 160 integer (160 binary)
    
    Root relaxation: objective 4.800000e+01, 231 iterations, 0.00 seconds (0.00 work units)
    
        Nodes    |    Current Node    |     Objective Bounds      |     Work
     Expl Unexpl |  Obj  Depth IntInf | Incumbent    BestBd   Gap | It/Node Time
    
    *    0     0               0      48.0000000   48.00000  0.00%     -    0s
    
    Explored 1 nodes (231 simplex iterations) in 0.08 seconds (0.01 work units)
    Thread count was 12 (of 12 available processors)
    
    Solution count 1: 48 
    
    Optimal solution found (tolerance 1.00e-04)
    Best objective 4.800000000000e+01, best bound 4.800000000000e+01, gap 0.0000%
    Accuracy on the test set: 0.2
    Optimal Weight vector (w): [0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]
    Optimal Bias (b): -1.0
    Optimal q: 2.0
    Optimal xi: [0. 0. 0. 2. 2. 2. 0. 0. 0. 0. 0. 0. 0. 2. 0. 0. 0. 0. 0. 0. 0. 2. 0. 0.
     0. 0. 0. 0. 0. 0. 2. 0. 2. 0. 2. 2. 0. 0. 2. 0. 2. 0. 0. 0. 0. 0. 0. 0.
     0. 0. 0. 2. 0. 0. 0. 2. 2. 2. 0. 2. 0. 0. 0. 2. 0. 0. 0. 0. 0. 0. 0. 0.
     2. 2. 0. 0. 0. 0. 0. 0.]
    Optimal ri: [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
     0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
     0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.
     0. 0. 0. 0. 0. 0. 0. 0.]
    Optimal si: [-0.00000000e+00 -0.00000000e+00 -0.00000000e+00  1.99999999e-07
      1.99999999e-07  1.99999999e-07 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00  1.99999999e-07 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00  1.99999999e-07 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00  1.99999999e-07 -0.00000000e+00
      1.99999999e-07 -0.00000000e+00  1.99999999e-07  1.99999999e-07
     -0.00000000e+00 -0.00000000e+00  1.99999999e-07 -0.00000000e+00
      1.99999999e-07 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00  1.99999999e-07
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00  1.99999999e-07
      1.99999999e-07  1.99999999e-07 -0.00000000e+00  1.99999999e-07
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00  1.99999999e-07
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00
      1.99999999e-07  1.99999999e-07 -0.00000000e+00 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00 -0.00000000e+00 -0.00000000e+00]
    Optimal ti: [ 1.99999999e-07  1.99999999e-07  1.99999999e-07 -0.00000000e+00
     -0.00000000e+00 -0.00000000e+00  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07  1.99999999e-07  1.99999999e-07
      1.99999999e-07 -0.00000000e+00  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07  1.99999999e-07  1.99999999e-07
      1.99999999e-07  3.99999999e-07  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07 -0.00000000e+00  1.99999999e-07
     -0.00000000e+00  1.99999999e-07 -0.00000000e+00 -0.00000000e+00
      1.99999999e-07  1.99999999e-07 -0.00000000e+00  1.99999999e-07
     -0.00000000e+00  1.99999999e-07  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07  1.99999999e-07 -0.00000000e+00
      1.99999999e-07  1.99999999e-07  1.99999999e-07 -0.00000000e+00
     -0.00000000e+00  3.99999999e-07  1.99999999e-07 -0.00000000e+00
      1.99999999e-07  1.99999999e-07  1.99999999e-07 -0.00000000e+00
      1.99999999e-07  1.99999999e-07  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07  1.99999999e-07  1.99999999e-07
     -0.00000000e+00 -0.00000000e+00  1.99999999e-07  1.99999999e-07
      1.99999999e-07  1.99999999e-07  1.99999999e-07  1.99999999e-07]
    Optimal phi: [2. 2. 2. 0. 0. 0. 2. 2. 2. 2. 2. 2. 2. 0. 2. 2. 2. 2. 2. 2. 2. 4. 2. 2.
     2. 2. 2. 2. 2. 2. 0. 2. 0. 2. 0. 0. 2. 2. 0. 2. 0. 2. 2. 2. 2. 2. 2. 2.
     2. 2. 2. 0. 2. 2. 2. 0. 0. 4. 2. 0. 2. 2. 2. 0. 2. 2. 2. 2. 2. 2. 2. 2.
     0. 0. 2. 2. 2. 2. 2. 2.]
    
     
     
     
    0
  • Manju Bala
    Collaborator
    Curious

    there should be weight vectors assigned so that it can classify the data with help of hyperplane but if it give weight vector 0 it cannot classify. Thats the problem i am facing in this model.

    0
  • Manju Bala
    Collaborator
    Curious

    I am not strong in Mathematic and i got this topic for my master thesis. I am stuck now. I reqauest you to kindly help.

    0
  • Riley Clement
    Gurobi Staff Gurobi Staff

    Hi Manju,

    Perhaps the following article will help:

    How do I diagnose a wrong solution? 

    - Riley

    0

Please sign in to leave a comment.