# Performance Predictions of Sci-Fi Films via Machine Learning
## 3 Machine Learning Algorithms
### KNN Algorithms  
A vector represents each training sample in a multidimensional feature space and its corresponding class label. The training step of the method consists of just storing the feature vectors and class labels of the training instances. A user-defined constant k is utilized throughout the classification process to determine which label is more prevalent among the k training samples nearest to a query point. The Euclidean distance is commonly employed as a distance metric for continuous variables [33]. For discrete variables, such as text classification, an alternative metric, such as the overlap metric, may be used (or Hamming distance). In combination with Pearson and Spearman correlation coefficients, k-NN has been used to assess microarray data on gene expression. When the distance metric is learned with particular methods, such as large-margin nearest neighbor or neighboring component analysis, the accuracy of k-classification NN is frequently significantly enhanced [34]. When there is a disparity in the distribution of classes, the majority voting method fails. In other words, examples of a more common class tend to dominate the prediction of a new instance due to their dominance among the k nearest neighbors. One such option is incorporating a distance metric between the test site and its k nearest neighbors into the classification weighting procedure. Each of the k nearest points has its class (or value, in regression problems) enhanced by a weight proportional to the inverse distance between it and thetest point. Abstraction in data representation is an additional method for addressing skew. In a self-organizing map (SOM), each node serves as a representation (center) of a cluster of similar points, regardless of their density in the original training data. The k-NN may then employ the SOM [35]. The optimal value of k will vary from dataset to dataset, but in general, more significant values of k lessen the influence of the noise on the classification at the expense of fewer clearly defined class borders. Multiple heuristics exist for choosing an appropriate k. The nearest neighbor approach is used in the rare scenario when the predicted class is the same as the class of the nearest training sample (i.e., when k = 1). Noise, irrelevant features, or incongruent feature scales can significantly impact the k-NN algorithm's performance. Selecting or scaling characteristics to enhance categorization has been the subject of extensive study. Using evolutionary algorithms to finetune feature scaling is a common strategy. Another standard method is scaling features using the mutual information between the training data and the training classes. When solving a binary (two-class) classification issue, it is preferable to have k be an odd integer, so there are no ties. The bootstrap approach is often used to select the one that is best in this circumstance from an empirical perspective [36; 37]. The kind of nearest neighbor classifier that assigns a point x to the same category as its closest neighbor in the feature space is the most intuitively understood. The one nearest neighbor classifier guarantees an error rate no worse than twice the Bayes error rate, even as the size of the training dataset approaches infinity (the minimum achievable error rate given the data distribution). Based on these considerations, we wish to categorize the science fiction films' dataset and how their success may be scored, ascertain the classification structure, and display the relationships between the data item sets. This can aid in the early prediction of success rates and assist producers in discovering films with poor audience success and finding methods to improve them. The KNN has supervised learning; it is one of the simplest machine learning algorithms based on feature similarity. It can be used for both classification and regression problems. KNN is a classical non-parametric algorithm [38]; it preserves and uses the training data during the test point classification process.