Hacktoberfest 2026:维护者为十月标记出来的 issue,仍然开放、适合新手。 浏览 Hacktoberfest issue

Primitive for normalizing (feature scaling) input data

未关闭
#82 2 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
25/100
Issue 类型
功能
描述清晰度
需要澄清
活跃度
停滞
技术栈
pandas, python

调研方向

首先检查现有的 Python primitive 约定,以及此 repository 中如何处理 pandas DataFrames。明确目标范围应为 [-1,1] 还是所提供公式中的 [0,1],以及预期的 trimming、clipping 和 inplace 行为。完成的标准是:该 normalization primitive 及其边界情况都由测试覆盖。

由索引模型根据 Issue 内容生成。

描述

new primitives Pending Review

I want to create a primitive for normalization of data, or feature scaling so that the input is rescaled to [-1,1]

The formula for rescaling is
X_rescaled = (X - X.min) / (X.max - X.min)

The primitive input arguments are:

  • data (pandas dataframe)
  • column (string): the column to be rescaled
  • trim_percentage (float): percentage from the bottom and top to trim
  • inplace=True: if false, creates a new column called rescaled_input

Here are some potential issues with the implementation:

  • the implementation will run on historic data. If this primitive were to be used in an online system, we would have to either implement dynamic rescaling of dataset or automatically flag values larger than min and max as anomalies. Or we can just clip the input and assign large values as -1 or 1. The last suggestion makes the most sense, in my opinion.

  • distribution of the data. The data may have an outlier (very large value, e.g. 1234) and then the remaining values would be somewhere between -10 and 10. This would result in bad rescaling. One solution is to trim the lowest and highest 1% values, but what if those were outliers?

主要语言
Python
星标
70
派生
37
PR 合并指标
30 天内没有已合并 PR

环境准备

  • 没有 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

MLBazaar/MLPrimitives 的其他 Issue

查看 MLBazaar/MLPrimitives 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。