Title: Invalid call to function [extra arguments] in learning.py · Issue #830 · aimacode/aima-python · GitHub
Open Graph Title: Invalid call to function [extra arguments] in learning.py · Issue #830 · aimacode/aima-python
X Title: Invalid call to function [extra arguments] in learning.py · Issue #830 · aimacode/aima-python
Description: function train_and_test has prototype: def train_and_test(dataset, start, end): but it is passed 4 arguments in the below function in learning.py. def learningcurve(learner, dataset, trials=10, sizes=None): if sizes is None: sizes = list...
Open Graph Description: function train_and_test has prototype: def train_and_test(dataset, start, end): but it is passed 4 arguments in the below function in learning.py. def learningcurve(learner, dataset, trials=10, siz...
X Description: function train_and_test has prototype: def train_and_test(dataset, start, end): but it is passed 4 arguments in the below function in learning.py. def learningcurve(learner, dataset, trials=10, siz...
Opengraph URL: https://github.com/aimacode/aima-python/issues/830
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Invalid call to function [extra arguments] in learning.py","articleBody":"function `train_and_test` has prototype:\r\n```python\r\ndef train_and_test(dataset, start, end):\r\n```\r\nbut it is passed 4 arguments in the below function in learning.py.\r\n```python\r\ndef learningcurve(learner, dataset, trials=10, sizes=None):\r\n if sizes is None:\r\n sizes = list(range(2, len(dataset.examples) - 10, 2))\r\n\r\n def score(learner, size):\r\n random.shuffle(dataset.examples)\r\n return train_and_test(learner, dataset, 0, size)\r\n return [(size, mean([score(learner, size) for t in range(trials)]))\r\n for size in sizes]\r\n```\r\nI think `learner` should not be passed, but then it is the only use of `learner` parameter in `train_and_test`.\r\nHow should this be resolved?","author":{"url":"https://github.com/goswami-rahul","@type":"Person","name":"goswami-rahul"},"datePublished":"2018-03-09T13:47:35Z","url":"https://github.com/aimacode/aima-python/issues/830"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| 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:7377e0c0-5446-3e24-1093-579a66f8096f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9A12:291B58:3C10281:4BFE78A:6B023E01 |
| html-safe-nonce | f0ba414bd939f16eb3b26931e2eb7481609073b3a5856671afee2cb41a7d7b94 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5QTEyOjI5MUI1ODozQzEwMjgxOjRCRkU3OEE6NkIwMjNFMDEiLCJ2aXNpdG9yX2lkIjoiMjg1Mjk3NDkwOTExNjc5MjMyMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | b6e3a9137cb3f42b7c5ad3ca0689814e86535771c92c35d1ee7a7d8653ca77e8 |
| hovercard-subject-tag | issue:303846355 |
| 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/aimacode/aima-python/830/issue_layout |
| twitter:image | https://opengraph.githubassets.com/455a10797d9a318073590a0956ca0be89365a3a3907aad1bdfcc9f95447d6fb2/aimacode/aima-python/issues/830 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/455a10797d9a318073590a0956ca0be89365a3a3907aad1bdfcc9f95447d6fb2/aimacode/aima-python/issues/830 |
| og:image:alt | function train_and_test has prototype: def train_and_test(dataset, start, end): but it is passed 4 arguments in the below function in learning.py. def learningcurve(learner, dataset, trials=10, siz... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | goswami-rahul |
| hostname | github.com |
| expected-hostname | github.com |
| None | 87e774ee7c6b3bee0490394e4d3e57ec9dbc956f74b87ea685dc8996c1676456 |
| turbo-cache-control | no-preview |
| go-import | github.com/aimacode/aima-python git https://github.com/aimacode/aima-python.git |
| octolytics-dimension-user_id | 17015933 |
| octolytics-dimension-user_login | aimacode |
| octolytics-dimension-repository_id | 50881110 |
| octolytics-dimension-repository_nwo | aimacode/aima-python |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 50881110 |
| octolytics-dimension-repository_network_root_nwo | aimacode/aima-python |
| 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 | 423dbb54c5e7bfecc838eb387c1435eb3d0e760d |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width