Home About Us Contact Join Associates
Products Downloads Purchasing Editions
 

Logistic Regression Framework

Making Categorical and Probabilistic Predictions

 
 
 

Making Categorical and Probabilistic Predictions

The goal in Logistic Regression is to assign probabilities to model scores, creating a reliable ranking system that can be used straightaway to evaluate the risk involved in financial and insurance applications, to rank potential respondents in a marketing campaign, or to evaluate the risk of contracting a disease.

The Logistic Regression Framework of GeneXproTools builds on the model scores it generates with its Evolutionary Algorithms and then applies the canonical Logistic Regression Technique to estimate probabilities for each model score. And once you know the probability of an event, you can also make categorical predictions and consequently infer easily crisp confusion matrixes.

Thus, with its new Logistic Regression Framework, GeneXproTools offers a highly robust hybrid system in which sophisticated multivariate nonlinear models are easily created by evolution and then empowered by traditional statistical modeling techniques.

GeneXproTools scores new cases using the Javascript code it generates for your model, but also adds (internally) the logistic regression equation with its slope and intercept to the code in order to evaluate the probabilities.


 

In order to score new cases with the Scoring Engine of GeneXproTools you need to:

  1. Go to the Scoring Panel and tick the Logistic Regression check box.
    In case you haven’t yet evaluated the logistic regression parameters (the slope and intercept of the logistic regression model) in the Logistic Regression Window, GeneXproTools prompts you to go there so that it can perform these calculations.
  2. Enter the path for the scoring data or connect to the database where your new cases are kept.
  3. Enter the path for the file in which the scoring results will be saved.
    If you also want to include the input values in the output file, you have to choose Independent Variables Plus Output in the Content combo box.
  4. Press the Start button to score your new cases.
    GeneXproTools shows the scoring results for the first 2000 cases in the Scoring Table of the Scoring Panel for a quick preview. All the scoring results, however, are saved to file. They include, besides the values of the input variables, the model output, probability[1] and probability[0], and the most likely class.

 

The Scoring Engine of GeneXproTools allows you to score as many new cases as you wish without leaving the GeneXproTools environment. But you can also score your new cases outside GeneXproTools using the code it automatically generates for your model in any of the 15 programming languages it supports. Note, however, that you’ll have to include the logistic regression equation with its slope and intercept so that you can compute the probabilities. For instance, to the C++ code GeneXproTools generates for your models, you could add the following code (highlighted in bold dark brown):

#include <math.h>

double gepModel(double d[], double* probabilityOne, double* probabilityZero, int* mostLikelyClass);

double gepModel(double d[], double* probabilityOne, double* probabilityZero, int* mostLikelyClass)
{
    *probabilityOne = 0.0;
    *probabilityZero = 0.0;
    *mostLikelyClass = 0;


    const double SLOPE = 2.10292613251647E-03;
    const double INTERCEPT = 0.169988753428363;

    const double G2C1 = -5.02304;

    double dblTemp = 0.0;

    dblTemp = (d[0]+pow(atan(pow(((d[3]+d[2])+d[4]),3)),3));
    dblTemp += ((d[0]+(sin((pow(G2C1,2)*(d[2]-d[4])))*d[2]))+d[2]);
    dblTemp += (d[0]+d[4]);

    *probabilityOne = 1.0/(1.0 + exp(-(SLOPE * dblTemp+INTERCEPT)));
    *probabilityZero = 1.0 - (*probabilityOne);

    *mostLikelyClass = ((*probabilityOne) >= 0.5 ? 1 : 0);


    return dblTemp;
}

 
Logistic Regression Framework



 
GeneXproTools 4.0


   


GeneXproServer 1.0



Tutorials


Quick Tour Videos





Gene Expression Programming


Subscribe to the GEP-list
Enter 2 + 32 =

 
 
 
 
     
  Join Associates | Terms of Use | Privacy Statement

 
 

Copyright (c) 2000-2011 Gepsoft Ltd. All rights reserved.