简体   繁体   English

数据集的维数有一个词吗?

[英]Is there a word for the number of dimensions of a data set?

I have some code that generates some code, and I want to store the number of dimensions of the resulting data structure in a variable. 我有一些生成一些代码的代码,我想将生成的数据结构的维数存储在一个变量中。 I'm looking for the right name for this variable. 我正在寻找该变量的正确名称。 For example, int should have the value 0, List<int> should have the value 1, List<List<int>> should have the value 2, and so on. 例如, int的值应为0, List<int>的值应为1, List<List<int>>的值应为2,依此类推。

Is there a word from set theory or otherwise that describes this number? 集合论中有没有一个用这个词来形容这个数字? (At first I thought it was cardinality but apparently that's the size of a set, not the nested-ness of the set....) (起初我以为是基数,但显然这是集合的大小,而不是集合的嵌套性。...)

The word you are looking for, would seem to be rank 您正在查找的词,似乎是排名

In computer programming, rank with no further specifications is usually a synonym for (or refers to) "number of dimensions"; 在计算机编程中,没有进一步说明的等级通常是“维数”的同义词(或指代)。 thus, a bi-dimensional array has rank two, a three-dimensional array has rank three and so on. 因此,二维数组的等级为2,三维数组的等级为3,依此类推。 Strictly, no formal definition can be provided which applies to every programming language, since each of them has its own concepts, semantics and terminology; 严格来说,由于每种编程语言都有自己的概念,语义和术语,因此无法提供适用于每种编程语言的正式定义。 the term may not even be applicable or, to the contrary, applied with a very specific meaning in the context of a given language. 该术语甚至可能不适用,或者相反,在给定语言的上下文中具有非常特定的含义。

The same term is also used in linear algebra : 线性代数中也使用相同的术语:

In linear algebra, the rank of a matrix A is the size of the largest collection of linearly independent columns of A (the column rank) or the size of the largest collection of linearly independent rows of A (the row rank). 在线性代数中,矩阵A的秩是A的线性独立列的最大集合的大小(列秩)或A的线性独立行的最大集合的大小(行秩)。 For every matrix, the column rank is equal to the row rank. 对于每个矩阵,列等级等于行等级。 It is a measure of the "nondegenerateness" of the system of linear equations and linear transformation encoded by A. There are multiple equivalent definitions of rank. 它是对A编码的线性方程组和线性变换系统的“非简并性”的度量。秩的定义有多个。 A matrix's rank is one of its most fundamental characteristics. 矩阵的等级是其最基本的特征之一。

Also refer to this discussion on the definition of rank as related to sets from the maths stackexchange. 另请参阅有关等级定义的讨论,该定义与数学stackexchange中的集合相关

Finally this is how OPs employer names it for arrays :D 最终, 就是OP老板为数组命名的方式:D

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM