Machine learning data is represented by arrays. The core data object in machine learning is the array.
Machine learning data is represented by arrays. The core data object in machine learning is the array. An array is an object that holds a fixed number of values of a single type. Array’s have different dimensions. The example below is a one-dimensional array. The numeric data only moves in one direction, horizontally.
An index is used to find the location of each element in an array. The first element in an array is zero. In the example below, the first data element in our array is a one, however, it’s in the first index place of our array, which is a zero. In our array there are six data objects because the first index location in an array is zero.
With a two-dimensional array, the data moves in two directions. The data moves horizontally and vertically. The CSV file we use often to build our models with is a two-dimensional array.
A multi-dimensional array is an array that has more than one dimension. It is an array of arrays; an array that has multiple levels. Conceptualizing a multi-dimensional array can be difficult on a two-dimensional surface. You can think of a multi-dimensional array as a Rubik’s cube where each cube represents a different number. Many frameworks have their own array object. For example, Google’s framework is called TensorFlow. A tensor is nothing more than a multi-dimensional array.
Arrays are the most important data entities in machine learning. They are used to represent images, text documents and many other types of data. There are three primary types of arrays. There are one-dimensional arrays, two-dimensional arrays and multi-dimensional arrays. An index is used to find the data elements in an array. The first element in an array is zero.