Sklearn Fit功能作为Modell列表:

发布于 2025-02-12 19:38:26 字数 294 浏览 1 评论 0原文

我想构建一个分类模型,我想在其中输入列表的功能。可以输入列表的功能吗?

z。 B. x = [[0:300],[0:300],[0:300],[0:300]

i具有38个功能,每个功能都包含一个具有300个值的列表。

I want to build a classification model where I want to enter the features as lists. Is it possible to enter the features as lists?

z. B. X=[[0:300], [0:300], [0:300], [0:300]]

I have 38 features and every single feature consists of a list with 300 values.

enter image description here

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

梓梦 2025-02-19 19:38:26

是否可以将功能输入列表?

是的。

但是它们会以一个数组的形式结束(也许在数据框中)
到时间.fit()看到它们,
Zum Beispiel:

>>> np.array([range(3), range(3)])
array([[0, 1, 2],
       [0, 1, 2]])

或等效np.Array([list(range(3)),list(range(3))])

Is it possible to enter the features as lists?

Yes.

But they will wind up as an array (perhaps within a dataframe)
by the time .fit() sees them,
zum Beispiel:

>>> np.array([range(3), range(3)])
array([[0, 1, 2],
       [0, 1, 2]])

or the equivalent np.array([list(range(3)), list(range(3))]).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文