Julia 如何从给定的数据集中提取单个变量?

Julia 如何从给定的数据集中提取单个变量?,julia,feature-extraction,feature-engineering,Julia,Feature Extraction,Feature Engineering,我想询问一下如何从给定的数据集中提取数据(我想这类似于数据分解)。 目标是分解数据集以提取特征 例如:提取矩形棱柱体的卷的各个组件,而不知道各个特征(长度、宽度、高度) 请务必推荐执行该操作的最佳实践。另外,你有没有建议哪本书或哪篇文章能详细解释这个过程 更新 分析的示例代码如下: using DataFrames mutable struct rect length breadth height end r = rect(rand(Int, 40), rand(Int,

我想询问一下如何从给定的数据集中提取数据(我想这类似于数据分解)。 目标是分解数据集以提取特征

例如:提取
矩形棱柱体的
的各个组件,而不知道
各个特征
(长度、宽度、高度)

请务必推荐执行该操作的最佳实践。另外,你有没有建议哪本书或哪篇文章能详细解释这个过程

更新 分析的示例代码如下:

using DataFrames
mutable struct rect
    length
    breadth
    height
end
r = rect(rand(Int, 40), rand(Int, 40), rand(Int, 40))
volume(rect) = rect.length .* rect.breadth .* rect.height
volume_val = volume(r)
df = DataFrame(:length => r.length, :width=> r.width, :height=> r.height, :volume => volume_val)

# For this df dataframe, I would like to extract length, width and height from volume without the use of volume equation

提前谢谢

您的意思是搜索给定体积的长度、宽度和高度值吗

using DataFrames
mutable struct rect
    length
    width
    height
end
r = rect(rand(1:100, 10), rand(1:100, 10), rand(1:100, 10))
volume(rect) = rect.length .* rect.width .* rect.height
volume_val = volume(r)

julia> df = DataFrame(:length => r.length, :width=> r.width, :height=> r.height, :volume => volume_val)
10×4 DataFrame
 Row │ length  width  height  volume
     │ Int64   Int64  Int64   Int64
─────┼───────────────────────────────
   1 │     41     82      58  194996
   2 │     41     57      92  215004
   3 │     88     42      63  232848
   4 │     32     98      12   37632
   5 │     26     65      14   23660
   6 │     94     26      40   97760
   7 │     14     72      65   65520
   8 │     51     72      79  290088
   9 │     36     50      26   46800
  10 │     63     22      94  130284

julia> df[df.volume .== 46800,:]
1×4 DataFrame
 Row │ length  width  height  volume
     │ Int64   Int64  Int64   Int64
─────┼───────────────────────────────
   1 │     36     50      26   46800

谢谢你的反馈!!我的问题更多的是提取
长度
宽度
高度
(特征),而不知道它们在
列中的值。很抱歉,我不明白你想做什么,抱歉,我没有及时回复!问题说明:对于矩形棱镜,默认情况下应该有三个组件,如长度、宽度和高度。但是如果高度丢失了怎么办!,那么,我如何估计高度变量的合适向量呢?比如说,使用统计方法,甚至任何数学模型?让我试着重新措辞,看看我是否理解。如果缺少
length | width | height | volume
中的一个(并且只有一个),则需要查找缺少的值。你应该知道长度*宽度*高度=体积吗?你的问题可能没有简单的解决办法。你可以尝试线性/二次/etc回归,甚至训练人工神经网络