Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
Bin-Cao committed Dec 28, 2023
1 parent 815d741 commit f0af696
Show file tree
Hide file tree
Showing 6 changed files with 445 additions and 431 deletions.
54 changes: 34 additions & 20 deletions Template/regression.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,10 @@
"source": [
"Thank you for choosing Bgolearn for material design. \n",
"Bgolearn is developed to facilitate the application of machine learning in research.\n",
"Bgolearn is designed for optimizing single-target material properties. \n",
"Bgolearn is designed for optimizing single-target material properties.\n",
"The BgoKit package is being developed to facilitate multi-task design.\n",
"\n",
"\n",
"If you need to perform multi-target optimization, here are two important reminders:\n",
"\n",
"1. Multi-tasks can be converted into a single task using domain knowledge. \n",
Expand Down Expand Up @@ -56,19 +59,20 @@
"name": "stdout",
"output_type": "stream",
"text": [
"A Bayesian global optimization package\n",
"Bgolearn, Bin CAO, HKUST(GZ)\n",
" ____ _ \n",
"| __ ) __ _ ___ | | ___ __ _ _ __ _ __ \n",
"| _ \\ / _` | / _ \\ | | / _ \\ / _` || '__|| '_ \\ \n",
"| |_) || (_| || (_) || || __/| (_| || | | | | |\n",
"|____/ \\__, | \\___/ |_| \\___| \\__,_||_| |_| |_|\n",
" |___/ \n",
"\n",
"Package Name : Bgolearn\n",
"Author : Bin CAO, HKUST(GZ)\n",
"Intro : https://bgolearn.netlify.app/\n",
"URL : https://github.com/Bin-Cao/Bgolearn\n",
"Executed on : 2023-12-27 15:37:35 | Have a great day.\n",
"\n",
"██████╗ ██████╗ ██████╗ \n",
"██╔══██╗██╔════╝ ██╔═══██╗\n",
"██████╔╝██║ ███╗██║ ██║\n",
"██╔══██╗██║ ██║██║ ██║\n",
"██████╔╝╚██████╔╝╚██████╔╝\n",
"╚═════╝ ╚═════╝ ╚═════╝ \n",
"\n",
"Citation Format Suggestion:\n",
"[Bin CAO et al]. \"Active learning accelerates the discovery of high strength and high ductility lead-free solder alloys\" [Journal], [2023], [DOI : xx].\n",
"Executed on : 2023-12-28 15:38:49 | Have a great day.\n",
"================================================================================\n"
]
}
Expand Down Expand Up @@ -472,7 +476,7 @@
{
"data": {
"text/plain": [
"<matplotlib.legend.Legend at 0x177ec35e0>"
"<matplotlib.legend.Legend at 0x14f46c520>"
]
},
"execution_count": 9,
Expand Down Expand Up @@ -510,7 +514,7 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 13,
"metadata": {},
"outputs": [
{
Expand All @@ -521,20 +525,27 @@
"current optimal is : 4.4140625\n",
"The 1-th datum recomended by Expected Improvement : \n",
" x = [8.2]\n",
"[8.2]\n",
"The predictions of Bgolearn are : \n",
" y = 4.338227476898954\n",
"The 2-th datum recomended by Expected Improvement : \n",
" x = [8.3]\n",
"[8.3]\n",
"The predictions of Bgolearn are : \n",
" y = 4.294587329706257\n",
"The 3-th datum recomended by Expected Improvement : \n",
" x = [8.1]\n",
"[8.1]\n"
"The predictions of Bgolearn are : \n",
" y = 4.397302263077634\n",
"The 4-th datum recomended by Expected Improvement : \n",
" x = [8.4]\n",
"The predictions of Bgolearn are : \n",
" y = 4.271564943821996\n"
]
}
],
"source": [
"Bgolearn = BGOS.Bgolearn()\n",
"\n",
"Mymodel = Bgolearn.fit(data_matrix = x,Measured_response = y , virtual_samples = vs,opt_num=3)\n",
"Mymodel = Bgolearn.fit(data_matrix = x,Measured_response = y ,virtual_samples = vs,opt_num=4)\n",
"\n",
"# Expected Improvement method\n",
"score, data = Mymodel.EI()"
Expand Down Expand Up @@ -924,16 +935,19 @@
},
{
"cell_type": "code",
"execution_count": 10,
"execution_count": 16,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"The internal model is instantiated with optimized homogenous noise\n",
"Execution using a single process\n",
"The next datum recomended by Knowledge Gradient : \n",
" x = [8.2]\n"
" x = [6.9]\n",
"The predictions of Bgolearn are : \n",
" y = 5.0823131435026045\n"
]
}
],
Expand Down
Loading

0 comments on commit f0af696

Please sign in to comment.