ADS Capstone Chronicles Revised
17
where N is the number of samples, K is the number of classes, is a binary indicator (0 or , 1) if class label k is the correct classification for sample i, and is the predicted probability of , sample i for the class k . Neural network consists of multiple layers of interconnected neurons. It includes an input layer, one and more hidden layers and an output layer. But each neuron in a layer receives inputs, and it shows non linearity of each layer by a non-linear activation function and then the nonlinearity passes to the next hidden layer. At last, after traversing all layers, it passes to the next layer. To activate the nonlinearity on each neuron by different functional functions like ReLU ( rectified linear unit), sigmoid, tanh etc, to learn complex patterns. Loss function is important to make the convergence. The network is trained and optimized by the backpropagation techniques. It includes computing the gradient of the loss functions and optimizing by updating the weights using gradient descent or other optimization algorithms. This process helps to minimize the loss functions and improve the network. Neural networks help to capture the complex data pattern by applying different activated functions. 4.4.4.1 Test design, i.e. training and validation datasets. To ensure the robustness and accuracy of our recommendation models and creating 7 customer segments, the team carefully designed the test setup involving the creation of training and validation datasets. The objective was to evaluate the performance of each model (SVD, NMF, KNN, Random forest, decision tree, etc) using a structured approach that includes splitting the dataset, training the models, and validating the results. Loss= (7) − =1 ∑
The dataset was divided into two main parts: an 80/20 split ratio was used, where 80% of the data was allocated to the training set and the remaining 20% to the validation set. This split ensures that the models have sufficient data to learn from while also providing a reliable dataset for performance evaluation. The training set was used to build the recommendation models. This set includes most user-item interactions and was utilized to train the SVD, NMF, and KNN algorithms. During training, each model analyzed the patterns in user behavior, product preferences, and transactional histories to learn the latent factors or similarities that drive recommendations. The validation set was reserved for testing the models’ predictive capabilities. However, for building the second model, it was necessary to create a validation dataset so that hyperparameters can be set and seen within the small dataset. That is why the dataset was divided into three different parts. A 60/20/20 split ratio was used. Here, 80%, 20%, and 20% of the data is allocated for the training, validation, and testing datasets. The training dataset is used to train machine learning models like random forests, decision trees, neural networks, and XGBoost. A validation dataset is used in this model. As the model used is compute-intensive, tracking and tuning the hyperparameters with large datasets is hard. That is why the validation dataset was created. Now, test datasets are used to test and evaluate the different models in the same unseen dataset. It increases the validity of the models. After training, each model’s performance was evaluated on this unseen data. Key metrics such as Root Mean Square Error (RMSE), precision@k, and recall@k were computed to assess how well the models predicted user preferences and recommended relevant products. 5 Results and Findings
61
Made with FlippingBook - Online Brochure Maker