Title: Multi Objective Optimization · Issue #40 · AnotherSamWilson/ParBayesianOptimization · GitHub
Open Graph Title: Multi Objective Optimization · Issue #40 · AnotherSamWilson/ParBayesianOptimization
X Title: Multi Objective Optimization · Issue #40 · AnotherSamWilson/ParBayesianOptimization
Description: Hello! Using the "ParBayesianOptimization" package, it possible to use this package for "multi objective optimization" (e.g. optimize several cost functions together)? For example, below I have included an example of multi-objective opti...
Open Graph Description: Hello! Using the "ParBayesianOptimization" package, it possible to use this package for "multi objective optimization" (e.g. optimize several cost functions together)? For example, below I have inc...
X Description: Hello! Using the "ParBayesianOptimization" package, it possible to use this package for "multi objective optimization" (e.g. optimize several cost functions together)? For examp...
Opengraph URL: https://github.com/AnotherSamWilson/ParBayesianOptimization/issues/40
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Multi Objective Optimization","articleBody":"Hello!\r\n\r\nUsing the \"ParBayesianOptimization\" package, it possible to use this package for \"multi objective optimization\" (e.g. optimize several cost functions together)?\r\n\r\nFor example, below I have included an example of multi-objective optimization using an algorithm called \"particle swarm optimization\":\r\n\r\n```\r\n#Load library:\r\nlibrary(mopsocd)\r\n\r\n#load libraries\r\nlibrary(dplyr)\r\n\r\n\r\n# create some data for this example\r\na1 = rnorm(1000,100,10)\r\nb1 = rnorm(1000,100,10)\r\nc1 = sample.int(1000, 1000, replace = TRUE)\r\ntrain_data = data.frame(a1,b1,c1)\r\n\r\n#define function:\r\n\r\nfunct_set \u003c- function (x) {\r\n \r\n \r\n \r\n #bin data according to random criteria\r\n train_data \u003c- train_data %\u003e%\r\n mutate(cat = ifelse(a1 \u003c= x[1] \u0026 b1 \u003c= x[3], \"a\",\r\n ifelse(a1 \u003c= x[2] \u0026 b1 \u003c= x[4], \"b\", \"c\")))\r\n \r\n train_data$cat = as.factor(train_data$cat)\r\n \r\n #new splits\r\n a_table = train_data %\u003e%\r\n filter(cat == \"a\") %\u003e%\r\n select(a1, b1, c1, cat)\r\n \r\n b_table = train_data %\u003e%\r\n filter(cat == \"b\") %\u003e%\r\n select(a1, b1, c1, cat)\r\n \r\n c_table = train_data %\u003e%\r\n filter(cat == \"c\") %\u003e%\r\n select(a1, b1, c1, cat)\r\n \r\n \r\n \r\n #calculate quantile (\"quant\") for each bin\r\n \r\n table_a = data.frame(a_table%\u003e% group_by(cat) %\u003e%\r\n mutate(quant = ifelse(c1 \u003e x[5],1,0 )))\r\n \r\n table_b = data.frame(b_table%\u003e% group_by(cat) %\u003e%\r\n mutate(quant = ifelse(c1 \u003e x[6],1,0 )))\r\n \r\n table_c = data.frame(c_table%\u003e% group_by(cat) %\u003e%\r\n mutate(quant = ifelse(c1 \u003e x[7],1,0 )))\r\n \r\n f1 = mean(table_a$quant)\r\n f2 = mean(table_b$quant)\r\n f3 = mean(table_c$quant)\r\n \r\n \r\n #group all tables\r\n \r\n final_table = rbind(table_a, table_b, table_c)\r\n # calculate the total mean : this is what needs to be optimized\r\n \r\n f4 = mean(final_table$quant)\r\n \r\n #multiple functions are being optimized \r\n return (c(f1, f2, f3, f4));\r\n}\r\n\r\n#constraints (I know this is not currently possible in ParBayesianOptimization)\r\n gn \u003c- function(x) {\r\n g1 \u003c- x[2] - x[1] \u003e 0.0\r\n g2 \u003c- x[4] - x[3] \u003e 0.0\r\n g3 \u003c- x[7] - x[6] \u003e0\r\n g4\u003c- x[6] - x[5] \u003e0\r\n return(c(g1,g2,g3, g4))\r\n}\r\n\r\n## Set Arguments/Bounds \r\n\r\nvarcount \u003c- 7\r\nfncount \u003c- 4\r\nlbound \u003c- c(80,90,80,90,100, 200, 300)\r\nubound \u003c- c(90,110,90,110,200, 300, 500)\r\noptmin \u003c- 0\r\n\r\n\r\n\r\n#optimization of multiple cost functions\r\nex1 \u003c- mopsocd(funct_set,gn, varcnt=varcount,fncnt=fncount,\r\n lowerbound=lbound,upperbound=ubound,opt=optmin)\r\n```\r\n\r\nWould it be possible to solve a similar style problem (i.e. optimization of multiple objective functions) using the ParBayesianOptimization library?\r\n\r\nThanks so much!","author":{"url":"https://github.com/swaheera","@type":"Person","name":"swaheera"},"datePublished":"2021-07-13T16:51:06.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/40/ParBayesianOptimization/issues/40"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:029cf227-0dc2-0c40-7c06-7af609f8a2ec |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 932E:1BA2DE:DA8885:11E639A:6992933C |
| html-safe-nonce | e4491faae9bd0a0783743155d0aeb28761b7f160469bc7f8cbce0aa7cc890ab9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MzJFOjFCQTJERTpEQTg4ODU6MTFFNjM5QTo2OTkyOTMzQyIsInZpc2l0b3JfaWQiOiI1MjA3MDQzOTc1NzY5Mzk2MDI4IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | d22280c0e1e869039d83584a08ff7e509a47e34d7da8beb2e65365d86f791f8e |
| hovercard-subject-tag | issue:943631693 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/AnotherSamWilson/ParBayesianOptimization/40/issue_layout |
| twitter:image | https://opengraph.githubassets.com/cdd6485b4f8107a90e6e945e1027a36f7599e647967ef33f8b8aa0acc1d82599/AnotherSamWilson/ParBayesianOptimization/issues/40 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/cdd6485b4f8107a90e6e945e1027a36f7599e647967ef33f8b8aa0acc1d82599/AnotherSamWilson/ParBayesianOptimization/issues/40 |
| og:image:alt | Hello! Using the "ParBayesianOptimization" package, it possible to use this package for "multi objective optimization" (e.g. optimize several cost functions together)? For example, below I have inc... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | swaheera |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/AnotherSamWilson/ParBayesianOptimization git https://github.com/AnotherSamWilson/ParBayesianOptimization.git |
| octolytics-dimension-user_id | 44655289 |
| octolytics-dimension-user_login | AnotherSamWilson |
| octolytics-dimension-repository_id | 155993502 |
| octolytics-dimension-repository_nwo | AnotherSamWilson/ParBayesianOptimization |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 155993502 |
| octolytics-dimension-repository_network_root_nwo | AnotherSamWilson/ParBayesianOptimization |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 848bc6032dcc93a9a7301dcc3f379a72ba13b96e |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width