BookmarkSubscribeRSS Feed
Alexa_Rau
Calcite | Level 5

Hello guys,

 

I need your help in implementing the Evolutionary Solver from Excel (or similar) in SAS.

I have to optimize the confusion matrix and Matthew correlation coeff.

In my table I have the predicted condition which is affected by the solver condition.

 

My table

A           B           ln(A)    ln(B)     Predicted_cond  Observed_Condition

1.02      0.01       0.02    -4.61         1                      1

1.03      0.01      0.03     -4.61         1                      0

1.01      0.001      0.01     -6.91         0                    0

1.01      0.001      0.01     -6.91         0                    1

1.13      0.001      0.12     -6.91         0                    0

1           0.001      0           -6.91         0                    0

1.37       0.01      0.31     -6.91        1                    0

1.16      0.001     0.15     -6.91         0                    1

 

predicted_cond=1 if A>exp(avg(alpha)) and B>exp(avg(beta)) 

Based on predicted and observed condition Matthew Correlation Coefficient (MCC) is computed.

My objective is to maximize MCC, taking in account that predicted condition is dynamic.

Values to be change in order to maximize the MCC are exp(avg(alpha)) and exp(avg(beta)) .

 

 I saw that proc GA has the capability to solve this, but I don't figure out how to implement it.

 

Thanks,

 

 

1 REPLY 1
Rick_SAS
SAS Super FREQ

Since you mention PROC GA, which implements a genetic algorithm, I will mention that PROC IML also has an implementation of a genetic algorithm. There are many examples in the doc.

sas-innovate-wordmark-2025-midnight.png

Register Today!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9. Sign up by March 14 for just $795.


Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 1326 views
  • 0 likes
  • 2 in conversation