Skip to content

Commit

Permalink
Multitask Models (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcosfelt authored Dec 11, 2020
1 parent 05e22c9 commit 8742129
Show file tree
Hide file tree
Showing 170 changed files with 6,825 additions and 951 deletions.
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ jobs:
name: ${{ github.sha }}-build
path: dist/



# # Publish to pypi on version change
# publish:
Expand Down
295 changes: 295 additions & 0 deletions docs/source/Tutorial_MIT_kin.ipynb

Large diffs are not rendered by default.

Binary file added docs/source/kinetic_model.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
98 changes: 42 additions & 56 deletions docs/source/tutorial.ipynb

Large diffs are not rendered by default.

Binary file added experiments/multitask/data/baumgartner_data.xlsx
Binary file not shown.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"runner": {"num_initial_experiments": null, "max_iterations": 20, "batch_size": 1, "f_tol": 1e-05, "max_restarts": 0}, "strategy": {"name": "MTBO", "transform": {"transform_domain": [{"type": "ContinuousVariable", "is_objective": false, "name": "conc_cat", "description": "catalyst concentration", "units": null, "bounds": [0.000835, 0.004175]}, {"type": "ContinuousVariable", "is_objective": false, "name": "t", "description": "reaction time", "units": null, "bounds": [60.0, 600.0]}, {"type": "CategoricalVariable", "is_objective": false, "name": "cat_index", "description": "Choice of catalyst", "units": null, "levels": [0, 1, 2, 3, 4, 5, 6, 7], "ds": null}, {"type": "ContinuousVariable", "is_objective": false, "name": "temperature", "description": "Reactor temperature in degress celsius", "units": null, "bounds": [30.0, 110.0]}, {"type": "ContinuousVariable", "is_objective": true, "name": "y", "description": "yield (%)", "units": null, "bounds": [0.0, 100.0]}], "name": "Transform", "domain": [{"type": "ContinuousVariable", "is_objective": false, "name": "conc_cat", "description": "catalyst concentration", "units": null, "bounds": [0.000835, 0.004175]}, {"type": "ContinuousVariable", "is_objective": false, "name": "t", "description": "reaction time", "units": null, "bounds": [60.0, 600.0]}, {"type": "CategoricalVariable", "is_objective": false, "name": "cat_index", "description": "Choice of catalyst", "units": null, "levels": [0, 1, 2, 3, 4, 5, 6, 7], "ds": null}, {"type": "ContinuousVariable", "is_objective": false, "name": "temperature", "description": "Reactor temperature in degress celsius", "units": null, "bounds": [30.0, 110.0]}, {"type": "ContinuousVariable", "is_objective": true, "name": "y", "description": "yield (%)", "units": null, "bounds": [0.0, 100.0]}], "transform_params": {}}, "strategy_params": {"all_experiments": {"index": [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "columns": [["conc_cat", "DATA"], ["t", "DATA"], ["cat_index", "DATA"], ["temperature", "DATA"], ["y", "DATA"], ["computation_t", "METADATA"], ["experiment_t", "METADATA"], ["strategy", "METADATA"], ["task", "METADATA"]], "data": [[0.00167, 465.0, 2.0, 90.0, 0.6834766730805194, 0.0, 0.013956069946289062, "LHS", 1.0], [0.00334, 195.0, 1.0, 50.0, 0.09510302871292158, 0.0, 0.011358976364135742, "LHS", 1.0], [0.0034447615034878254, 73.59906005859375, 0.0, 83.26483917236328, 0.2374537221064554, 0.6501898765563965, 0.006091117858886719, "MTBO", 1.0], [0.0035142661072313786, 251.06439208984375, 0.0, 103.54130554199219, 0.7833322064055463, 0.5859410762786865, 0.00560307502746582, "MTBO", 1.0], [0.0035787997767329216, 220.09800720214844, 0.0, 95.94744873046875, 0.6812799685283629, 0.5066931247711182, 0.007703065872192383, "MTBO", 1.0], [0.0036390265449881554, 247.98243713378906, 0.0, 101.38838195800781, 0.7623931147683379, 1.838531255722046, 0.0056498050689697266, "MTBO", 1.0], [0.0036954847164452076, 245.22479248046875, 0.0, 102.04286193847656, 0.7709043021217924, 1.39261794090271, 0.0065500736236572266, "MTBO", 1.0], [0.003748619230464101, 232.76345825195312, 0.0, 105.3709716796875, 0.8005568755659853, 0.7918519973754883, 0.0060079097747802734, "MTBO", 1.0], [0.00379879935644567, 241.40586853027344, 0.0, 106.68544006347656, 0.8314337843760734, 2.4851040840148926, 0.005893230438232422, "MTBO", 1.0], [0.0038463366217911243, 248.2600555419922, 0.0, 109.25917053222656, 0.8407352676459883, 0.9307949542999268, 0.00557708740234375, "MTBO", 1.0], [0.0038914955221116543, 232.9134521484375, 0.0, 109.996826171875, 0.837252625185258, 1.507997989654541, 0.005334138870239258, "MTBO", 1.0], [0.003934502601623535, 229.90939331054688, 0.0, 110.0, 0.8293400717153988, 1.7254271507263184, 0.005456209182739258, "MTBO", 1.0], [0.0039755539037287235, 236.5709686279297, 0.0, 110.0, 0.8285415415576425, 2.0242481231689453, 0.005630970001220703, "MTBO", 1.0], [0.004014819394797087, 225.88876342773438, 0.0, 110.0, 0.8227087063272719, 1.1524879932403564, 0.0053157806396484375, "MTBO", 1.0], [0.004052448086440563, 304.1085205078125, 0.0, 108.17622375488281, 0.8634664872805746, 2.464487075805664, 0.005307912826538086, "MTBO", 1.0], [0.004088571295142174, 259.3201599121094, 0.0, 110.0, 0.8538453050764705, 1.9093761444091797, 0.005118846893310547, "MTBO", 1.0], [0.004123304039239883, 330.72100830078125, 0.0, 107.26323699951172, 0.8920762009929517, 2.736199140548706, 0.005462169647216797, "MTBO", 1.0], [0.004156750161200762, 243.80929565429688, 0.0, 110.0, 0.839875916972253, 3.023265838623047, 0.005330085754394531, "MTBO", 1.0], [0.004189001861959696, 255.94137573242188, 0.0, 110.0, 0.8487206128851456, 1.505815029144287, 0.006234884262084961, "MTBO", 1.0], [0.004220140632241964, 282.9985046386719, 0.0, 110.0, 0.8747099194743068, 1.659775972366333, 0.005845785140991211, "MTBO", 1.0]]}, "categorical_method": "one-hot", "task": 1}}, "experiment": {"domain": [{"type": "ContinuousVariable", "is_objective": false, "name": "conc_cat", "description": "catalyst concentration", "units": null, "bounds": [0.000835, 0.004175]}, {"type": "ContinuousVariable", "is_objective": false, "name": "t", "description": "reaction time", "units": null, "bounds": [60.0, 600.0]}, {"type": "CategoricalVariable", "is_objective": false, "name": "cat_index", "description": "Choice of catalyst", "units": null, "levels": [0, 1, 2, 3, 4, 5, 6, 7], "ds": null}, {"type": "ContinuousVariable", "is_objective": false, "name": "temperature", "description": "Reactor temperature in degress celsius", "units": null, "bounds": [30.0, 110.0]}, {"type": "ContinuousVariable", "is_objective": true, "name": "y", "description": "yield (%)", "units": null, "bounds": [0.0, 100.0]}], "name": "MIT_case3", "data": {"index": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "columns": [["conc_cat", "DATA"], ["t", "DATA"], ["cat_index", "DATA"], ["temperature", "DATA"], ["y", "DATA"], ["computation_t", "METADATA"], ["experiment_t", "METADATA"], ["strategy", "METADATA"], ["task", "METADATA"]], "data": [[0.00167, 465.0, 2.0, 90.0, 0.6834766730805194, 0.0, 0.013956069946289062, "LHS", 1.0], [0.00334, 195.0, 1.0, 50.0, 0.09510302871292158, 0.0, 0.011358976364135742, "LHS", 1.0], [0.0034447615034878254, 73.59906005859375, 0.0, 83.26483917236328, 0.2374537221064554, 0.6501898765563965, 0.006091117858886719, "MTBO", 1.0], [0.0035142661072313786, 251.06439208984375, 0.0, 103.54130554199219, 0.7833322064055463, 0.5859410762786865, 0.00560307502746582, "MTBO", 1.0], [0.0035787997767329216, 220.09800720214844, 0.0, 95.94744873046875, 0.6812799685283629, 0.5066931247711182, 0.007703065872192383, "MTBO", 1.0], [0.0036390265449881554, 247.98243713378906, 0.0, 101.38838195800781, 0.7623931147683379, 1.838531255722046, 0.0056498050689697266, "MTBO", 1.0], [0.0036954847164452076, 245.22479248046875, 0.0, 102.04286193847656, 0.7709043021217924, 1.39261794090271, 0.0065500736236572266, "MTBO", 1.0], [0.003748619230464101, 232.76345825195312, 0.0, 105.3709716796875, 0.8005568755659853, 0.7918519973754883, 0.0060079097747802734, "MTBO", 1.0], [0.00379879935644567, 241.40586853027344, 0.0, 106.68544006347656, 0.8314337843760734, 2.4851040840148926, 0.005893230438232422, "MTBO", 1.0], [0.0038463366217911243, 248.2600555419922, 0.0, 109.25917053222656, 0.8407352676459883, 0.9307949542999268, 0.00557708740234375, "MTBO", 1.0], [0.0038914955221116543, 232.9134521484375, 0.0, 109.996826171875, 0.837252625185258, 1.507997989654541, 0.005334138870239258, "MTBO", 1.0], [0.003934502601623535, 229.90939331054688, 0.0, 110.0, 0.8293400717153988, 1.7254271507263184, 0.005456209182739258, "MTBO", 1.0], [0.0039755539037287235, 236.5709686279297, 0.0, 110.0, 0.8285415415576425, 2.0242481231689453, 0.005630970001220703, "MTBO", 1.0], [0.004014819394797087, 225.88876342773438, 0.0, 110.0, 0.8227087063272719, 1.1524879932403564, 0.0053157806396484375, "MTBO", 1.0], [0.004052448086440563, 304.1085205078125, 0.0, 108.17622375488281, 0.8634664872805746, 2.464487075805664, 0.005307912826538086, "MTBO", 1.0], [0.004088571295142174, 259.3201599121094, 0.0, 110.0, 0.8538453050764705, 1.9093761444091797, 0.005118846893310547, "MTBO", 1.0], [0.004123304039239883, 330.72100830078125, 0.0, 107.26323699951172, 0.8920762009929517, 2.736199140548706, 0.005462169647216797, "MTBO", 1.0], [0.004156750161200762, 243.80929565429688, 0.0, 110.0, 0.839875916972253, 3.023265838623047, 0.005330085754394531, "MTBO", 1.0], [0.004189001861959696, 255.94137573242188, 0.0, 110.0, 0.8487206128851456, 1.505815029144287, 0.006234884262084961, "MTBO", 1.0], [0.004220140632241964, 282.9985046386719, 0.0, 110.0, 0.8747099194743068, 1.659775972366333, 0.005845785140991211, "MTBO", 1.0], [0.004250241443514824, 237.67816162109375, 0.0, 110.0, 0.8445389079623788, 1.8219339847564697, 0.006334066390991211, "MTBO", 1.0]]}, "experiment_params": {"noise_level": 1}, "extras": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"runner": {"num_initial_experiments": null, "max_iterations": 20, "batch_size": 1, "f_tol": 1e-05, "max_restarts": 0}, "strategy": {"name": "MTBO", "transform": {"transform_domain": [{"type": "ContinuousVariable", "is_objective": false, "name": "conc_cat", "description": "catalyst concentration", "units": null, "bounds": [0.000835, 0.004175]}, {"type": "ContinuousVariable", "is_objective": false, "name": "t", "description": "reaction time", "units": null, "bounds": [60.0, 600.0]}, {"type": "CategoricalVariable", "is_objective": false, "name": "cat_index", "description": "Choice of catalyst", "units": null, "levels": [0, 1, 2, 3, 4, 5, 6, 7], "ds": null}, {"type": "ContinuousVariable", "is_objective": false, "name": "temperature", "description": "Reactor temperature in degress celsius", "units": null, "bounds": [30.0, 110.0]}, {"type": "ContinuousVariable", "is_objective": true, "name": "y", "description": "yield (%)", "units": null, "bounds": [0.0, 100.0]}], "name": "Transform", "domain": [{"type": "ContinuousVariable", "is_objective": false, "name": "conc_cat", "description": "catalyst concentration", "units": null, "bounds": [0.000835, 0.004175]}, {"type": "ContinuousVariable", "is_objective": false, "name": "t", "description": "reaction time", "units": null, "bounds": [60.0, 600.0]}, {"type": "CategoricalVariable", "is_objective": false, "name": "cat_index", "description": "Choice of catalyst", "units": null, "levels": [0, 1, 2, 3, 4, 5, 6, 7], "ds": null}, {"type": "ContinuousVariable", "is_objective": false, "name": "temperature", "description": "Reactor temperature in degress celsius", "units": null, "bounds": [30.0, 110.0]}, {"type": "ContinuousVariable", "is_objective": true, "name": "y", "description": "yield (%)", "units": null, "bounds": [0.0, 100.0]}], "transform_params": {}}, "strategy_params": {"all_experiments": {"index": [0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], "columns": [["conc_cat", "DATA"], ["t", "DATA"], ["cat_index", "DATA"], ["temperature", "DATA"], ["y", "DATA"], ["computation_t", "METADATA"], ["experiment_t", "METADATA"], ["strategy", "METADATA"], ["task", "METADATA"]], "data": [[0.00334, 465.0, 4.0, 50.0, 0.17985231773569993, 0.0, 0.010438919067382812, "LHS", 1.0], [0.00167, 195.0, 2.0, 90.0, 0.4300858048986515, 0.0, 0.007607936859130859, "LHS", 1.0], [0.0034447615034878254, 398.8768005371094, 0.0, 86.5774154663086, 0.7087101512715346, 0.612335205078125, 0.0053560733795166016, "MTBO", 1.0], [0.0035142661072313786, 469.67535400390625, 0.0, 100.76272583007812, 0.8761409152190283, 0.5955960750579834, 0.008198976516723633, "MTBO", 1.0], [0.0035787997767329216, 467.1439514160156, 0.0, 100.46145629882812, 0.886102600066166, 2.077770948410034, 0.005563974380493164, "MTBO", 1.0], [0.0036390265449881554, 456.92108154296875, 0.0, 99.57943725585938, 0.8747769514028325, 1.5332398414611816, 0.005621910095214844, "MTBO", 1.0], [0.0036954847164452076, 458.5978088378906, 0.0, 99.77110290527344, 0.8801721297207287, 1.906566858291626, 0.006039142608642578, "MTBO", 1.0], [0.003748619230464101, 462.1470031738281, 0.0, 100.17256164550781, 0.8840563872117152, 1.6930909156799316, 0.00556492805480957, "MTBO", 1.0], [0.00379879935644567, 462.4292297363281, 0.0, 100.17167663574219, 0.8826458699667642, 2.2919270992279053, 0.005766868591308594, "MTBO", 1.0], [0.0038463366217911243, 462.43743896484375, 0.0, 99.96544647216797, 0.8711503509208562, 1.6909892559051514, 0.006745815277099609, "MTBO", 1.0], [0.0038914955221116543, 455.2014465332031, 0.0, 100.04133605957031, 0.8618410234939013, 1.141875982284546, 0.005749940872192383, "MTBO", 1.0], [0.003934502601623535, 457.7851867675781, 0.0, 101.14637756347656, 0.869856446244295, 1.657970905303955, 0.005429983139038086, "MTBO", 1.0], [0.0039755539037287235, 457.88671875, 0.0, 102.14500427246094, 0.8819748369024276, 2.7099609375, 0.006225109100341797, "MTBO", 1.0], [0.004014819394797087, 459.4237365722656, 0.0, 103.44039916992188, 0.8870474964489505, 2.432636022567749, 0.005860805511474609, "MTBO", 1.0], [0.004052448086440563, 459.138427734375, 0.0, 103.84227752685547, 0.8870364258181691, 2.195765972137451, 0.005599021911621094, "MTBO", 1.0], [0.004088571295142174, 459.00555419921875, 0.0, 104.21199035644531, 0.9077853500875166, 2.2678537368774414, 0.005499124526977539, "MTBO", 1.0], [0.004123304039239883, 458.68206787109375, 0.0, 103.70012664794922, 0.9098753271024206, 2.3990237712860107, 0.005520820617675781, "MTBO", 1.0], [0.004156750161200762, 462.7941589355469, 0.0, 103.77993774414062, 0.8959738826523851, 2.351633071899414, 0.0054399967193603516, "MTBO", 1.0], [0.004189001861959696, 446.3855285644531, 0.0, 103.02916717529297, 0.8920960121974274, 3.015841007232666, 0.006087064743041992, "MTBO", 1.0], [0.004220140632241964, 454.107666015625, 0.0, 103.39730072021484, 0.8951730977924046, 2.0994012355804443, 0.005863189697265625, "MTBO", 1.0]]}, "categorical_method": "one-hot", "task": 1}}, "experiment": {"domain": [{"type": "ContinuousVariable", "is_objective": false, "name": "conc_cat", "description": "catalyst concentration", "units": null, "bounds": [0.000835, 0.004175]}, {"type": "ContinuousVariable", "is_objective": false, "name": "t", "description": "reaction time", "units": null, "bounds": [60.0, 600.0]}, {"type": "CategoricalVariable", "is_objective": false, "name": "cat_index", "description": "Choice of catalyst", "units": null, "levels": [0, 1, 2, 3, 4, 5, 6, 7], "ds": null}, {"type": "ContinuousVariable", "is_objective": false, "name": "temperature", "description": "Reactor temperature in degress celsius", "units": null, "bounds": [30.0, 110.0]}, {"type": "ContinuousVariable", "is_objective": true, "name": "y", "description": "yield (%)", "units": null, "bounds": [0.0, 100.0]}], "name": "MIT_case3", "data": {"index": [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20], "columns": [["conc_cat", "DATA"], ["t", "DATA"], ["cat_index", "DATA"], ["temperature", "DATA"], ["y", "DATA"], ["computation_t", "METADATA"], ["experiment_t", "METADATA"], ["strategy", "METADATA"], ["task", "METADATA"]], "data": [[0.00334, 465.0, 4.0, 50.0, 0.17985231773569993, 0.0, 0.010438919067382812, "LHS", 1.0], [0.00167, 195.0, 2.0, 90.0, 0.4300858048986515, 0.0, 0.007607936859130859, "LHS", 1.0], [0.0034447615034878254, 398.8768005371094, 0.0, 86.5774154663086, 0.7087101512715346, 0.612335205078125, 0.0053560733795166016, "MTBO", 1.0], [0.0035142661072313786, 469.67535400390625, 0.0, 100.76272583007812, 0.8761409152190283, 0.5955960750579834, 0.008198976516723633, "MTBO", 1.0], [0.0035787997767329216, 467.1439514160156, 0.0, 100.46145629882812, 0.886102600066166, 2.077770948410034, 0.005563974380493164, "MTBO", 1.0], [0.0036390265449881554, 456.92108154296875, 0.0, 99.57943725585938, 0.8747769514028325, 1.5332398414611816, 0.005621910095214844, "MTBO", 1.0], [0.0036954847164452076, 458.5978088378906, 0.0, 99.77110290527344, 0.8801721297207287, 1.906566858291626, 0.006039142608642578, "MTBO", 1.0], [0.003748619230464101, 462.1470031738281, 0.0, 100.17256164550781, 0.8840563872117152, 1.6930909156799316, 0.00556492805480957, "MTBO", 1.0], [0.00379879935644567, 462.4292297363281, 0.0, 100.17167663574219, 0.8826458699667642, 2.2919270992279053, 0.005766868591308594, "MTBO", 1.0], [0.0038463366217911243, 462.43743896484375, 0.0, 99.96544647216797, 0.8711503509208562, 1.6909892559051514, 0.006745815277099609, "MTBO", 1.0], [0.0038914955221116543, 455.2014465332031, 0.0, 100.04133605957031, 0.8618410234939013, 1.141875982284546, 0.005749940872192383, "MTBO", 1.0], [0.003934502601623535, 457.7851867675781, 0.0, 101.14637756347656, 0.869856446244295, 1.657970905303955, 0.005429983139038086, "MTBO", 1.0], [0.0039755539037287235, 457.88671875, 0.0, 102.14500427246094, 0.8819748369024276, 2.7099609375, 0.006225109100341797, "MTBO", 1.0], [0.004014819394797087, 459.4237365722656, 0.0, 103.44039916992188, 0.8870474964489505, 2.432636022567749, 0.005860805511474609, "MTBO", 1.0], [0.004052448086440563, 459.138427734375, 0.0, 103.84227752685547, 0.8870364258181691, 2.195765972137451, 0.005599021911621094, "MTBO", 1.0], [0.004088571295142174, 459.00555419921875, 0.0, 104.21199035644531, 0.9077853500875166, 2.2678537368774414, 0.005499124526977539, "MTBO", 1.0], [0.004123304039239883, 458.68206787109375, 0.0, 103.70012664794922, 0.9098753271024206, 2.3990237712860107, 0.005520820617675781, "MTBO", 1.0], [0.004156750161200762, 462.7941589355469, 0.0, 103.77993774414062, 0.8959738826523851, 2.351633071899414, 0.0054399967193603516, "MTBO", 1.0], [0.004189001861959696, 446.3855285644531, 0.0, 103.02916717529297, 0.8920960121974274, 3.015841007232666, 0.006087064743041992, "MTBO", 1.0], [0.004220140632241964, 454.107666015625, 0.0, 103.39730072021484, 0.8951730977924046, 2.0994012355804443, 0.005863189697265625, "MTBO", 1.0], [0.004250241443514824, 455.1102600097656, 0.0, 103.8165512084961, 0.8956178120904785, 2.6970789432525635, 0.0057239532470703125, "MTBO", 1.0]]}, "experiment_params": {"noise_level": 1}, "extras": [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]}}
Loading

0 comments on commit 8742129

Please sign in to comment.