{'fraction_non_alphanumeric': 0.030660017301918478, 'fraction_numerical': 0.011500686987939546, 'mean_word_length': 4.77136563876652, 'pattern_counts': {'":': 0, '<': 1, '<?xml version=': 0, '>': 2, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Machine Learning Calabi-Yau Hypersurfaces

We revisit the classic database of weighted-P4s which admit Calabi-Yau 3-fold hypersurfaces equipped with a diverse set of tools from the machine-learning toolbox. Unsupervised techniques identify an unanticipated almost linear dependence of the topological data on the weights. This then allows us to identify a previously unnoticed clustering in the Calabi-Yau data. Supervised techniques are successful in predicting the topological parameters of the hypersurface from its weights with an accuracy of R^2>95%. Supervised learning also allows us to identify weighted-P4s which admit Calabi-Yau hypersurfaces to 100% accuracy by making use of partitioning supported by the clustering behaviour.


Introduction
Artificial intelligence has now permeated through all disciplines of human enterprise. Machine-learning (ML) has become, in this age driven by big data, as indispensable a tool as calculus was to the Age of Enlightenment [1]. Perhaps surprisingly, noise-less, pure mathematical data can often be learned at high precision, indicating underlying the extraordinary work of Kreuzer and Skarke [46,47]. This set contains the Calabi-Yau hypersurfaces in toric varieties. (Since weighted projective spaces are special types of toric varieties, the set described in [45] is a subset of the Kreuzer-Sharke set.) However, the Kreuzer-Sharke dataset is of astronomical size, containing some halfbillion members. While ML of this set is in progress [48], the much more manageable list of hypersurfaces in weighted P 4 , numbering around 8000 (comparable to the CICYs) is natural choice of geometries to study and apply the latest methods from data science.
Thus our motivation is clear. We shall re-visit the classic database of [45] with a modern perspective, continuing the paradigm of machine-learning the string theory landscape and the resulting emergent mathematical structures, using tools from the sci-kit learn library [49] implemented in python. The paper is organized as follows. In §2 we begin with a rapid review of the mathematics of our Calabi-Yau hypersurfaces, emphasizing on the data structure. In §3, we proceed with analyses of the data, using methods which were unavailable at the time of their creation, such as principle component analysis and topological data analysis. We then use neural-networks to machine learn the dataset in §4. We conclude with a summary and outlook in §5.
All of the data and code are freely available on GitHub at: https://github.com/ edhirst/P4CY3ML.git

Characterising the Calabi-Yau Hypersurfaces
The dataset of focus in this study is that of weighted projective spaces P 4 C (w i ), which admit Calabi-Yau (CY) three-fold hypersurfaces within them.
This dataset was constructed in the early 90s alongside other efforts to expand the CY landscape for use in Landau-Ginzburg models and superstring compactification [45,46,[50][51][52]. The dataset is readily available at: http://hep.itp.tuwien. ac.at/~kreuzer/CY/, whilst another copy is given with this study's scripts on the corresponding GitHub repository.
A generic weighted projective space generalises the concept of a projective space, defined by taking some C n+1 with coordinates {z 1 , z 2 , ..., z n+1 } and performing an identification with weights w i such that (z 1 , z 2 , ..., z n+1 ) ∼ (λ w 1 z 1 , λ w 2 z 2 , ..., λ w n+1 z n+1 ) , (2.1) ∀λ ∈ C, hence defining the projective space P n with these n + 1 homogeneous coordinates. For the projective spaces in consideration n takes the value of 4, and the space is hence defined with 5 weights. These weights are coprime as a set, such that the projective space definition is free from redundancy from different weight combinations.
Within these weighted projective spaces one can embed hypersurfaces defined by polynomials in these homogeneous coordinates. Of particular interest to physicists are those hypersurfaces which are CY in nature. A defining property of CY manifolds is the vanishing of the first Chern class, and for this to hold within the projective space the hypersurface's polynomial has to have degree d = i (w i ).
It should be noted that the identifications that are used in constructing the projective space lead to singular sets, which the hypersurfaces can intersect with suitable resolution. To be consistently defined over these singular sets another property of the polynomial is required: transversity. The transversity property implies that the polynomial equation and its derivative share no common solutions, and this condition translates into a condition on the projective space weights: However as exemplified in [45], this condition is necessary but not sufficient for the surface to be CY. It is therefore of interest to consider the extent to which each of these 5-vector weights properties contribute to determine the very special CY property; and it is this question we look to probe with new tools from data analysis, and machinelearning.
It has been shown that only a finite number of possible weights permit these CY hypersurfaces. In fact, the dataset of weights consists of just 7555 5-vectors of transverse coprime integers.
Beyond learning the CY property explicitly, we are also interested in exploring if the topological features of the Calabi-Yau can be learnt from the weights. Of specific importance are the non-trivial Hodge numbers, h 1,1 and h 2,1 , which describe the manifolds cohomology, and the Euler number, χ. These all have a variety of uses in determining physical phenomena. The formula for Hodge numbers comes from expansion of the Poincaré polynomial Q(u, v) := p,q h p,q u p v q , the generating function of the Hodge numbers h p,q ; whilst the formula for Euler number has a direct form [50,[53][54][55]. Specifically these are for weights w i , normalised weights q i = w i / i (w i ), and u, v are the dummy variables of the Poincaré polynomial. For Q(u, v),θ i (l) is the canonical representative of lq i in (R/Z) 5 , age(l) = 4 i=0θ i (l) and size(l) = age(l) + age( i (w i ) − l). Note also for χ, where ∀ i lq i or rq i / ∈ Z then the product takes value 1 [55]. Both formulas require significant computation, involving many non-trivial steps. Even if we realize this dataset in the language of the toric geometry of [46,56], the formulae involve non-trivial sums over faces of various dimension. It is consequently interesting to examine the performance of machine-learning methods in learning the Euler number/Hodge numbers from the weights, and perhaps predicting the results through the use of possible hidden structures which we hope to uncover in the weights and weight distributions.

Data Analysis
Before we apply the supervised machine-learning methods described in §4, let us provide some analysis of the fundamentals of the dataset through the use of principal component analysis (PCA), topological data analysis (TDA), and other unsupervised machinelearning methods.

Datasets
In addition to the CY dataset which forms the central focus of this study, we will construct some auxiliary datasets that will help in assessing the learning of the Calabi-Yau property. These are equivalent datasets of 5-vectors that possess fewer of the necessary properties required to meet the Calabi-Yau property.
The 4 datasets (including the original CY dataset) are composed of: These datasets were specifically constructed so as not to form a filtration, therefore at each stage the dataset generated was ensured to not include data which satisfies the additional conditions at the next level. To clarify, each 5-vector in set (a) had weights which shared a common factor, in set (b) all 5-vectors did not satisfy condition 2, and those in set (c) where not in the CY list of (d).
To introduce a consistency across the datasets, all the 5-vectors entries are sorted in increasing order. Initially the weights for each of the datasets (a-c) were sampled using a discretised uniform distribution, U (1, 2000), bound above by 2000 to mimic the highest value in the CY dataset of 1743. However as shown in figure 3.1a the weights follow a distribution far from that of a uniform distribution. Therefore to make the generated data more representative, an exponential distribution was fitted to the histogram of all weights in the CY dataset, as shown in figure 3.2. Fitting was performed using the scipy library.
This exponential distribution was instead then used to sample weights, and as can be seen in figures 3.3, the frequency distributions of the weights for each of the datasets align much closer to that of the CY data. For reference the weight histograms are shown for the uniform distribution sampling in appendix A.1.
Aside: Coprimality It is interesting to note that the probability of k randomly chosen integers being coprime is: 1/ζ(k); via the Riemann zeta function. Hence the probability of a random 5-vector of integers being coprime is ∼ 0.964, and therefore the dataset (b) is relatively more common than the dataset (a). Effectively it is easy to randomly produce weighted projective spaces.  . Figure (b) shows the same data as (a), but restricted to lower entries so as to highlight the low value behaviour, due to the entry sorting.

Principal Component Analysis
Datasets of vectors can be analysed for hidden structures through the use of principal component analysis (PCA). This method, generally considered to be the simplest form of unsupervised machine-learning, diagonalises the data's covariance matrix and sorts the respective eigenvalues and eigenvectors.
The covariance matrix of a dataset, computes the covariance between each pairing of the constituent vector elements, defined as:  , for each of the generated datasets. The weights were generated using an exponential distribution fitted to the CY weight data; and hence distributions show similar behaviour across all datasets, and to the CY dataset.
Since our weight entries are within the field of integers the covariance matrix is symmetric. Diagonalising this matrix finds the orthogonal linear combinations of the vector entries which dictate the directions of largest variance. Therefore the result of this diagonalisation is to identify the data's principal components, which are then sorted in decreasing order according to their respective eigenvalues. The first component then gives the direction where the data has the most alignment and hence the highest variance, with successive decreasing variance until the final entry gives the direction along which the data has the lowest variance.
The structure of the dataset can then be most easily observed through consideration of these principal components. In this study PCA was applied to each of the datasets under consideration independently.
In each case the variance eigenvalues were at least 5 times larger for the first principal component compared to the others. In particular for the CY dataset the first principal component was 2 orders of magnitude larger than the others. This indicates that much of the variation, and hence data structure, is dominated by a single dimension.
Usually a scaling is applied to the data prior to the PCA. The 'scaling' process both centres and scales the data such that each entry (i.e. weight) has mean value 0 and standard deviation 1 across the dataset; hence replacing each weight by its respective standardised score. However for this analysis scaling was not used since the data's general structure is based on the relative sizes between the weights (which are sorted according to their size). These relative sizes between weights across each vector are lost through the scaling process, which scales each weight independent of the rest of the vector.
As the data is not scaled one may think that the latter weights of each vector would dominate the behaviour (since the weights are ordered). This would lead the covariance matrix to be near-diagonal, and the principal components would align closely to the original vector entries. However, as shown by the covariance matrix for the CY dataset in equation 3.2, the matrix is not diagonal and the eigenvectors have significant contribution from multiple components.
for eigenvectors as rows of ε CY with respective eigenvalues in λ CY ; where covariance and eigenvalue entries are given to the nearest integer, and eigenvector entries to 3 decimal places. This implies that the PCA structure is more subtle than a trivial projection. The covariance matrices, eigenvectors and eigenvalues for the other datasets are provided for comparison in appendix A.2.
To relatively compare the datasets' PCAs, the normalised vectors of eigenvalues are given in equation 3.3, for the random 'R', coprime 'C', transverse 'T', and Calabi-Yau 'CY' datasets respectively. They show that the first component significantly dominates, and hence lower dimensional representation of the data through PCA will usefully depict the data's underlying linear structure.
Hence for the sake of visualisation, the first 2 components of each datapoint's principal component projection are plotted as a 2-dimensional scatter diagram for each dataset. These components show the directions with the most variation, and hence display the underlying structure most clearly. The 2d PCA plots are given in figure 3.4, for each of the 4 datasets considered.
The cone-like bounding structure of all plots shows the effects of the weight ordering. This is simply that as the first component's value increases (most correlated to the largest, and hence last, weight in the 5-vector) the range of values the second component (roughly correlated to the second-largest / second-last weight) can take increases. Or put more simply, the second-last weight takes values up to the size of the last weight and so this places cone-like bounds on the plots. All plots also show higher densities at lower values of the principal components which is also related to this effect.
The PCA plots show that as more of the necessary conditions are added to the datasets, more structure is apparent in the projected outputs. First note, the coprime condition causes a negligible change to the distribution of weights. The transverse condition however has a significant effect. The second components become much more limited and the data begins to separate into approximately two forks. Most exciting, is the jump to the full Calabi-Yau data. Now the PCA shows a clear clustering of the 5-vectors at higher values of the first principal component. This distinct separation into clear lines of datapoints shows a rich structure to the weights of Calabi-Yau projective spaces, which is not present for spaces with just the transverse condition. The reasons for this separation are unclear, however we make conjectural statements about a potential relation to the spaces' Hodge numbers due to a similar structural separation in section §3.4.
A final note is that the PCA used here was explicitly linear, and hence probes the simplest kind of implicit structure. More technically involved methods of principal  component analysis involve kernel methods, called 'kernel-PCA'. Kernel methods were also used to analyse these datasets, for a variety of traditional kernels (including Gaussian, sigmoid, and an array of polynomial kernels), and functionality for this is provided in the respective code scripts. However, none of these methods produced as distinct a clustering separation as that for the linear kernel. Indicating, that surprisingly, the most prominent implicit structure of the Calabi-Yau weights takes a linear form.

Topological Data Analysis
Principal Component Analysis allows for a 2d visualisation of the 5d CY data. Through the PCA with linear kernel, a linear clustering structure was uncovered in the data. To visualise the extension of this behaviour to the full 5d space we turn to tools from topological data analysis; specifically persistent homology.
The persistent homology of a dataset is constructed through a filtration of Vietoris-Rips complexes. The full CY dataset is first plotted in R 5 with each weight a coordinate, such that each weighted-P 4 is now represented by a point (0-simplex) in the R 5 space due to its respective 5-vector. 5-sphere's of radius d are then drawn around each point, and the range of d values are taken from 0 −→ ∞. Initially all the spheres will be independent with no overlap, but as d increases the spheres will begin to overlap more frequently. The complex is then constructed by drawing an n-simplex between n points where all their spheres overlap.
Therefore as d increases more simplices are added to the complex, and at each dvalue where there is a change to the complex we have a stage in the complex's filtration. The complex hence grows up until a point where all possible simplices lie in the complex. This is where the filtration terminates (no further changes as d −→ ∞).
The role of persistent homology in the analysis of this filtration is to examine how long cycles of n-simplices last throughout the filtration before they become filled by the (n + 1)-simplices they bound. Specifically H n examines how long cycles of n-simplices exist until becoming filled by (n + 1)-simplices.
This persistent homology for the CY data was computed for H 0 and H 1 (higher H n up to n = 4 can be computed in 5d space but are incredibly computationally expensive in terms of memory for n ≥ 2). The persistence diagram for this analysis is shown in figure 3.5, where the diagram plots all members of H 0 and H 1 as points with their respective d values of birth (cycle creation) and death (cycle filling). For specific computation of the persistent homology the python package 'ripser' was used [57]; whilst to review previous application of these techniques to the string landscape please see [58,59].
As can be seen from the diagram all the members of H 0 are blue points born at d = 0, these are each of the 0-cycles (i.e. 0-simplices / datapoints) that exist until they are connected by an edge (1-simplex) to any other datapoint. The behaviour shows that there are some datapoints that are significantly far away from the rest of the data and hence join/die much later in the filtration. These points are those with large weight values such that they are far from the origin in the R 5 embedding.
Conversely all members of H 1 are points in orange, and as expected all these 1cycles (i.e. cycles of 1-simplices/edges which are not boundaries of 2-simplices/triangles) lie close to the diagonal line in the persistence diagram. This behaviour indicates a short life of each cycle, a behaviour typical of noise in the dataset. Since traditionally it is only points far from the diagonal that indicate significant persistent structure, there is hence not higher dimensional structure formation or non-trivial topology in the data which would deter from the linear clustering behaviour seen through the PCA.

Analysis of CY Topological Properties
In addition to the weights used to represent these Calabi-Yau weighted projective spaces, the non-trivial Hodge numbers, {h 1,1 , h 2,1 }, for the surfaces are also provided with the KS databases [46], and repeated with this study's GitHub. This provides more information for analysis the spectrum of CY weights. Simple plotting of these weights produces an astonishingly familiar structure, one which is exemplified best when the CY's Hodge numbers are plotted against the final (and hence largest) weight, as shown in figure 3.6.
The behaviour in figure 3.6a shows a similar form of fork-like splitting of the datapoints as in the PCA of figure 3.4d, even with a central fork particularly more dominant than the others. This seemingly linear behaviour between final weight and h 1,1 is quite surprising, and here again the CY hypersurfaces appear to be separating themselves into classes, according to the ratio of h 1,1 to the final weight, w 5 . On the contrary, the behaviour in figure 3.6b, follows the familiar mirror symmetry plot [45], complimenting the linear behaviour with h 1,1 such that their combination will preserve this structure.
Similar behaviour also occurs for the other weights in the 5-vectors, despite less obvious clustering. Plots of these relations are given in appendix A.3.
To further examine this clustering phenomena we plot a histogram of the ratio h 1,1 /w 5 in figure 3.7. Note for this plot only datapoints with w 5 > 250 were used since this was where the class separation was more prominent such that the cluster identification would be improved. As can be seen from the peaks in the figure, there is a clear clustering behaviour. Therefore we reexamine this data of ratios with the use of K-Means clustering.

Clustering for h 1,1 Classes
As motivated by the formation of a set of linear relationships between w 5 and h 1,1 shown in figure 3.6a, and the peak occurrence in the histogram of ratios in figure 3.7, unsupervised clustering methods were used to examine this behaviour.
The 'outer' ratio data used to produce the histogram plot, where clustering was more prominent, provides a very suitable database for 1-dimensional clustering. The method used was K-Means clustering, which takes an input predefined number of clusters, initialises mean values for each cluster, and iteratively updates these means such that the final sum of squared distances from each datapoint to its nearest cluster's mean is minimised. This measure is known as the K-Means inertia, for clusters, C , with respective means, µ C , and all datapoints, i, exclusively in their nearest cluster with ratios, r i . Determining the optimal number of clusters to use is a standard problem in K-Means clustering, to motivate this choice we use a novel measure we call 'scaled-maxinertia'. This measure identifies the maximum squared-distance any point is from its closest cluster centre, normalises it according to that maximum squared-distance from using only one cluster, and adds a weight factor to penalise using an excessive number of clusters. We define this to be: where Max i determines the maximum over all ratios, r i , examining the squared distance to either the closest cluster's mean, µ C or the single cluster's mean, µ 1 ; then weighting by the number of clusters, k. A plot of scaled-max-inertia against number of clusters identifies an optimum of 10 clusters, as shown in figure 3.8.  Using the optimal number of 10 clusters, the separation matches up exceptionally for the outer data, as shown by plots of the cluster bounds in figure 3.9. The clusters sizes for the clusters moving anticlockwise about the plot, for increasing ratio, are: [103, 354, 454, 734, 626, 623, 643, 895, 1419, 1704], highlighting that there is a greater density of points at low w 5 as expected, since this was why 'outer' data was focused on for clustering.
To measure the clustering performance we use the standard Inertia measure over the full dataset, however normalised by the number of ratios across the dataset,Î , and an equivalent measure also normalised by the range of the ratios: These values show that clustering performed exceptionally well, as each ratio in the full CY dataset was less than 0.1% of the ratio-range away from its nearest cluster. Therefore confirming the distinct linear behaviour observed, as well as the class separation. The distinct classes of CY 5-vectors are also provided in the GitHub.

Machine Learning
After use of unsupervised ML methods in section §3, we now turn to use of supervised ML methods for learning of the topological properties, as well as the CY property.

Architectures
The problems addressed by supervised ML in this study fit into both of the field's typical styles: regression, and classification. The first set of problems learnt in section §4.2 learn the topological Hodge numbers (and related Euler number) from the CY 5-vectors of weights. Since the output Hodge numbers can take a large range of integer values the problem was formulated as a regression problem. For this a Multi-Layer Perceptron Regressor was used to learn each output from the input weights. This regressor is a type of Neural Network, and the one used specifically had layer sizes of [32,64,32], with ReLU activation, and used the Adam [60] optimiser method to minimise a mean-squared error loss. The fitting used a batchsize of 200, and ran up to 200 epochs until the tolerance of 0.0001 was reached for loss updating.
The second set of problems considered in section §4.3 sort to determine which dataset a 5-vector belonged to, either by binary classification between each dataset and the CY dataset, or a multiclassification among all 4 datasets. Since these were classification problems an array of different classifiers were used to perform the learning.
The first classifier was a Logistic Regressor, as perhaps the simplest form of classifier. This Logistic Regressor had a tolerance of 1 for learning the weight behaviour, a C-value of 100 such that there was a low amount of regularisation, and used Newtons method for solving, such that multiclassification could also be performed. The second classifier was a Support Vector Machine with a simple linear kernel, and here a higher regularisation due to a C-value 1. The third and final classifier used was a Neural Network Classifier (Multi-Layer Perceptron also), this time with the same hyperparameters as the Regressor except now with a cross-entropy loss function.

Measures
To assess learning performance consistent measures are required. For this, dependent on the problem being a regression or classification, different measures were selected as follows.
Regressors: The most standard regressor measure is Mean-Squared Error, MSE, which was used for the regressor loss function. However MSE should be considered in relation to the square of the range of output values to be useful, hence a preferable measure also used was Mean-Absolute-Percentage Error, MAPE. Although it should be noted MAPE has its own drawbacks where it is incalculable when y true = 0 for any of the date inputs. Both these measures are unbounded above and take optimal value of 0 which indicates perfect prediction.
The final regressor measure used was R 2 , this evaluates how well a regressor is performing by comparing the proximity of the predicted output to the proximity of the mean (which would be the prediction for a null model regressor). For this measure 1 is optimal, 0 means that prediction is not better than just predicting the true mean each time, and < 0 means worse than just predicting the mean. The equations and output bounds for these measures are given in equation 4.1.
summing over all predicted, y pred , and true, y true , outputs in the test data. In addition for R 2 the mean of the true values over the test data outputs, y truemean , was also used.
Classifiers: Trained classifiers predict on input test data by assigning them to classes, this leads to a natural sorting of true (row) vs predicted (column) class frequencies over all the test data, arranged into a confusion matrix, CM. From the confusion matrix the normalised sum over the diagonal gives the Accuracy which is the proportion of test data correctly classified. However simple accuracy has problems associated to bias data, therefore a better measure of learning is Matthew's Correlation Coefficient, MCC. Both these measures have optimum learning with values of 1, where all test data inputs are allocated to their true class. Equations for these two measures used are given in equation 4.2.

CM =
T P F N F P T N , for the binary classification case, where generalisations exist for the multiclassification case. For all problems 5-fold cross-validation was used, whereby 5 independent versions of each architecture were trained and tested on 5 different train:test partitions of the data, and the learning measures then averaged and standard error computed.

ML Topological Parameters
Topological parameters provide key information about a Calabi-Yau manifold which are essential in the computation of physical phenomena when these manifolds are used for superstring compactifications.
This CY subset from weighted P 4 s provides a simple scenario whereby the Hodge numbers (and hence Euler number) can be computed directly from the weights of the toric space that the Calabi-Yau is a hypersurface of. Although it should be noted these formulas are quite non-trivial, as discussed in section §2.
Both of these formulas, given in equation 2, require greatest common divisor computations throughout their evaluation. Machine-learning methods famously perform badly when approximating these styles of equations and so one would expect the simple Neural Network architecture used here to not be particularly successful.
The results for the machine-learning of the non-trivial Hodge numbers, and the Euler number are given in table 4.1. The Hodge number data, provided by [46], is also made available on the GitHub with the Calabi-Yau weight data, and from here the Euler numbers can be calculated using χ = 2(h 1,1 − h 2,1 ).  The results show a surprisingly successful predictive ability for the Hodge numbers and Euler number, particularly with R 2 values exceeding 0.9. The MAPE values show the Hodge numbers are consistently predicted to be only around 20% off from their true values, whilst the MSE values provide a less physical measure of learning but are included for reference since they were used as the regressor loss.
Considering the complexity of the equation forms in equation 2, it is impressive the Neural Network can learn any correlating behaviour for computation of Hodge numbers or Euler number from the weights alone. In addition, the relatively better performance in learning h 1,1 may be due to the apparent linear relationship to the weights as exemplified in section §3.4.

ML CY Property
The conditions for a 5-vector of weights to represent a weighted projective space which can admit a Calabi-Yau hypersurface are highly non-trivial. As discussed in section §3.1, the necessary conditions of coprimality and transversity are probed through generation of equivalent datasets, with which the CY dataset can be compared.
Due to the exponential generation techniques making these weights more representative, differentiating which dataset a 5-vector belongs to is not possible by eye. Therefore it is natural to wish to consider the effectiveness of machine-learning to this classification problem: learning the Calabi-Yau nature.
Introduced in section §4.1, three architectures were used to learn to differentiate the Calabi-Yau weights from each of the other datasets: random integers, coprime random integers, and transverse coprime random integers in binary classification problems.
Furthermore they were also used to differentiate all 4 datasets in a multiclassification problem.
Results for this learning are given in table 4.2. Measures show that Neural Networks can well differentiate the Calabi-Yau weights from each of the other datasets. As expected there is minimal difference due to introduction of coprimality, since this is a common behaviour for 5-vectors as mentioned in section §3.1. Once transversity was included into the dataset, the binary classification performance dropped. However performance was still surprisingly good.
A further surprise was the equally good performance of the Logistic Regressor and Support Vector Machine. These simple architectures could accurately classify approximately three-quarters of the data even without using transversity (where this condition was in both CY and compared dataset).  Table 4.2: Machine-learning results for three different architectures performing binary classification between the CY data and each specified dataset; and in addition multiclassification across all 4 datasets (labelled 'All'). Learning is measured using Accuracy and MCC with 5-fold cross-validation to provide an average and standard error on each measure's value.
Multiclassification of all datasets was not as strong. However within these measures the identification of the Calabi-Yau data was considerably better, with most of the performance reduction due to misclassifying between random, coprimality, and transversity. To exemplify this we give a sample confusion matrix for the multiclassifi- where row indicates true class and column predicted class for each of: random, coprime, transverse, CY respectively. The final entry shows nearly all the Calabi-Yau data is correctly classified (0.25 indicates the full quarter of the accumulated datasets). Therefore measures will indicate lower performance where the other conditions cannot be differentiated, and it is likely that these conditions are not the most prominent conditions to indicate the Calabi-Yau property.
To further examine the learning performance we next look explicitly at the misclassifications of the Calabi-Yau data, using again links to the Hodge numbers to identify areas of difficulty.

Misclassification Analysis with Hodge Numbers
Since the Logistic Regressor performed comparably to the other architectures, and is a significantly simpler architecture than the neural network, its use for misclassification analysis seemed the most appropriate.
Due to the simple structure, only 50 5-vectors in each non-CY dataset were used to train the regressor with another 50 CY 5-vectors. The regressor was then used to predict the class of all the CY data, producing accuracies of: 78%, 81%, 61% when trained with each of the random, coprime and transverse datasets respectively.
Perhaps more curious is the distribution of these CY misclassifications with respect to their Hodge numbers, plotted in figure 4.1. Training Random and Coprime datasets in both cases leads to perfect classification of CY spaces with high h 2,1 , whereas training with Transverse data leads to perfect classification with high h 1,1 .
For reference both other architectures had similar performance with respect to Hodge numbers, as documented in appendix A.4.
To examine further this relationship, we bin the CY data according to each of the Hodge numbers and only train and test on 5-vectors in each bin's range. This is detailed in section §4.3.2.

Hodge Partitioning
To investigate the dependence of the learning performance on the Hodge numbers, the CY dataset was binned in two independent ways. The first was according to h 2,1 , and the second according to h 1,1 . The bin bounds were optimised such that an  This produced a CY dataset associated to each bin, with which a non-CY 5-vector dataset was randomly sampled. For the h 2,1 partition the Random dataset was used to sample as many non-CY 5-vectors for each bin, such that the datasets were balanced. As training-behaviour for the Random and Coprime datasets was so similar, only the Random dataset was used in this investigation. Conversely, for the h 1,1 partition the Transverse dataset was used. These choices of non-CY datasets used for training were selected such that they aligned with the predicted behaviour of section §4.3.1, where Random-training improves high-h 2,1 performance, and Transverse-training improves high-h 1,1 performance.
For each bin's now balanced dataset an independent Logistic Regressor (with architecture as before) was initialised, trained and tested. A random 80% sample of the data was used for training, with testing on the remaining 20% complement. For each bin, the initialisation, training, and testing was repeated 20 times, such that variances on the measures could be calculated. Accuracies were recorded for each bin regressor, as well as the final 5 weights used to define the LR.
Accurracies across the bins for both partitions are given in figures 4.2c and 4.2d, with their respective accuracy variances in 4.2e and 4.2f. There are near perfect predictions at the upper ends of these partitions, with relatively very small variances. Determination of the CY property is hence considerably easier for surfaces whose Hodge numbers take extreme values, and pre-training against data with or without the transverse condition can significantly aid learning depending on what values the Hodge numbers take.
Finally, the 5 averaged LR weights are plotted for each bin (with respective variances surrounding them) in figures 4.2g and 4.2h. As can be seen by comparing the relative weight sizes, in both cases at the higher ends of the partitions the first two weights particularly dominate the regression. Since each LR weight aligns with the projective space weight, this indicates at these extremes where learning is particular strong, only the first two (i.e. lowest) weights are needed to identify whether the weighted projective space admits a Calabi-Yau hypersurface. Where only the CY dataset has the transversity property (i.e. training against Random) the first weight is the most significant, whilst where transversity is in both datasets (i.e. training against Transverse) the second weight is the most significant.

Summary & Outlook
Through the use of unsupervised machine-learning methods we were able to identify a linear clustering structure of the weighted projective spaces that admit Calabi-Yau hypersurfaces. This structure was first observed through PCA, corroborated with TDA, and then observed again due to relations with the hypersurface's Hodge numbers. Supervised machine-learning methods then learnt to predict Hodge numbers from the weights directly to a surprisingly exceptional accuracy, perhaps making use of this simple structure. In addition, simple classifier architecture could detect whether a generic weighted-P 4 admitted a Calabi-Yau hypersurface from the weights alone, and with specific pre-training could reach perfect performance at certain extremes of Hodge numbers.
Further analysis into this Calabi-Yau clustering behaviour for weighted-P 4 s would hope to uncover its source, simultaneously explaining the success of machine-learning techniques on this dataset.

A.2 Additional PCA Information
Further to the PCA information provided for the CY dataset in section §3.2, the covariance matrices, eigenvectors, and eigenvalues are given for the other three datasets here. They are respectively labelled 'R' for the random dataset, 'C' for coprime dataset, and 'T' for transverse dataset. The covariance matrices, K, and eigenvalues, λ, are given to the nearest integer, whilst eigenvectors, rows of ε, are given to 3 decimal places.

A.3 Additional Hodge Plots
Further to the plots of the two non-trivial Hodge numbers of the CY surfaces, {h 1,1 , h 2,1 }, against the final 5-vector weights in section §3.4, additional plots of these Hodge numbers against the other weights are given here in figure A.2 for reference.

A.4 Additional Misclassification Analysis
Distributions of correctly and incorrectly classified CY 5-vectors for each of the other architectures (Support Vector Machine and Neural Network), trained on 50 CY and 50 non-CY 5-vectors, are given in figure A.3. Note the architectures had the same hyperparameters as in previous investigation of section §4.3.
The behaviour is similar to that for the Logistic Regressor, where training with Random 5-vectors improves determination for high h 2,1 , whilst training with Transverse 5-vectors improves determination for high h 1,1 .