Data structures are methods of organizing and storing data in a computer so that it can be used efficiently [1]. The sources describe various data structures, including those in the R programming language, as well as how data is organized within data mining contexts.
Data Structures in R
Vectors: A vector is a sequence of elements of the same data type [1, 2]. Vectors are a basic data structure in R and are one-dimensional [3].
Elements in a vector can be accessed using indexing, where the first element is at index 1 [3]. Subsets of vectors can be created by specifying ranges of indices, or a vector of logical values [3].
R supports vectorization, where operations are performed on all elements of a vector simultaneously [2, 4].
Matrices: Matrices are two-dimensional arrays where all elements are of the same type [2, 4].
Lists: Lists are versatile data structures in R that can contain elements of different types, including vectors, matrices, and even functions [2, 4]. Lists are heterogeneous, unlike vectors and matrices, which must be homogeneous [1].
Data Frames: Data frames are a common way to store and interact with data in R [5]. They are similar to tables, where each column can be of a different data type [5].
Data Structures in Data Mining
Record Data: Data can be structured as a collection of records, where each record is a data object described by a set of attributes [6, 7]. These records can be stored in flat files or relational database systems [7].
Graph-based Data: In some cases, data objects have relationships, and the data can be represented as a graph where objects are nodes, and relationships are links [8].
Graphs can also represent the structure of objects, where nodes are sub-objects and links represent relationships between those sub-objects [9].
Ordered Data: Data that has a time or spatial relationship such as sequential and temporal data [10].
Sequential Data is like record data with an associated time [10].
Sequence data represents ordered relationships without explicit time stamps [11].
Multidimensional Arrays: Data can be organized into multidimensional arrays, often called data cubes [12, 13]. These arrays are used in OLAP (On-Line Analytical Processing) to summarize and analyze data [12]. Dimensions of the array represent categories or ranges of continuous data [13].
Horizontal Data Layout: In association rule mining, transaction data can be represented horizontally, with each row representing a transaction, and columns representing items [14].
Vertical Data Layout: Transaction data can also be stored vertically, with a list of transaction IDs associated with each item [14].
Hash Tree: In frequent itemset generation, candidate itemsets can be stored in a hash tree to reduce the number of comparisons [15, 16].
General Characteristics of Data Sets
Dimensionality: This refers to the number of attributes of a data set, and can have a significant impact on the choice of data mining techniques [17].
Sparsity: Many datasets have a significant number of zero or missing values [17].
Resolution: The level of detail at which the data is represented can affect analysis [17].
The choice of data structure depends on the type of data and the task at hand, and selecting the right data structure for a task improves efficiency. Data structures must be managed, like models, to maintain their integrity and applicability [18].
convert_to_textConvert to source