discipulus - decompiled program interface

21
1 Discipulus Decompiled Program Interface Discipulus 5.0 Decompiled Program Interfaces By Frank D. Francone Discipulus, and RML are trademarks of Register Machine Learning Technologies, Inc. Copyright 1998-2010 Register Machine Learning Technologies, Inc.

Upload: aadbosma

Post on 26-Dec-2015

10 views

Category:

Documents


1 download

DESCRIPTION

discipulus

TRANSCRIPT

Page 1: Discipulus - Decompiled Program Interface

1

Discipulus Decompiled Program Interface

Discipulus 5.0

Decompiled Program Interfaces

By Frank D. Francone

Discipulus, and RML are trademarks of Register Machine Learning Technologies, Inc.

Copyright 1998-2010 Register Machine Learning Technologies, Inc.

Page 2: Discipulus - Decompiled Program Interface

2

Discipulus Decompiled Program Interface

Copyright 1998-2010, Register Machine Learning Technologies, Inc.

Information in this document is subject to change without notice. The software described in this document isfurnished under a license agreement. The software may be used and copied only in accordance with the termsof those agreements. No part of this publication may be reproduced, stored, in a retrieval system, ortransmitted in any form or any means electronic or mechanical, including photocopying and recording for anypurpose other than the purchaser’s personal use without the written permission of Register Machine LearningTechnologies, Inc.

Register Machine Learning Technologies, Inc.

7606 S. Newland St. Littleton, CO 80128

www.rmltech.com

Logo design by Joann Kalmus-Leonard

Page 3: Discipulus - Decompiled Program Interface

3

Discipulus Decompiled Program Interface

Introduction This document describes the declaration of all functions that are decompiled by Discipulus. Discipulus Evolved Functions are one way to apply a program or team evolved by Discipulus to new data. There is no difference between a best team interface and a best program interface.

A Discipulus Evolved Function is just that, a function in one of several programming languages that encapsulates a Discipulus evolved program or team. Once created, you may embed a Discipulus Evolved Function into your code and call it as an ordinary function.

In brief summary, there are four different types of Discipulus Evolved Functions. Discipulus creates an Evolved Function type that is appropriate for the type of fitness function you used to train the evolved program or team that you are converting to an Evolved Function. Thus, there is a different function interface for:

1. Regression Problem Types

2. Classification Problem Types

3. Ranking Problem Types

4. Logistic Regression Problem Types

Decompiled programs for each problem type, there are five different formats in which you may export decompiled programs:

1. C

2. C Assembler

3. C#

4. Java

5. Pascal (Delphi)

(For ranking functions, no C Assembler decompilation is available.)

Page 4: Discipulus - Decompiled Program Interface

4

Discipulus Decompiled Program Interface

Creating Decompiled Best Programs. You create decompiled best programs from Discipulus from the Interactive Evaluator as follows:

Click on the Save Decompiled Program (circled in orange) button. From the resulting window, select the language (circled in magenta) you wish to compile to and the path and file name for the decompiled program.

Creating Decompiled Best Teams. You create decompiled best programs from Discipulus from the Interactive Evaluator as follows:

From the Team Solutions tab of the Results window, click the Save Code button (circled in orange). From the Save Decompiled Programs window that pops up, select the computer language (circled in magenta) and location for the save.

Page 5: Discipulus - Decompiled Program Interface

5

Discipulus Decompiled Program Interface

Table of Contents Introduction......................................................................................................................... 3

Table of Contents................................................................................................................ 5

1 Types of Discipulus Decompiled Evolved Functions................................................. 6

2 Regression Function Interfaces................................................................................... 7

2.1 Description of Input, Outputs, and Function Return........................................... 7

2.2 C Evolved Function Regression Interface .......................................................... 7

2.3 C Assembler Evolved Function Regression Interface ........................................ 7

2.4 C# Evolved Function Regression Interface ........................................................ 8

2.5 Java Evolved Function Regression Interface...................................................... 8

2.6 Pascal/Delphi Evolved Function Regression Interface....................................... 9

3 Classification Function Interfaces............................................................................. 10

3.1 Description of Input, Outputs, and Function Return......................................... 10

3.2 C Evolved Function Classification Interface .................................................... 11

3.3 C Assembler Evolved Function Classification Interface .................................. 11

3.4 C# Evolved Function Classification Interface .................................................. 12

3.5 Java Evolved Function Classification Interface................................................ 12

3.6 Pascal/Delphi Evolved Function Classification Interface................................. 13

4 Ranking Functions Interfaces ................................................................................... 15

4.1 Description of Input, Outputs and Function Return.......................................... 15

4.2 C Evolved Function Ranking Interface............................................................. 16

4.3 C Assembler Evolved Function Ranking Interface .......................................... 17

4.4 C# Evolved Function Ranking Interface........................................................... 17

4.5 Java Evolved Function Ranking Interface ........................................................ 18

4.6 Pascal/Delphi Evolved Function Ranking Interface ......................................... 19

5 Logistic Function Interfaces ..................................................................................... 21

Page 6: Discipulus - Decompiled Program Interface

6

Discipulus Decompiled Program Interface

1 Types of Discipulus Decompiled Evolved Functions Discipulus can create callable code functions (“Evolved Functions”) that encapsulate the programs or teams evolved by Discipulus. These Evolved Functions are available in several different programming languages.

There are four different types of callable code function interfaces, each designed to handle different types of the fitness functions included in Discipulus:

1. Regression Function Interfaces. See: Regression Function Interfaces. The Regression Function Interfaces are Discipulus Evolved Functions used for evolved programs and teams that were evolved with:

a. “Minimum Squared Error”

b. “Absolute Error”

2. Classification Function Interfaces. See: Classification Function Interfaces. The Classification Function Interfaces are Discipulus Evolved Functions for evolved programs and teams that were evolved with the Classification fitness function.

3. Ranking Function Interfaces. See Ranking Functions . The Ranking Function Interfaces are Discipulus Evolved Functions for evolved programs and teams that were evolved with:

a. “Best ROC Curve”

b. “Best ROC Curve then Cost”

c. “Best ROC Curve (Compare)”

d. “Minimum Cost”

4. Logistic Regression Function Interfaces. See: Logistic Function Interfaces. The Logistic Regression Function Interfaces are Discipulus Evolved Functions for evolved programs and teams that were evolved with the Logistic-Regression fitness function.

Page 7: Discipulus - Decompiled Program Interface

7

Discipulus Decompiled Program Interface

2 Regression Function Interfaces This section describes the decompiled program interface for Discipulus evolved programs that were evolved with one of the two regression problem-type fitness functions.

2.1 Description of Input, Outputs, and Function Return The inputs, outputs and function return values mean the same thing, regardless of the language you decompiled to. They are:

Inputs The inputs, v, are contained in an array, v, of inputs as float or double precision values. The size of v is equal to the number of inputs used in Discipulus during training. The inputs must be ordered and preprocessed exactly as they were ordered and preprocessed during training.

Function Return Value The Return value is a float or double precision value and contains the prediction of the evolved program for the vector of values contained in the input vector, v.

2.2 C Evolved Function Regression Interface Declaration float DiscipulusCRegressionFunction(float v[])

Example A C code example for calling a Discipulus regression function that was evolved with three input values follows: float v[]={0.5,20.3,15.0};

float result;

result=DiscipulusCRegressionFunction(v);

2.3 C Assembler Evolved Function Regression Interface Declaration float DiscipulusAssemblerFunction (float v[])

Note that this is an ordinary C function. Inside, the function contains Assembler code. But that makes no difference in how you call it.

Example A C Code example of calling an evolved Assembler function for 3 input values follows: float v[]={0.5,20.3,15.0};

float result;

result=DiscipulusAssemblerRegressionFunction(v);

Page 8: Discipulus - Decompiled Program Interface

8

Discipulus Decompiled Program Interface

2.4 C# Evolved Function Regression Interface Declaration public float DiscipulusCSharpRegressionFunction(float[] v)

Example A function decompiled into C# code is saved as class within namespace Discipulus. The filename of *.cs file reflects the name of the class, The name is derived from the name provided to Discipulus while saving the decompiled program. An example for calling a Discipulus C# regression function that was evolved with three input values follows:

1. Include the class to your compilation unit using using directive in the very beginning of your *.cs file: using Discipulus;

2. Prepare the input vector of parameters: float[] inputVector = { 0.5F, 20.3F, 15.0F };

3. Call the function: Class_Name clReg = new Class_Name()

double result = clReg.DiscipulusCSharpRegressionFunction (inputVector);

2.5 Java Evolved Function Regression Interface Declaration public float DiscipulusJavaRegressionFunction(float [] v)

Example Java language requires a method to be part of certain Java class. Discipulus decompiles its solution to a package com.rmltech.EvolvedSolution. The name of the class is derived from the file name gives during decompilation process.

A Java code example for calling a Discipulus Java regression function that was evolved with three input values follows:

1. Import generated class in the beginning of your *.java source file: import com.rmltech.EvolvedSolution;

2. Prepare input vector: float [] inputVector = {0.5f, 20.3f, 15.0f};

3. Call the function: Class_Name clReg = new Class_Name()

double result = clReg.DiscipulusJavaRegressionFunction(inputVector);

Page 9: Discipulus - Decompiled Program Interface

9

Discipulus Decompiled Program Interface

2.6 Pascal/Delphi Evolved Function Regression Interface Declaration Function DiscipulusPascalRegressionFunction(v: array of double):

Double;

Example The Delphi/Pascal function is wrapped into a unit bearing a name that is exactly the same as the name specified during decompilation process. The unit similar to this is created: unit Unit2;

function DiscipulusPascalRegressionFunction (v: array of Double): Double;

interface

An example for calling a Discipulus Pascal regression function that was evolved with three input values requires:

1. Adding generated unit to uses list: uses …, Unit2, …;

2. Preparing the array with data that are to be passed to decompiled function: var

v: array of double; // declaring array

. . .

SetLength(v, 3); // set array to be 3 element long

v[0] := 0.5; // init first element

v[0] := 20.3; // init second element

v[0] := 15.0; // init third element

3. Invoking the function: var

regResult: double;

regResult := DiscipulusPascalRegressionFunction(v);

Page 10: Discipulus - Decompiled Program Interface

10

Discipulus Decompiled Program Interface

3 Classification Function Interfaces Discipulus will create code functions encapsulating your evolved program or team using a Classification Function Interface when your program or team was evolved using the Classification fitness function provided in Discipulus.

3.1 Description of Input, Outputs, and Function Return Inputs The inputs, v, are contained in an array, v, of inputs as float (or double precision) values. The size of v is equal to the number of inputs used in Discipulus during training. The inputs must be ordered and preprocessed exactly as they were ordered and preprocessed during training.

Outputs

• Threshold: The threshold value that was used during evolution to determine if the actual output from the evolved program was in class one or class zero.

• ActualOutput: Threshold value plus number of team members that predict class 1 minus number of team members that predict class 0. (Note that a single evolved program is a team of 1. So with a Threshold of 0.5, the output for class one would be 1.5 and the output for class zero would be -0.5.)

• NumberOfExamples: Number of examples the following confidence value was calculated on.

• Confidence: The confidence value for the calculated class prediction. This represents the strength of our belief that the class of the given input vector, v, that is returned from this function is correct. Thus, if this function returns Class = 1.0 and Confidence = 0.95, that means we are 95% confident that the vector, v, is in Class 1.

• Class1Votes: Number of team members that predict class 1 for the input vector v.

• Class0Votes: Number of team members that predict class 0 for the input vector v.

Function Return Value Discipulus Evolved Functions for classification return 1.0 if they predict the class of the data in v is class 1. They return 0.0 if the prediction is class 0.

The Java decompilations return values are different than the other languages. The function return there is a class called ClassificationResult declared in the decomplilation. You access both outputs and return values by way of calls to the methods of that class. What is the return value for other languages is the getResult method of the ClassificationResult class in Java.

Page 11: Discipulus - Decompiled Program Interface

11

Discipulus Decompiled Program Interface

3.2 C Evolved Function Classification Interface Declaration float DiscipulusCClassificationFunction(float v[], float

&Threshold, float &ActualOutput, long &NumberOfExamples, double &Confidence, int &Class1Votes, int &Class0Votes)

Example An example of calling this interface for a C Function evolved by Discipulus using three inputs follows:

float v[]={0.5,20.3,15.0};

float Threshold;

float ActualOutput;

long NumberOfExamples;

double Confidence; int Class 1Votes; int Class0Votes; float result;

result=DiscipulusCFunction(v,Threshold,ActualOutput, NumberOfExamples,Confidence,

Class1Votes,Class0Votes);

3.3 C Assembler Evolved Function Classification Interface Declaration The name is DiscipulusAssemblerFunctione

float DiscipulusAssemblerClassificationFunction(float v[], float &Threshold, float &ActualOutput, long &NumberOfExamples, double &Confidence, int &Class1Votes, int &Class0Votes)

Example An example for calling the interface where the function was evolved with three inputs follows: float v[]={0.5,20.3,15.0};

float Threshold;

float ActualOutput;

long NumberOfExamples;

double Confidence;

int Class 1 Votes;

int Class0 Votes;

float result;

Page 12: Discipulus - Decompiled Program Interface

12

Discipulus Decompiled Program Interface

result=DiscipulusAssemblerFunction(v, Threshold, ActualOutput, NumberOfExamples, Confidence, Class1 Votes,Class0 Votes);

3.4 C# Evolved Function Classification Interface Declaration

float DiscipulusCSharpClassificationFunction(float[] v, ref float Threshold, ref float ActualOutput,ref long NumberOfExamples, ref double Confidence, ref int Class1Votes, ref int Class0Votes)

Example Here is an example of calling a Discipulus C# Classification function for an evolved program that was trained with three inputs:

using Discipulus;

float[] inputVector = { 0.5F, 20.3F, 15.0F };

float Threshold =0, ActualOutput=0;

long NumberOfExamples=0;

double Confidence=0;

int Class1Votes=0, Class0Votes=0;

Class_Name clClass = new Class_Name()

float result = clClass.DiscipulusCSharpClassificationFunction(v, ref Threshold, ref ActualOutput, ref NumberOfExamples, ref Confidence, ref Class1Votes, ref Class0Votes);

3.5 Java Evolved Function Classification Interface Declaration public ClassificationResult

discipulusJavaClassificationFunction(float[] v)

(Note: The ClassificationResult class is declared in the decompiled program.)

Example Java, unlike other languages does not provide for variable passing by reference. Therefore a Discipulus decompiled program provides a special inner class that acts as container for “output values” like Threshold, ActualOutput, NumberOfExamples, Confidence, Class1Votes, Class0Votes. This class name is ClassificationResult. Here is an example of calling a Discipulus Java Classification function for an evolved program that was trained with three inputs (let’s assume that we saved the decompiled program to Class_Name.java):

import com.rmltech.EvolvedSolution;

Page 13: Discipulus - Decompiled Program Interface

13

Discipulus Decompiled Program Interface

float inputVector[] = {0.5f, 20.3f, 15.0f};

Class_Name.ClassificationResult result;

Class_Name clClassi = new Class_Name()

result = clClassi.discipulusJavaClassificationFunction(inputVector);

System.out.println(result.getResult());

System.out.println(result.getConfidence());

System.out.println(result.getActualOutput());

System.out.println(result.getThreshold());

System.out.println(result.NumberOfExamples());

System.out.println(result.getClass0Votes());

System.out.println(result.getClass1Votes());

3.6 Pascal/Delphi Evolved Function Classification Interface Declaration function DiscipulusDelphiClassificationFunction(

V: array of Double;

var Threshold: Double;

var ActualOutput: Double;

var NumberOfExamples: Integer;

var Confidence: Double;

var Class1Votes: Integer;

var Class0Votes: Integer

): Double;

Example Here is an example of calling a Discipulus Pascal/Delphi Classification function for an evolved program that was trained with three inputs. As in regression function, the proper unit file is created: var

V: array of Double;

Threshold: Double;

ActualOutput: Double;

NumberOfExamples: Integer;

Confidence: Double;

Class1Votes: Integer;

Class0Votes: Integer;

Page 14: Discipulus - Decompiled Program Interface

14

Discipulus Decompiled Program Interface

Result: Double;

Begin

SetLength(v, 3); // set array to be 3 element long

v[0] := 0.5; // init first element

v[0] := 20.3; // init second element

v[0] := 15.0; // init third element

Result := DiscipulusDelphiClassificationFunction(V, Threshold, ActualOutput, NumberOfExamples, Confidence, Class1Votes, Class0Votes);

End;

Page 15: Discipulus - Decompiled Program Interface

15

Discipulus Decompiled Program Interface

4 Ranking Functions Interfaces Discipulus will create code functions encapsulating your evolved program or team using a Ranking Function Interface when your program or team was evolved using Best ROC Curve, Best ROC Curve then Cost, Best ROC Curve (Compare), or the Minimum Cost fitness function provided in Discipulus.

4.1 Description of Input, Outputs and Function Return Inputs The data inputs, v, are contained in an array, v, of inputs as float (double precision) values. Each v vector is equivalent to a single row of data in the training or validation files. The size of v is equal to the number of inputs used in Discipulus during training. The inputs must be ordered and preprocessed exactly as they were ordered and preprocessed before training.

Note that this interface currently includes a number of parameters that are reserved for future compatibility. They will not currently return any information of value.

Outputs

• ActualOutput: This is the actual output of the evolved program.

• LogisticProbabilityOfTargetClass: (Reserved for future use).

• OtherProbabilityOfTargetClass: (Reserved for future use)

• UserSetDecisionThreshold: (Reserved for future use)

• ActualOutputDecisionThreshold (Reserved for future use)

• LogisticProbabilityOutputDecisionThreshold (Reserved for future use)

• OtherProbabilityOutputDecisionThreshold (Reserved for future use).

Function Return Value The return value is a normalized rank. It tells you where the ActualOutput would have been ranked across the entire training and validation set used to evolved the decompiled program. The value is normalized from 0 to 1, where the largest output across both data sets (highest probability of class one) is equal to one and the smallest output across both data sets (lowest probability of class one) is equal to zero. In the event that the ActualOutput is higher than any output in the Training and Validation data sets, the value returned is -0.1. In the event the ActualOutput is lower than any output in the Training and Validation data sets, the value returned is 1.1.

The function return value for other languages is returned in the Java decompilations as the result of the getQuantile method of the RankingResult class.

Page 16: Discipulus - Decompiled Program Interface

16

Discipulus Decompiled Program Interface

4.2 C Evolved Function Ranking Interface Declaration float DiscipulusCRankingFunction(float v[],

float & ActualOutput,

float & LogisticProbabilityOfTargetClass,

float & OtherProbabilityOfTargetClass,

float & UserSetDecisionThreshold,

float & ActualOutputDecisionThreshold,

float & LogisticProbabilityOutDecisionThres,

float & OtherProbabilityOutDecisionThres,

float & NormalizedDecisionThreshold,

float & CostOfFalseNegative,

float & CostOfFalsePositive

)

Example Here is an example of calling a C Ranking function for an evolved program that was trained with three inputs.

float v[]={0.5,20.3,15.0};

float ActualOutput = 0 ;

float LogisticProbabilityOfTargetClass = 0;

float OtherProbabilityOfTargetClass =0

float UserSetDecisionThreshold =0;

float ActualOutputDecisionThreshold =0;

float LogisticProbabilityOutDecisionThres=0;

float OtherProbabilityOutDecisionThres =0;

float NormalizedDecisionThreshold =0;

float CostOfFalseNegative =0;

float CostOfFalsePositive =0;

Page 17: Discipulus - Decompiled Program Interface

17

Discipulus Decompiled Program Interface

float result = DiscipulusCRankingFunction(float v[],

ActualOutput,LogisticProbabilityOfTargetClass,

OtherProbabilityOfTargetClass,

UserSetDecisionThreshold,

ActualOutputDecisionThreshold,

LogisticProbabilityOutDecisionThres,

OtherProbabilityOutDecisionThres,

NormalizedDecisionThreshold,

CostOfFalseNegative,

CostOfFalsePositive

)

4.3 C Assembler Evolved Function Ranking Interface There is no ranking decompilation for C Assembler.

4.4 C# Evolved Function Ranking Interface Declaration public float DiscipulusCSharpRankingFunction(float [] v,

ref float ActualOutput,

ref float LogisticProbabilityOfTargetClass,

ref float OtherProbabilityOfTargetClass,

ref float UserSetDecisionThreshold,

ref float ActualOutputDecisionThreshold,

ref float LogisticProbOutputDecisionThres,

ref float OtherProbOutputDecisionThres,

ref float NormalizedDecisionThreshold,

ref float CostOfFalseNegative,

ref float CostOfFalsePositive

)

Example

Here is an example of calling a C# Ranking function for an evolved program that was trained with three inputs:

1. Include the class to your compilation unit using using directive in the very beginning of your *.cs file. using Discipulus;

2. Prepare the input vector of parameters:

Page 18: Discipulus - Decompiled Program Interface

18

Discipulus Decompiled Program Interface

float[] inputVector = { 0.5F, 20.3F, 15.0F };

3. Call the function: using Discipulus;

float[] inputVector = { 0.5F, 20.3F, 15.0F };

float LogisticProbabilityOfTargetClass =0;

float ActualOutput=0;

long OtherProbabilityOfTargetClass=0;

float UserSetDecisionThreshold = 0 ;

float ActualOutputDecisionThreshold = 0;

float LogisticProbOutputDecisionThres = 0;

float OtherProbOutputDecisionThres = 0;

float NormalizedDecisionThreshold = 0;

float CostOfFalseNegative = 0 ;

float CostOfFalsePositive = 0 ;

Class_Name clClass = new Class_Name()

float result = clClass.DiscipulusCSharpRankingFunction

(

inputVector,

ref ActualOutput,

ref LogisticProbabilityOfTargetClass,

ref OtherProbabilityOfTargetClass,

ref UserSetDecisionThreshold,

ref ActualOutputDecisionThreshold,

ref LogisticProbOutputDecisionThres,

ref OtherProbOutputDecisionThres,

ref NormalizedDecisionThreshold,

ref CostOfFalseNegative,

ref CostOfFalsePositive

);

4.5 Java Evolved Function Ranking Interface Declaration public RankingResult

discipulusJavaRankingFunction( float[] v)

Page 19: Discipulus - Decompiled Program Interface

19

Discipulus Decompiled Program Interface

(Note: the RankingResult class is declared in the decompiled program)

Example Java, unlike other languages doesn’t provide variable passing by reference. Therefore the Java decompiled solution provides a special inner class that acts as container for “output values” like Quantile, ActualOutput, CostOfFalseNegative, CostOfFalsePositive. This class name is RankingResult.

Here is an example of calling a Discipulus Java Ranking function for an evolved program that was trained with three inputs (let’s assume that we saved decompilation to Class_Name.java):

import com.rmltech.EvolvedSolution;

float inputVector[] = {0.5f, 20.3f, 15.0f};

Class_Name.RankingResult result;

Class_Name clRanking = new Class_Name()

result = clRanking. discipulusJavaRankingFunction (inputVector);

System.out.println(result.getQuantile());

System.out.println(result.getActualOutput());

4.6 Pascal/Delphi Evolved Function Ranking Interface Declaration function DiscipulusPascalRankingFunction(v: Array of Double;

var ActualOutput: Double;

var LogisticProbabilityOfTargetClass: Double;

var OtherProbabilityOfTargetClass: Double;

var UserSetDecisionThreshold: Double;

var ActualOutputDecisionThreshold: Double;

var LogisticProbOutputDecisionThres: Double;

var OtherProbOutputDecisionThres: Double;

var NormalizedDecisionThreshold: Double;

var CostOfFalseNegative: Double;

var CostOfFalsePositive: Double

): Double;

Example

Page 20: Discipulus - Decompiled Program Interface

20

Discipulus Decompiled Program Interface

Here is an example of calling a Pascal/Delphi Ranking function for an evolved program that was trained with three inputs. var

V: array of Double;

ActualOutput: Double;

LogisticProbabilityOfTargetClass: Double;

OtherProbabilityOfTargetClass: Double;

UserSetDecisionThreshold: Double;

ActualOutputDecisionThreshold: Double;

LogisticProbOutputDecisionThres: Double;

OtherProbOutputDecisionThres: Double;

NormalizedDecisionThreshold: Double;

CostOfFalseNegative: Double;

CostOfFalsePositive: Double ;

Result: Double;

Begin

. . .

SetLength(v, 3); // set array to be 3 element long

v[0] := 0.5; // init first element

v[0] := 20.3; // init second element

v[0] := 15.0; // init third element

Result := DiscipulusPascalRankingFunction(V,

ActualOutput,

LogisticProbabilityOfTargetClass,

OtherProbabilityOfTargetClass,

UserSetDecisionThreshold,

ActualOutputDecisionThreshold,

LogisticProbOutputDecisionThres,

OtherProbOutputDecisionThres,

NormalizedDecisionThreshold,

CostOfFalseNegative,

CostOfFalsePositive );

End;

Page 21: Discipulus - Decompiled Program Interface

21

Discipulus Decompiled Program Interface

5 Logistic Function Interfaces Discipulus will decompile evolved programs or teams to this interface when your program was evolved using the Logistic Regression fitness function. Description of Input, Outputs, and Function Return

Inputs The inputs, v, are contained in an array, v, of inputs as float or double precision values. The size of v is equal to the number of inputs used in Discipulus during training. The inputs must be ordered and preprocessed exactly as they were ordered and preprocessed during training.

Function Return Value The Return value is a float or double precision value and contains the prediction of the evolved program for the vector of values contained in the input vector, v. The meaning of the output varies depending on what fitness function you used to evolve the program as follows:

For programs evolved with the Logistic Regression Fitness Function, the returned value is the output of the evolved program transformed by the logistic function. Thus, is the probability that a particular v vector represents an instance of class one.

Interface The evolved program interfaces for Logistic-Regression problem-type decompilations are identical to the Regression Function interfaces described above in Sections 2.1 through 2.6. Please refer to that material. The only difference is that a logistic transform is performed on the actual output of the logistic program inside the decompiled program.