{"id":19462562,"url":"https://github.com/shahaf-f-s/feature-space","last_synced_at":"2026-06-19T05:32:11.927Z","repository":{"id":234462728,"uuid":"788946489","full_name":"Shahaf-F-S/feature-space","owner":"Shahaf-F-S","description":"A modular framework for combining pandas series features","archived":false,"fork":false,"pushed_at":"2024-04-21T14:16:05.000Z","size":15,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-02-19T22:41:28.947Z","etag":null,"topics":["data-analysis","data-science","feature-engineering"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shahaf-F-S.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-19T11:58:34.000Z","updated_at":"2025-02-28T10:50:35.000Z","dependencies_parsed_at":"2024-04-21T15:07:47.040Z","dependency_job_id":"5f1adc20-eaa8-449d-869c-6549d510b401","html_url":"https://github.com/Shahaf-F-S/feature-space","commit_stats":null,"previous_names":["shahaf-f-s/feature-space"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shahaf-F-S/feature-space","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shahaf-F-S%2Ffeature-space","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shahaf-F-S%2Ffeature-space/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shahaf-F-S%2Ffeature-space/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shahaf-F-S%2Ffeature-space/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shahaf-F-S","download_url":"https://codeload.github.com/Shahaf-F-S/feature-space/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shahaf-F-S%2Ffeature-space/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34519049,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-19T02:00:06.005Z","response_time":61,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-analysis","data-science","feature-engineering"],"created_at":"2024-11-10T18:03:42.298Z","updated_at":"2026-06-19T05:32:11.906Z","avatar_url":"https://github.com/Shahaf-F-S.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# feature-space\n\n\u003e A module framework for constructing a network of features supporting each other, yet each feature is calculated only once.\n\n## Installation\n\n```\npip install feature-space\n```\n\n## examples\n\nbasic creation of features and datasets with multiple dependencies.\n\n```python\nimport pandas as pd\nimport numpy as np\n\ndf = pd.DataFrame(\n    {\n        key: np.random.random(100)\n        for key in ('Open', 'High', 'Low', 'Close', 'Volume')\n    }\n)\n\nprint(df)\n```\n\noutput\n```\n        Open      High       Low     Close    Volume\n0   0.306962  0.090669  0.957007  0.382841  0.331181\n1   0.668492  0.233647  0.601794  0.533531  0.761473\n2   0.582980  0.765049  0.453987  0.989116  0.439396\n3   0.053769  0.512395  0.763573  0.589263  0.886496\n4   0.690432  0.372401  0.960555  0.202977  0.133927\n..       ...       ...       ...       ...       ...\n95  0.469604  0.591768  0.590435  0.138835  0.217345\n96  0.304976  0.521499  0.006687  0.545035  0.974107\n97  0.816594  0.639280  0.702651  0.942868  0.681855\n98  0.387333  0.232820  0.563151  0.123126  0.051621\n99  0.930279  0.657109  0.620474  0.794123  0.134324\n```\n\ncreating the indicators with their relationships.\n```python\nfrom feature_space import Column, RSI, Change, Momentum\n\nhigh = Column('High')\nlow = Column('Low')\nclose = Column('Close')\n\nclose_change = Change(close)\nclose_rsi_14 = RSI(close_change, 14)\nclose_momentum = Momentum(close_change, 35)\n```\n\ncreating a dataset to contain and control the features.\nusing the dataset object is simple, but everything it does can be done \nwith individual interactions with each feature.\n```python\nfrom feature_space import Dataset\n\nchange_indicators = Dataset(\n    name='Change_Features',\n    features=[close_change, close_rsi_14, close_momentum]\n)\n\nchange_indicators.calculate(df)\n\ndf.dropna(inplace=True)\n\nprint(df)\n```\n\noutput - all features are present in the dataframe, \nand each one was calculated only once, \neven though some features are required by more than one feature.\n```\noutput\nOpen      High       Low     Close    Volume  Close_Change  Close_RSI_14  Close_Momentum_35\n13  0.762020  0.053808  0.079920  0.061354  0.169120     -0.514332     45.932592          -0.321487\n14  0.683689  0.948868  0.291903  0.461534  0.557272      0.400181     50.904070           0.078693\n15  0.729113  0.352819  0.267228  0.923362  0.331447      0.461828     54.179768           0.540522\n16  0.633024  0.931491  0.092854  0.910211  0.164508     -0.013152     49.065301           0.527370\n17  0.321494  0.662967  0.253199  0.643929  0.810552     -0.266282     50.668724           0.261088\n..       ...       ...       ...       ...       ...           ...           ...                ...\n95  0.469604  0.591768  0.590435  0.138835  0.217345     -0.635993     43.876190          -0.447753\n96  0.304976  0.521499  0.006687  0.545035  0.974107      0.406200     51.201515          -0.293790\n97  0.816594  0.639280  0.702651  0.942868  0.681855      0.397833     57.625151           0.194520\n98  0.387333  0.232820  0.563151  0.123126  0.051621     -0.819742     45.336996           0.061992\n99  0.930279  0.657109  0.620474  0.794123  0.134324      0.670997     48.895303          -0.160722\n```\n\nto recalculate each feature one again, maby after a change in the original source data,\nsimply call the .clear() method on a Feature or a Dataset object.\nThis will not remove any data from the dataframe, just clear the cached referenses to the \nseries in the features.\n\nif you wish to override existing data, you can specify.\n\n```python\nchange_indicators.clear()\nchange_indicators.calculate(df, override=True)\n```\n\nSave and load a whole dataset with its inter-dependency of features:\n```python\nchange_indicators.save('dataset.pkl')\nchange_indicators = Dataset.load('dataset.pkl')\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahaf-f-s%2Ffeature-space","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshahaf-f-s%2Ffeature-space","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshahaf-f-s%2Ffeature-space/lists"}