Skip to content

Commit

Permalink
upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Bin-Cao committed Aug 17, 2023
1 parent 033ddd4 commit 2065507
Show file tree
Hide file tree
Showing 16 changed files with 1,126 additions and 0 deletions.
Binary file modified .DS_Store
Binary file not shown.
Binary file modified Template/.DS_Store
Binary file not shown.
Binary file added Template/中文示例/.DS_Store
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"id": "65d0b5a6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"A Bayesian global optimization package\n",
"Bgolearn, Bin CAO, HKUST(GZ)\n",
"Intro : https://bgolearn.netlify.app/\n",
"URL : https://github.com/Bin-Cao/Bgolearn\n",
"Executed on : 2023-08-17 16:16:41 | Have a great day.\n",
"\n",
"██████╗ ██████╗ ██████╗ \n",
"██╔══██╗██╔════╝ ██╔═══██╗\n",
"██████╔╝██║ ███╗██║ ██║\n",
"██╔══██╗██║ ██║██║ ██║\n",
"██████╔╝╚██████╔╝╚██████╔╝\n",
"╚═════╝ ╚═════╝ ╚═════╝ \n",
"\n",
"================================================================================\n",
"The internal model is instantiated with optimized homogenous noise\n",
"current optimal is : 20.72380529\n",
"The next datum recomended by Expected Improvement : \n",
" x = [ 71 300]\n"
]
},
{
"data": {
"text/plain": [
"(array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]),\n",
" array([[ 71, 300]]))"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import Bgolearn.BGOsampling as BGOS\n",
"import pandas as pd\n",
"\n",
"data = pd.read_csv('TrainingData.csv')\n",
"x = data.iloc[:,:-1]\n",
"y = data.iloc[:,-1]\n",
"\n",
"dd = pd.read_csv('DesignData.csv') \n",
"\n",
"Bgolearn = BGOS.Bgolearn()\n",
"\n",
"Mymodel = Bgolearn.fit(data_matrix = x, Measured_response = y, virtual_samples = dd)\n",
"\n",
"Mymodel.EI()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f3f132c4",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
101 changes: 101 additions & 0 deletions Template/中文示例/单目标实现/DesignData.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
component,time
7,237
12,493
53,236
14,529
5,294
69,387
43,274
7,181
18,272
72,270
90,225
21,100
56,496
12,549
77,293
9,103
41,474
58,152
6,147
86,172
17,504
3,249
56,393
62,235
61,528
5,493
40,275
67,510
62,205
78,427
68,389
41,106
51,557
99,430
66,322
88,375
82,507
86,405
63,366
86,314
48,361
5,533
97,430
24,471
11,567
63,436
34,187
43,272
71,300
10,470
59,298
74,498
44,108
25,400
12,525
81,286
2,558
46,217
52,372
65,470
8,427
37,353
98,422
93,219
70,347
23,178
69,327
49,484
60,122
2,168
59,198
3,231
46,450
35,588
56,424
54,100
14,416
9,361
46,462
12,142
56,559
2,507
69,293
10,379
89,425
52,114
42,234
61,116
97,387
43,312
45,112
82,425
21,552
54,132
92,545
87,173
48,442
31,480
11,522
81,129
21 changes: 21 additions & 0 deletions Template/中文示例/单目标实现/TrainingData.csv
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
component,time,property
82,157,176.5299641
4,479,29.88606863
36,225,87
29,171,71.07669683
95,152,202.328828
87,479,195.8860686
70,144,152
76,316,169.7763888
5,115,20.72380529
12,211,38.52583905
30,358,78.92088793
78,113,166.6301458
72,201,158.1774469
92,432,204.7846097
90,379,199.4679223
54,212,122.5602198
58,401,136.0249844
36,514,94.6715681
1,488,24.09072203
21,457,63.37755833
97 changes: 97 additions & 0 deletions Template/中文示例/单目标实现/单目标.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": 3,
"id": "65d0b5a6",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"A Bayesian global optimization package\n",
"Bgolearn, Bin CAO, HKUST(GZ)\n",
"Intro : https://bgolearn.netlify.app/\n",
"URL : https://github.com/Bin-Cao/Bgolearn\n",
"Executed on : 2023-08-17 16:16:41 | Have a great day.\n",
"\n",
"██████╗ ██████╗ ██████╗ \n",
"██╔══██╗██╔════╝ ██╔═══██╗\n",
"██████╔╝██║ ███╗██║ ██║\n",
"██╔══██╗██║ ██║██║ ██║\n",
"██████╔╝╚██████╔╝╚██████╔╝\n",
"╚═════╝ ╚═════╝ ╚═════╝ \n",
"\n",
"================================================================================\n",
"The internal model is instantiated with optimized homogenous noise\n",
"current optimal is : 20.72380529\n",
"The next datum recomended by Expected Improvement : \n",
" x = [ 71 300]\n"
]
},
{
"data": {
"text/plain": [
"(array([0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.,\n",
" 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0., 0.]),\n",
" array([[ 71, 300]]))"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"import Bgolearn.BGOsampling as BGOS\n",
"import pandas as pd\n",
"\n",
"data = pd.read_csv('TrainingData.csv')\n",
"x = data.iloc[:,:-1]\n",
"y = data.iloc[:,-1]\n",
"\n",
"dd = pd.read_csv('DesignData.csv') \n",
"\n",
"Bgolearn = BGOS.Bgolearn()\n",
"\n",
"Mymodel = Bgolearn.fit(data_matrix = x, Measured_response = y, virtual_samples = dd)\n",
"\n",
"Mymodel.EI()"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "f3f132c4",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
Binary file not shown.
Loading

0 comments on commit 2065507

Please sign in to comment.