Skip to content

Commit

Permalink
Added code to generate plot_space for jupyter integration and draw a …
Browse files Browse the repository at this point in the history
…subset of the space notebooks for the workshop

create more plots use 1 - var
bumped version number
  • Loading branch information
Immudzen committed Oct 2, 2019
1 parent e598e1e commit 8d09eed
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CADETMatch.egg-info/PKG-INFO
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Metadata-Version: 2.1
Name: CADETMatch
Version: 0.4.2
Version: 0.4.4
Summary: CADETMatch is a parameter estimation and error modeling library for CADET
Home-page: https://github.com/modsim/CADET-Match
Author: William Heymann
Expand Down
6 changes: 3 additions & 3 deletions CADETMatch/CADETMatch.pyproj
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>0067cb6f-0de6-4dd6-8086-20ea899a691d</ProjectGuid>
<ProjectHome>.</ProjectHome>
<StartupFile>generate_corner_graphs.py</StartupFile>
<StartupFile>match.py</StartupFile>
<SearchPath>
</SearchPath>
<WorkingDirectory>..</WorkingDirectory>
Expand All @@ -14,9 +14,9 @@
<IsWindowsApplication>False</IsWindowsApplication>
<InterpreterId>CondaEnv|CondaEnv|CADETMatch</InterpreterId>
<LaunchProvider>Standard Python launcher</LaunchProvider>
<CommandLineArguments>"F:\temp\cadet_tutorial\lesson_5\multiple_parameters\fit_nsga3\example_nsga3.json" 2</CommandLineArguments>
<CommandLineArguments>"F:\temp\cadet_tutorial\install\fit\example.json" 2</CommandLineArguments>
<EnableNativeCodeDebugging>False</EnableNativeCodeDebugging>
<InterpreterArguments>-m scoop -n 1</InterpreterArguments>
<InterpreterArguments>-m scoop -n 6</InterpreterArguments>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)' == 'Debug' ">
<DebugSymbols>true</DebugSymbols>
Expand Down
8 changes: 7 additions & 1 deletion CADETMatch/generate_graphs.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,6 +455,12 @@ def plot_3d(arg):

def plot_2d(arg):
directory_path, header_x, scoreName, data, scores = arg
plot_2d_single(directory_path, header_x, scoreName, data, scores)

plot_2d_single(directory_path, header_x, '1- ' + scoreName, data, 1-scores)


def plot_2d_single(directory_path, header_x, scoreName, data, scores):
directory = Path(directory_path)

if numpy.all(scores <= 0):
Expand All @@ -466,7 +472,7 @@ def plot_2d(arg):
scores = numpy.log(scores)
scoreName = 'log(%s)' % scoreName

fig = figure.Figure()
fig = figure.Figure(figsize=[10,10])
canvas = FigureCanvas(fig)
graph = fig.add_subplot(1, 1, 1)

Expand Down
11 changes: 10 additions & 1 deletion CADETMatch/jupyter.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,13 @@ def get_best(self):
else:
best[name].append(col_name)

return best, score, best_score
return best, score, best_score

def plot_space(self):
space_dir = self.cache.settings['resultsDirSpace'] / '2d'

for image in space_dir.glob('*.png'):
if '1- ' in image.name or 'SSE' in image.name:
print(image.name)
img = dp.Image(filename=image, embed=True)
dp.display(img)
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="CADETMatch",
version="0.4.3",
version="0.4.4",
author="William Heymann",
author_email="[email protected]",
description="CADETMatch is a parameter estimation and error modeling library for CADET",
Expand Down

0 comments on commit 8d09eed

Please sign in to comment.