Categorical names (again)
还没有人认领这个 Issue。
评估
调研方向
首先跟踪 dmatrix 入口点以及示例中提到的 Treatment 对比。检查指定的参考水平如何纳入列名,然后确定预期的命名行为,并添加涵盖默认参考水平和显式指定参考水平的测试。
由索引模型根据 Issue 内容生成。
描述
Do we really need, say, the reference level in the Treatment contrast? I'm not sure it adds enough information vs. the complexity it adds to the names to warrant inclusion. Thoughts? AFAICT, it only appears if you specify a reference level. If you specify one, then surely you know what you specified.
[~/]
[7]: dmatrix('~C(A, Treatment)', data=pd.DataFrame([['some really long name'], ['other name'], ['other name']], columns=['A']))
[7]:
DesignMatrix with shape (3, 2)
Intercept C(A, Treatment)[T.some really long name]
1 1
1 0
1 0
Terms:
'Intercept' (column 0)
'C(A, Treatment)' (column 1)
[~/]
[8]: dmatrix("~C(A, Treatment('some really long name'))", data=pd.DataFrame([['some really long name'], ['other name'], ['other name']], columns=['A']))
[8]:
DesignMatrix with shape (3, 2)
Intercept C(A, Treatment('some really long name'))[T.other name]
1 0
1 1
1 1
Terms:
'Intercept' (column 0)
"C(A, Treatment('some really long name'))" (column 1)
- 主要语言
- Python
- 星标
- 990
- 派生
- 113
- 平均合并
- 2 天 8 小时
- 30 天内合并 PR
- 3
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
pydata/patsy 的其他 Issue
-
VarLookupDict should implement __iter__, causes CPython crash when using statsmodels in marimo notebook可能已有人在做 @kouyouqi123 于 173 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 72/100
-
Add link to license in readme可能已有人在做 @zheng-guannan577 于 9 天前认领。 未关闭
难度 1/5 1 小时以内 新手友好度 72/100
-
难度 1/5 1 小时以内 新手友好度 68/100
-
Nullable pandas dtypes crash in categorical handling: "Cannot interpret 'BooleanDtype' as a data type"可能已有人在做 @RaphaelFakhri 于 15 天前认领。 未关闭
难度 3/5 1-2 天 新手友好度 35/100
-
cc() truncates periodic coordinates for integer input with fractional bounds可能已有人在做 @ktz03 于 39 天前认领。 未关闭
难度 2/5 1-3 小时 新手友好度 35/100
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 78/100
abetlen/llama-cpp-python#2424 ·
维护者通常 1 天内回复
-
Bug IronPython Python 3
难度 2/5 1-3 小时 新手友好度 72/100
pyrevitlabs/pyRevit#4184 ·
维护者通常 1 天内回复
-
难度 1/5 1 小时以内 新手友好度 74/100
jqueryscript/awesome-claude-code#1009 ·
-
tests
难度 2/5 1-3 小时 新手友好度 66/100
维护者通常 3 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复