[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"skill:01M6CX2FQTFZ2KCEYQFCTCNDCD":3,"skill-same:01M6CX2FQTFZ2KCEYQFCTCNDCD":54},{"skillNo":4,"name":5,"nameZh":6,"description":7,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":15,"categories":16,"keywords":17,"publishedAt":26,"linkOnly":27,"markdownContent":28,"markdownBody":29,"frontMatter":30,"refName":34,"commitSha":35,"skillDirectory":5,"forksCount":36,"repositoryHtmlUrl":37,"repositoryHomepageUrl":6,"ownerHtmlUrl":38,"ownerBlogUrl":6,"ownerDescription":6,"updatedAt":39,"install":40,"resources":53},"01M6CX2FQTFZ2KCEYQFCTCNDCD","feature-engineering",null,"Machine learning feature engineering","ffsshhttiikk\u002Fopencode-agents-skills","ffsshhttiikk","https:\u002F\u002Favatars.githubusercontent.com\u002Fu\u002F226346827?v=4","01M6CWD9RR3Y7VRQX3MXYC8FYH","01M6CWD9WVPYAZW0J82G1VKGHY",3,"MIT","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Ffeature-engineering\u002FSKILL.md",[],[18,19,20,21,22,23,24,25],"feature engineering","engineering","machine learning","data","machine-learning","science","learning","opencode","2026-11-10 10:12:30",false,"---\nname: feature-engineering\ndescription: Machine learning feature engineering\nlicense: MIT\ncompatibility: opencode\nmetadata:\n  audience: machine-learning-engineers\n  category: data-science\n---\n\n## What I do\n\n- Create features from raw data for ML models\n- Transform variables for better model performance\n- Handle categorical and numerical features\n- Create interaction and polynomial features\n- Extract features from text, dates, and images\n- Handle missing data strategically\n- Select most predictive features\n\n## When to use me\n\nUse me when:\n- Preparing data for ML models\n- Improving model performance\n- Working with raw\u002Funstructured data\n- Handling complex data types\n- Reducing feature dimensionality\n\n## Key Concepts\n\n### Feature Engineering Techniques\n```python\nimport pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import StandardScaler, OneHotEncoder\nfrom sklearn.impute import SimpleImputer\n\n# Numerical transformations\ndf[\"log_income\"] = np.log1p(df[\"income\"])\ndf[\"income_squared\"] = df[\"income\"] ** 2\ndf[\"income_bucket\"] = pd.cut(df[\"income\"], bins=[0, 30, 60, 100], \n                              labels=[\"low\", \"mid\", \"high\"])\n\n# Date features\ndf[\"order_date\"] = pd.to_datetime(df[\"order_date\"])\ndf[\"order_year\"] = df[\"order_date\"].dt.year\ndf[\"order_month\"] = df[\"order_date\"].dt.month\ndf[\"order_dayofweek\"] = df[\"order_date\"].dt.dayofweek\ndf[\"is_weekend\"] = df[\"order_dayofweek\"].isin([5, 6]).astype(int)\n\n# Aggregation features\nuser_stats = df.groupby(\"user_id\").agg({\n    \"order_id\": \"count\",\n    \"total_amount\": [\"sum\", \"mean\", \"std\"],\n    \"order_date\": [\"min\", \"max\"]\n}).reset_index()\n\n# Merge back\ndf = df.merge(user_stats, on=\"user_id\", how=\"left\")\n\n# Text features\ndf[\"title_length\"] = df[\"title\"].str.len()\ndf[\"word_count\"] = df[\"title\"].str.split().str.len()\ndf[\"has_exclamation\"] = df[\"title\"].str.contains(\"!\").astype(int)\n\n# Categorical encoding\n# One-hot encoding\npd.get_dummies(df, columns=[\"category\"], prefix=\"cat\")\n\n# Target encoding\nmean_encoding = df.groupby(\"category\")[\"target\"].mean()\ndf[\"category_encoded\"] = df[\"category\"].map(mean_encoding)\n```\n\n### Feature Selection\n- **Filter methods**: Correlation, chi-square\n- **Wrapper methods**: RFE, forward selection\n- **Embedded methods**: LASSO, feature importance\n\n### Handling Imbalanced Data\n- SMOTE oversampling\n- Undersampling majority class\n- Class weights in model\n- Focal loss\n","## What I do\n\n- Create features from raw data for ML models\n- Transform variables for better model performance\n- Handle categorical and numerical features\n- Create interaction and polynomial features\n- Extract features from text, dates, and images\n- Handle missing data strategically\n- Select most predictive features\n\n## When to use me\n\nUse me when:\n- Preparing data for ML models\n- Improving model performance\n- Working with raw\u002Funstructured data\n- Handling complex data types\n- Reducing feature dimensionality\n\n## Key Concepts\n\n### Feature Engineering Techniques\n```python\nimport pandas as pd\nimport numpy as np\nfrom sklearn.preprocessing import StandardScaler, OneHotEncoder\nfrom sklearn.impute import SimpleImputer\n\n# Numerical transformations\ndf[\"log_income\"] = np.log1p(df[\"income\"])\ndf[\"income_squared\"] = df[\"income\"] ** 2\ndf[\"income_bucket\"] = pd.cut(df[\"income\"], bins=[0, 30, 60, 100], \n                              labels=[\"low\", \"mid\", \"high\"])\n\n# Date features\ndf[\"order_date\"] = pd.to_datetime(df[\"order_date\"])\ndf[\"order_year\"] = df[\"order_date\"].dt.year\ndf[\"order_month\"] = df[\"order_date\"].dt.month\ndf[\"order_dayofweek\"] = df[\"order_date\"].dt.dayofweek\ndf[\"is_weekend\"] = df[\"order_dayofweek\"].isin([5, 6]).astype(int)\n\n# Aggregation features\nuser_stats = df.groupby(\"user_id\").agg({\n    \"order_id\": \"count\",\n    \"total_amount\": [\"sum\", \"mean\", \"std\"],\n    \"order_date\": [\"min\", \"max\"]\n}).reset_index()\n\n# Merge back\ndf = df.merge(user_stats, on=\"user_id\", how=\"left\")\n\n# Text features\ndf[\"title_length\"] = df[\"title\"].str.len()\ndf[\"word_count\"] = df[\"title\"].str.split().str.len()\ndf[\"has_exclamation\"] = df[\"title\"].str.contains(\"!\").astype(int)\n\n# Categorical encoding\n# One-hot encoding\npd.get_dummies(df, columns=[\"category\"], prefix=\"cat\")\n\n# Target encoding\nmean_encoding = df.groupby(\"category\")[\"target\"].mean()\ndf[\"category_encoded\"] = df[\"category\"].map(mean_encoding)\n```\n\n### Feature Selection\n- **Filter methods**: Correlation, chi-square\n- **Wrapper methods**: RFE, forward selection\n- **Embedded methods**: LASSO, feature importance\n\n### Handling Imbalanced Data\n- SMOTE oversampling\n- Undersampling majority class\n- Class weights in model\n- Focal loss\n",{"name":5,"license":14,"metadata":31,"description":7,"compatibility":25},{"audience":32,"category":33},"machine-learning-engineers","data-science","main","5f7a3e453c98261f93d19a6a7de44ad8f7b72d41",2,"https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk","2026-03-01 06:55:40",{"source":8,"skillName":5,"commands":41,"prompt":51,"zipAvailable":52},[42,45,48],{"tool":43,"command":44},"npx","npx skills add ffsshhttiikk\u002Fopencode-agents-skills --skill feature-engineering",{"tool":46,"command":47},"bunx","bunx skills add ffsshhttiikk\u002Fopencode-agents-skills --skill feature-engineering",{"tool":49,"command":50},"pnpm","pnpm dlx skills add ffsshhttiikk\u002Fopencode-agents-skills --skill feature-engineering","安装技能，技能地址：https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Ffeature-engineering\u002FSKILL.md",true,[],[55,66,74,83,93,102],{"skillNo":56,"name":57,"nameZh":6,"description":58,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":59,"categories":60,"keywords":61,"publishedAt":26},"01M6CXT9TXDF79BWJTMQAPB49G","xamarin","Xamarin cross-platform development","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fxamarin\u002FSKILL.md",[],[57,62,63,64,25,65],"platform","cross-platform","mobile","development",{"skillNo":67,"name":68,"nameZh":6,"description":69,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":70,"categories":71,"keywords":72,"publishedAt":26},"01M6CXT8AD04MFYDA32VW3FKAG","wrangling","Data wrangling fundamentals","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwrangling\u002FSKILL.md",[],[68,73,25,23,21],"data wrangling",{"skillNo":75,"name":76,"nameZh":6,"description":77,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":78,"categories":79,"keywords":80,"publishedAt":26},"01M6CXT717GCN7SRRNPBDP4508","windows","Windows operating system administration and scripting","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwindows\u002FSKILL.md",[],[76,81,25,82],"system","scripting",{"skillNo":84,"name":85,"nameZh":6,"description":86,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":87,"categories":88,"keywords":89,"publishedAt":26},"01M6CXT54K794NMEM3XAPZZDKT","wide-column","Wide-column data model","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwide-column\u002FSKILL.md",[],[90,91,25,92,21],"wide column","databases","model",{"skillNo":94,"name":95,"nameZh":6,"description":96,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":97,"categories":98,"keywords":99,"publishedAt":26},"01M6CXT28FMT2P4V9GZE67WA8E","wide-column-stores","Wide-column database stores","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwide-column-stores\u002FSKILL.md",[],[100,91,25,101],"wide column stores","database",{"skillNo":103,"name":104,"nameZh":6,"description":105,"descriptionZh":6,"repositoryFullName":8,"ownerLogin":9,"ownerAvatarUrl":10,"ownerAccountNo":11,"ownerDisplayName":6,"repositoryNo":12,"starsCount":13,"licenseSpdxId":14,"licenseFileUrl":6,"sourceHtmlUrl":106,"categories":107,"keywords":108,"publishedAt":26},"01M6CXT0D0M0Q4T2N7C2RX7DSN","websockets","WebSocket implementation and best practices","https:\u002F\u002Fgithub.com\u002Fffsshhttiikk\u002Fopencode-agents-skills\u002Fblob\u002Fmain\u002Fwebsockets\u002FSKILL.md",[],[104,109,110,111,25,112,113],"websocket","real-time","time","best practices","implementation"]