Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
342 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
#include <math.h> | ||
void assign_array(double source[], double *target, int size) { | ||
for(int i = 0; i < size; ++i) | ||
target[i] = source[i]; | ||
} | ||
void score(double * input, double * output) { | ||
double var0; | ||
if ((input[2]) >= (2.5999999)) { | ||
var0 = -0.0731707439; | ||
} else { | ||
var0 = 0.142857149; | ||
} | ||
double var1; | ||
if ((input[2]) >= (2.5999999)) { | ||
var1 = -0.0705206916; | ||
} else { | ||
var1 = 0.12477719; | ||
} | ||
double var2; | ||
var2 = exp(((0.5) + (var0)) + (var1)); | ||
double var3; | ||
if ((input[2]) >= (2.5999999)) { | ||
if ((input[2]) >= (4.85000038)) { | ||
var3 = -0.0578680299; | ||
} else { | ||
var3 = 0.132596686; | ||
} | ||
} else { | ||
var3 = -0.0714285821; | ||
} | ||
double var4; | ||
if ((input[2]) >= (2.5999999)) { | ||
if ((input[2]) >= (4.85000038)) { | ||
var4 = -0.0552999191; | ||
} else { | ||
var4 = 0.116139404; | ||
} | ||
} else { | ||
var4 = -0.0687687024; | ||
} | ||
double var5; | ||
var5 = exp(((0.5) + (var3)) + (var4)); | ||
double var6; | ||
if ((input[2]) >= (4.85000038)) { | ||
if ((input[3]) >= (1.75)) { | ||
var6 = 0.142011836; | ||
} else { | ||
var6 = 0.0405405387; | ||
} | ||
} else { | ||
if ((input[3]) >= (1.6500001)) { | ||
var6 = 0.0428571403; | ||
} else { | ||
var6 = -0.0730659068; | ||
} | ||
} | ||
double var7; | ||
if ((input[2]) >= (4.85000038)) { | ||
if ((input[3]) >= (1.75)) { | ||
var7 = 0.124653712; | ||
} else { | ||
var7 = 0.035562478; | ||
} | ||
} else { | ||
if ((input[3]) >= (1.6500001)) { | ||
var7 = 0.0425687581; | ||
} else { | ||
var7 = -0.0704230517; | ||
} | ||
} | ||
double var8; | ||
var8 = exp(((0.5) + (var6)) + (var7)); | ||
double var9; | ||
var9 = ((var2) + (var5)) + (var8); | ||
assign_array((double[]){(var2) / (var9), (var5) / (var9), (var8) / (var9)}, output, 3); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
double score(double * input) { | ||
double var0; | ||
if ((input[12]) >= (9.72500038)) { | ||
if ((input[12]) >= (19.8299999)) { | ||
var0 = 1.1551429; | ||
} else { | ||
var0 = 1.8613131; | ||
} | ||
} else { | ||
if ((input[5]) >= (6.94099998)) { | ||
var0 = 3.75848508; | ||
} else { | ||
var0 = 2.48056006; | ||
} | ||
} | ||
double var1; | ||
if ((input[12]) >= (7.68499994)) { | ||
if ((input[12]) >= (15)) { | ||
var1 = 1.24537706; | ||
} else { | ||
var1 = 1.92129695; | ||
} | ||
} else { | ||
if ((input[5]) >= (7.43700027)) { | ||
var1 = 3.96021533; | ||
} else { | ||
var1 = 2.51493931; | ||
} | ||
} | ||
return ((0.5) + (var0)) + (var1); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
public class Model { | ||
|
||
public static double[] score(double[] input) { | ||
double var0; | ||
var0 = Math.exp(subroutine0(input)); | ||
double var1; | ||
var1 = Math.exp(subroutine1(input)); | ||
double var2; | ||
var2 = Math.exp(subroutine2(input)); | ||
double var3; | ||
var3 = ((var0) + (var1)) + (var2); | ||
return new double[] {(var0) / (var3), (var1) / (var3), (var2) / (var3)}; | ||
} | ||
public static double subroutine0(double[] input) { | ||
double var0; | ||
if ((input[2]) >= (2.5999999)) { | ||
var0 = -0.0731707439; | ||
} else { | ||
var0 = 0.142857149; | ||
} | ||
double var1; | ||
if ((input[2]) >= (2.5999999)) { | ||
var1 = -0.0705206916; | ||
} else { | ||
var1 = 0.12477719; | ||
} | ||
return ((0.5) + (var0)) + (var1); | ||
} | ||
public static double subroutine1(double[] input) { | ||
double var0; | ||
if ((input[2]) >= (2.5999999)) { | ||
if ((input[2]) >= (4.85000038)) { | ||
var0 = -0.0578680299; | ||
} else { | ||
var0 = 0.132596686; | ||
} | ||
} else { | ||
var0 = -0.0714285821; | ||
} | ||
double var1; | ||
if ((input[2]) >= (2.5999999)) { | ||
if ((input[2]) >= (4.85000038)) { | ||
var1 = -0.0552999191; | ||
} else { | ||
var1 = 0.116139404; | ||
} | ||
} else { | ||
var1 = -0.0687687024; | ||
} | ||
return ((0.5) + (var0)) + (var1); | ||
} | ||
public static double subroutine2(double[] input) { | ||
double var0; | ||
if ((input[2]) >= (4.85000038)) { | ||
if ((input[3]) >= (1.75)) { | ||
var0 = 0.142011836; | ||
} else { | ||
var0 = 0.0405405387; | ||
} | ||
} else { | ||
if ((input[3]) >= (1.6500001)) { | ||
var0 = 0.0428571403; | ||
} else { | ||
var0 = -0.0730659068; | ||
} | ||
} | ||
double var1; | ||
if ((input[2]) >= (4.85000038)) { | ||
if ((input[3]) >= (1.75)) { | ||
var1 = 0.124653712; | ||
} else { | ||
var1 = 0.035562478; | ||
} | ||
} else { | ||
if ((input[3]) >= (1.6500001)) { | ||
var1 = 0.0425687581; | ||
} else { | ||
var1 = -0.0704230517; | ||
} | ||
} | ||
return ((0.5) + (var0)) + (var1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
public class Model { | ||
|
||
public static double score(double[] input) { | ||
return subroutine0(input); | ||
} | ||
public static double subroutine0(double[] input) { | ||
double var0; | ||
if ((input[12]) >= (9.72500038)) { | ||
if ((input[12]) >= (19.8299999)) { | ||
var0 = 1.1551429; | ||
} else { | ||
var0 = 1.8613131; | ||
} | ||
} else { | ||
if ((input[5]) >= (6.94099998)) { | ||
var0 = 3.75848508; | ||
} else { | ||
var0 = 2.48056006; | ||
} | ||
} | ||
double var1; | ||
if ((input[12]) >= (7.68499994)) { | ||
if ((input[12]) >= (15)) { | ||
var1 = 1.24537706; | ||
} else { | ||
var1 = 1.92129695; | ||
} | ||
} else { | ||
if ((input[5]) >= (7.43700027)) { | ||
var1 = 3.96021533; | ||
} else { | ||
var1 = 2.51493931; | ||
} | ||
} | ||
return ((0.5) + (var0)) + (var1); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
import numpy as np | ||
def score(input): | ||
if (input[2]) >= (2.5999999): | ||
var0 = -0.0731707439 | ||
else: | ||
var0 = 0.142857149 | ||
if (input[2]) >= (2.5999999): | ||
var1 = -0.0705206916 | ||
else: | ||
var1 = 0.12477719 | ||
var2 = np.exp(((0.5) + (var0)) + (var1)) | ||
if (input[2]) >= (2.5999999): | ||
if (input[2]) >= (4.85000038): | ||
var3 = -0.0578680299 | ||
else: | ||
var3 = 0.132596686 | ||
else: | ||
var3 = -0.0714285821 | ||
if (input[2]) >= (2.5999999): | ||
if (input[2]) >= (4.85000038): | ||
var4 = -0.0552999191 | ||
else: | ||
var4 = 0.116139404 | ||
else: | ||
var4 = -0.0687687024 | ||
var5 = np.exp(((0.5) + (var3)) + (var4)) | ||
if (input[2]) >= (4.85000038): | ||
if (input[3]) >= (1.75): | ||
var6 = 0.142011836 | ||
else: | ||
var6 = 0.0405405387 | ||
else: | ||
if (input[3]) >= (1.6500001): | ||
var6 = 0.0428571403 | ||
else: | ||
var6 = -0.0730659068 | ||
if (input[2]) >= (4.85000038): | ||
if (input[3]) >= (1.75): | ||
var7 = 0.124653712 | ||
else: | ||
var7 = 0.035562478 | ||
else: | ||
if (input[3]) >= (1.6500001): | ||
var7 = 0.0425687581 | ||
else: | ||
var7 = -0.0704230517 | ||
var8 = np.exp(((0.5) + (var6)) + (var7)) | ||
var9 = ((var2) + (var5)) + (var8) | ||
return np.asarray([(var2) / (var9), (var5) / (var9), (var8) / (var9)]) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
def score(input): | ||
if (input[12]) >= (9.72500038): | ||
if (input[12]) >= (19.8299999): | ||
var0 = 1.1551429 | ||
else: | ||
var0 = 1.8613131 | ||
else: | ||
if (input[5]) >= (6.94099998): | ||
var0 = 3.75848508 | ||
else: | ||
var0 = 2.48056006 | ||
if (input[12]) >= (7.68499994): | ||
if (input[12]) >= (15): | ||
var1 = 1.24537706 | ||
else: | ||
var1 = 1.92129695 | ||
else: | ||
if (input[5]) >= (7.43700027): | ||
var1 = 3.96021533 | ||
else: | ||
var1 = 2.51493931 | ||
return ((0.5) + (var0)) + (var1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters