我想根据裂缝的深度对其进行分类。 为此,我将以下功能存储在数据框中:
WindowsDf = pd.DataFrame(dataForWindowsDf, columns=['IsCrack', 'CheckTypeEncode', 'DepthCrack',
'WindowOfInterest'])
#dataForWindowsDf is a list which iteratively built from csv files.
#Windows data frame taking this list and build a data frame from it.
因此,我的目标列是“DepthCrack”,其他列是特征向量的一部分。 WindowOfInterest是一列2d列表-点列表-表示已完成测试的图形(基于从表面返回的电磁波作为时间的函数):
[[0.9561600000000001, 0.10913097635410397], [0.95621,0.1100000]...]
我面临的问题是如何训练一个模型——使用一列2d列表(我试图按原样推,但没有成功)? 你建议用什么方法来处理这个问题
我考虑从2d列表中提取特征,以获得一维特征(积分等)
您可以将这一特性一分为二,就像
WindowOfInterest
可以变成:WindowOfInterest_x1
和WindowOfInterest_x2
例如,您的
DataFrame
:我们可以{}像这样{}
最后,我们可以
drop
列WindowOfInterest
:现在,您可以将
WindowOfInterest_x1
和WindowOfInterest_x2
作为模型的功能传递相关问题 更多 >
编程相关推荐