Explore chapters and articles related to this topic
Artificial Neural Networks
Published in Harry G. Perros, An Introduction to IoT Analytics, 2021
If the label takes more than two values, then it is one-hot encoded; i.e., each nominal value that the label takes is converted to a binary string where only a single bit is 1 and the remaining bits are zero. For instance, let us assume that the label takes the values: red, green, and blue. Then, we create three new binary variables, L1, L2 and L3, where Li = 0, 1, i = 1, 2, 3. Each nominal value is associated with a different variable, i.e., red with L1, green with L2, and blue with L3. Accordingly, the nominal value red is encoded as (1, 0, 0), green as (0, 1, 0), and blue as (0, 0, 1). An alternative simpler encoding would be to encode the nominal values red, green, and blue as 1, 2, 3, respectively. However, this may be problematic since category 1 appears to be closer to category 2 than category 3!
Movie Recommendations Based on a Recurrent Neural Network Model
Published in Stuart H Rubin, Lydia Bouzar-Benlabiod, Reuse in Intelligent Systems, 2020
In order to utilize a RNN, we need to provide the network with sequential data as input and a corresponding ground-truth value as its target output. Each of the data entries has to first been transformed in order to be fed into the RNN. Attributes of movie ratings are manipulated as labels, which are the naming of the categories of movie ratings, which are the categories pre-defined from 0.5 to 5, with a half-star interval. Since neural networks cannot accept strings as an output target, each unique category string is assigned a unique integer value, which is transformed into a one-hot encoding to be used later as the network’s prediction target. A one-hot encoding of an integer value i among n unique values is a binarized representation of that integer as an n-dimensional vector of all zeros except the ith element, which is a one. For example, if a movie rating is assigned the value 4, then with 10 distinct labels, its one-hot encoding is [0 0 0 0 0 0 0 1 0 0].
Data Mining – Unsupervised Learning
Published in Rakesh M. Verma, David J. Marchette, Cybersecurity Analytics, 2019
Rakesh M. Verma, David J. Marchette
Data preprocessing also includes encoding data values to make them suitable for analysis. For example, neural networks can take only data that is presented as numbers. Categorical data can be encoded by using what is called a one-hot encoding scheme. In this encoding scheme, we use as many new features as there are values in a category, with every new feature set to 0, except for one of the features, which is set to a 1. The feature that is set to 1 is different for different values. For example, the category {red, blue, green} would be encoded as three new features, A, B and C, as shown in Table 5.2 below. Why do we do this? Why not use the much simpler encoding scheme, Red - 1, Blue - 2, Green - 3? The reason is that the latter encoding scheme introduces new relationships between the features that did not exist before, e.g., it now imposes an ordering and also relationships based on magnitude. For example, we are saying that Blue is twice as large as Red and Green three times as large. The golden rule for a faithful encoding scheme is to preserve the meaningful relationships that exist in the data set, and to avoid creating new relationships that did not exist before.
Combining recorded failures and expert opinion in the development of ANN pipe failure prediction models
Published in Sustainable and Resilient Infrastructure, 2023
Sean Kerwin, Borja Garcia de Soto, Bryan Adey, Kleio Sampatakaki, Hannes Heller
The target parameter of the ANN model depends on the time scale of interest (i.e., weekly, monthly, annually), the level of abstraction (e.g., network-vs pipe-level failure prediction) and the intended use of the model results (e.g., determination of long-term strategies vs. planning of short-term interventions). Input parameters are determined by consulting the available scientific literature on pipe failure and by considering several factors such as the target parameter, data availability, and data quality. The modeler must then decide how to feed the inputs into the ANN model. One hot encoding is used for categorical inputs, where a binary string is used to represent the input using a single 1. The string length is equal to the number of possible categories. This method is a common technique in machine learning to ensure no prior relationship is introduced between inputs and the output and has also been used in other failure prediction studies (Snider & McBean, 2018). Continuous data can be modeled in a number of ways and depends on the level of detail required. For instance, weekly precipitation can be modeled as a continuous parameter with three decimal places of precision or data entries can be grouped into categories (e.g., 0–5 mm, 5–10 mm, etc.) or modeled as a binary variable (i.e., did it rain during that week or not). Next, the failure data is divided into a training set to train the ANN, a validation set to prevent overfitting, and a testing set to evaluate the ANN’s performance. In this study, a data split of 80 – 10 – 10 is used.
Predicting Plasma Vitamin C Using Machine Learning
Published in Applied Artificial Intelligence, 2022
Daniel Kirk, Cagatay Catal, Bedir Tekinerdogan
A wide range of regression algorithms exists, each with different modes of operation and parameters that mean performance can vary across different conditions and datasets. Thus, it is common practice to use multiple algorithms and select the best performer. The data was a mix of continuous and categorical variables. Continuous variables can be used directly in the regression models, but categorical variables must first be processed. One-hot encoding was used to achieve this. One-hot encoding alters the data so that each entry of a categorical variable now becomes a new column entry, and ones and zeros represent the presence or absence of said categorical variables for each sample. R-squared (R-sq) was used as the principal criterion for regression model grading. The same input data and random state value of 7 were used across algorithms.
Data cleaning framework for highway asphalt pavement inspection data based on artificial neural networks
Published in International Journal of Pavement Engineering, 2022
Chengjia Han, Weiguang Zhang, Tao Ma
First, the Y label (abnormal level) of the training data should be converted to the One-Hot Encode format. The One-Hot Encode is the representation of categorical variables as binary vectors (Hu et al. 2021). This process first requires changing mapping classification values to integer values. Then, each integer value is represented as a binary vector, the value of the vector address that corresponds to the integer value is 1, and the remaining positions are 0. Because the abnormal level is divided into four categories, the length of the One-Hot vector is 4. When One-Hot Encode is used to represent the Y value of the training data, the number of nodes in the output layer that correspond to the neural network should be equal to the length of the One-Hot vector. The activation function uses Softmax, shown in Equation (6), to convert each output node value into relative probabilities. where Vi is the output of the front-end output unit of the classifier; i represents the category index and the total number of categories is C; and Si represents the ratio of the index of the current element to the sum of the indices of all the elements. Residual Block