Skip to content

Commit

Permalink
fixed a problem in linear bounds and added some tests for it
Browse files Browse the repository at this point in the history
  • Loading branch information
Immudzen committed Mar 4, 2020
1 parent 1f32919 commit 7bb7595
Show file tree
Hide file tree
Showing 10 changed files with 1,694 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CADETMatch/CADETMatch.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<IsWindowsApplication>False</IsWindowsApplication>
<InterpreterId>CondaEnv|CondaEnv|CADETMatch</InterpreterId>
<LaunchProvider>Standard Python launcher</LaunchProvider>
<CommandLineArguments>"C:\Users\kosh_000\Documents\Visual Studio 2017\Projects\CADETMatch\Examples\MCMC\Dextran\MCMC_dextran_nsga3.json" 6</CommandLineArguments>
<CommandLineArguments>"C:\Users\kosh_000\Documents\Visual Studio 2017\Projects\CADETMatch\Examples\TransformTest\linear\Linear_test.json" 6</CommandLineArguments>
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
<InterpreterArguments>
</InterpreterArguments>
Expand Down
4 changes: 2 additions & 2 deletions CADETMatch/transform/norm_linear.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,8 @@ def getBounds(self):
minUpper = self.parameter['minUpper']
maxUpper = self.parameter['maxUpper']

minValues = numpy.array([minLower, minUpper])
maxValues = numpy.array([maxLower, maxUpper])
minValues = [minLower, minUpper]
maxValues = [maxLower, maxUpper]

return minValues, maxValues

Expand Down
94 changes: 94 additions & 0 deletions Examples/TransformTest/linear/Linear_test.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"CADETPath": "C:/Users/kosh_000/cadet_build/CADET-dev/MS_SMKL_RELEASE/bin/cadet-cli.exe",
"baseDir": "C:/Users/kosh_000/Documents/Visual Studio 2017/Projects/CADETMatch/Examples/TransformTest/linear",
"tempDir": "L:/",
"resultsDir": "fit_linear",
"CSV": "dextran_NSGA3.csv",
"checkpointFile": "check",
"stopAverage": 1,
"stopBest": 1,
"gradCheck": 1.0,
"gradVector": 1,
"searchMethod": "NSGA3",
"mutationRate": 1.0,
"crossoverRate": 1.0,
"generations": 1000,
"population": 10,
"metaResultsOnly": 1,
"sobolGeneration":1,
"stallGenerations": 10,
"progressCorrect": 2,
"normalizeOutput":1,
"continueMCMC":0,
"graphMetaTime": 600,
"finalGradRefinement": 1,
"fullTrainingData": 0,
"progress_elapsed_time": 360,
"parameters": [
{
"transform": "log",
"component": -1,
"bound": -1,
"location": "/input/model/unit_001/COL_DISPERSION",
"min": 1e-12,
"max": 1e-3
},
{
"transform": "linear",
"component": -1,
"bound": -1,
"location": "/input/model/unit_001/COL_POROSITY",
"minX":0,
"maxX":2,
"x_name":"pH",
"minLower": 0.1,
"maxLower": 0.9,
"minUpper": 0.1,
"maxUpper": 0.9
}
],
"experiments": [
{
"CSV": "dex_03.csv",
"isotherm": "/output/solution/unit_001/SOLUTION_OUTLET_COMP_000",
"HDF5": "dex_03.h5",
"name": "main1",
"timeout": 30.0,
"pH":0,
"features": [
{
"name": "Pulse",
"type": "DextranShape"
}
]
},
{
"CSV": "dex_04.csv",
"isotherm": "/output/solution/unit_001/SOLUTION_OUTLET_COMP_000",
"HDF5": "dex_04.h5",
"name": "main2",
"timeout": 30.0,
"pH":1,
"features": [
{
"name": "Pulse",
"type": "DextranShape"
}
]
},
{
"CSV": "dex_05.csv",
"isotherm": "/output/solution/unit_001/SOLUTION_OUTLET_COMP_000",
"HDF5": "dex_05.h5",
"name": "main3",
"timeout": 30.0,
"pH":2,
"features": [
{
"name": "Pulse",
"type": "DextranShape"
}
]
}
]
}
94 changes: 94 additions & 0 deletions Examples/TransformTest/linear/Linear_test_norm.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"CADETPath": "C:/Users/kosh_000/cadet_build/CADET-dev/MS_SMKL_RELEASE/bin/cadet-cli.exe",
"baseDir": "C:/Users/kosh_000/Documents/Visual Studio 2017/Projects/CADETMatch/Examples/TransformTest/linear",
"tempDir": "L:/",
"resultsDir": "fit_linear_norm",
"CSV": "dextran_NSGA3.csv",
"checkpointFile": "check",
"stopAverage": 1,
"stopBest": 1,
"gradCheck": 1.0,
"gradVector": 1,
"searchMethod": "NSGA3",
"mutationRate": 1.0,
"crossoverRate": 1.0,
"generations": 1000,
"population": 10,
"metaResultsOnly": 1,
"sobolGeneration":1,
"stallGenerations": 10,
"progressCorrect": 2,
"normalizeOutput":1,
"continueMCMC":0,
"graphMetaTime": 600,
"finalGradRefinement": 1,
"fullTrainingData": 0,
"progress_elapsed_time": 360,
"parameters": [
{
"transform": "norm_log",
"component": -1,
"bound": -1,
"location": "/input/model/unit_001/COL_DISPERSION",
"min": 1e-12,
"max": 1e-3
},
{
"transform": "norm_linear",
"component": -1,
"bound": -1,
"location": "/input/model/unit_001/COL_POROSITY",
"minX":0,
"maxX":2,
"x_name":"pH",
"minLower": 0.1,
"maxLower": 0.9,
"minUpper": 0.1,
"maxUpper": 0.9
}
],
"experiments": [
{
"CSV": "dex_03.csv",
"isotherm": "/output/solution/unit_001/SOLUTION_OUTLET_COMP_000",
"HDF5": "dex_03.h5",
"name": "main1",
"timeout": 30.0,
"pH":0,
"features": [
{
"name": "Pulse",
"type": "DextranShape"
}
]
},
{
"CSV": "dex_04.csv",
"isotherm": "/output/solution/unit_001/SOLUTION_OUTLET_COMP_000",
"HDF5": "dex_04.h5",
"name": "main2",
"timeout": 30.0,
"pH":1,
"features": [
{
"name": "Pulse",
"type": "DextranShape"
}
]
},
{
"CSV": "dex_05.csv",
"isotherm": "/output/solution/unit_001/SOLUTION_OUTLET_COMP_000",
"HDF5": "dex_05.h5",
"name": "main3",
"timeout": 30.0,
"pH":2,
"features": [
{
"name": "Pulse",
"type": "DextranShape"
}
]
}
]
}
Loading

0 comments on commit 7bb7595

Please sign in to comment.