Title: fit_transform() returns features in different order to sklearn · Issue #1 · ThomIves/MachineLearningModulePurePy · GitHub
Open Graph Title: fit_transform() returns features in different order to sklearn · Issue #1 · ThomIves/MachineLearningModulePurePy
X Title: fit_transform() returns features in different order to sklearn · Issue #1 · ThomIves/MachineLearningModulePurePy
Description: I am attempting to use your excellent library alongside m2cgen and an sklearn model. The test data (and ultimately the live feature data) needs to be poly transformed prior to feeding into the m2cgen generated method. It seems that Machi...
Open Graph Description: I am attempting to use your excellent library alongside m2cgen and an sklearn model. The test data (and ultimately the live feature data) needs to be poly transformed prior to feeding into the m2cg...
X Description: I am attempting to use your excellent library alongside m2cgen and an sklearn model. The test data (and ultimately the live feature data) needs to be poly transformed prior to feeding into the m2cg...
Opengraph URL: https://github.com/ThomIves/MachineLearningModulePurePy/issues/1
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"fit_transform() returns features in different order to sklearn","articleBody":"I am attempting to use your excellent library alongside m2cgen and an sklearn model.\r\n\r\nThe test data (and ultimately the live feature data) needs to be poly transformed prior to feeding into the m2cgen generated method.\r\n\r\nIt seems that `MachineLearningPurePy.Poly_Features_Pure_Py.fit_transform` returns the transformed values in a different order to `sklearn.PolynomialFeatures.fit_transform`.\r\n\r\nI haven't been able to see if there is a parameter that allows for returning of the data in the same order. Or, perhaps you could please let me know how I might programatically translate the order to that of sklearn.\r\n\r\nHere are the two outputs that have the same values just in a different order.\r\n\r\nPoly sample pp as np array: \r\n [[1.60156810e+07 1.59576532e+07 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 5.80278298e+05 1.58998356e+07 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 5.78175840e+05 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 2.10245760e+04 1.58422275e+07 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 5.76081000e+05 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 2.09484000e+04\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 7.61760000e+02\r\n 1.57848281e+07 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 5.73993750e+05 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 2.08725000e+04 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 7.59000000e+02 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 2.76000000e+01 1.57276367e+07 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 5.71914062e+05 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 2.07968750e+04 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 7.56250000e+02 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 2.75000000e+01\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.00000000e+00]]\r\n\r\nPoly sample sk: \r\n [[1.00000000e+00 2.76000000e+01 2.75000000e+01 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 7.61760000e+02 7.59000000e+02\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 7.56250000e+02\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 2.10245760e+04 2.09484000e+04 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 2.08725000e+04 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 2.07968750e+04 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 5.80278298e+05 5.78175840e+05 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 5.76081000e+05 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.73993750e+05\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 5.71914062e+05\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 1.60156810e+07 1.59576532e+07\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 1.58998356e+07\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 1.58422275e+07 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 1.57848281e+07 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 1.57276367e+07 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00\r\n 0.00000000e+00 0.00000000e+00 0.00000000e+00 0.00000000e+00]]\r\n\r\n\r\nTIA\r\n","author":{"url":"https://github.com/ryanviolet","@type":"Person","name":"ryanviolet"},"datePublished":"2022-11-29T19:34:42.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":8},"url":"https://github.com/1/MachineLearningModulePurePy/issues/1"}
| 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:58772942-bf38-d500-0d0a-662f194bb1e9 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 92E4:F166E:747985:973BD8:69927D41 |
| html-safe-nonce | b82de7c80fcbd4515b7a451bf3063d13ff3a7ecfb9c0fede7211fb6df8c46067 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5MkU0OkYxNjZFOjc0Nzk4NTo5NzNCRDg6Njk5MjdENDEiLCJ2aXNpdG9yX2lkIjoiNDE3MjQyMTQzOTc1MDgzMTQyNSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 623a0c189cb8799bad2530c8020d9dc0fe0a1d7d275ada2627bfbb3ba901f0cc |
| hovercard-subject-tag | issue:1468595659 |
| 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/ThomIves/MachineLearningModulePurePy/1/issue_layout |
| twitter:image | https://opengraph.githubassets.com/fde98d1628ba63dcf3bca14b0b909d5bf10735edb6081e695e01f72458375491/ThomIves/MachineLearningModulePurePy/issues/1 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/fde98d1628ba63dcf3bca14b0b909d5bf10735edb6081e695e01f72458375491/ThomIves/MachineLearningModulePurePy/issues/1 |
| og:image:alt | I am attempting to use your excellent library alongside m2cgen and an sklearn model. The test data (and ultimately the live feature data) needs to be poly transformed prior to feeding into the m2cg... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ryanviolet |
| hostname | github.com |
| expected-hostname | github.com |
| None | 42c603b9d642c4a9065a51770f75e5e27132fef0e858607f5c9cb7e422831a7b |
| turbo-cache-control | no-preview |
| go-import | github.com/ThomIves/MachineLearningModulePurePy git https://github.com/ThomIves/MachineLearningModulePurePy.git |
| octolytics-dimension-user_id | 28942089 |
| octolytics-dimension-user_login | ThomIves |
| octolytics-dimension-repository_id | 163225785 |
| octolytics-dimension-repository_nwo | ThomIves/MachineLearningModulePurePy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 163225785 |
| octolytics-dimension-repository_network_root_nwo | ThomIves/MachineLearningModulePurePy |
| 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