Full text
MASTER THESIS T´ ITOL DEL TFG: Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm TITULACI ´ O: Master’s degree in Aerospace Science and Technology AUTOR: Sergio L ´ opez Moreno DIRECTORS: Santiago Torres Gil Carles Cantero Mitjans DATA: September 6, 2021
Title : Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Author: Sergio L´ opez Moreno Advisors: Santiago Torres Gil Carles Cantero Mitjans Date: September 6, 2021 Overview A new Gaia data release, EDR3, has been available since the end of last year containing a complete catalogue of nearly 2 billion stars. This huge wealth of information provided by this magnificent space astronomical mission needs to be analyzed and studied in detail. In particular, we have fixated on a specific type of star, named white dwarf, and we have studied to which population of the Galaxy they belong. This knowledge can help us to understand how our Galaxy was formed and also help to discover large scale Galactic events which are matter of debate. This project is focused on obtaining the most adequate possible classification of the white dwarf population among the three main components of our Galaxy (thin and thick disk and halo) by means of artificial intelligence techniques, and more specifically, machine learning. The algorithm chosen for our purpose has been the random forest algorithm, which, as demonstrated in previous works, has already produced very positive results when applied to the second Gaia data release. We reproduce the results previously obtained for the white dwarf 100 pc Gaia DR2 sample, and extend the analysis to the new EDR3 up to 500 pc. The number of white dwarf finally classified by our algorithm have increased from 10,000 in DR2 up to 80,000 in EDR3. Thus, we have managed to identify nearly 300 halo white dwarf candidates.
My family, my all.
CONTENTS Acronyms ...................................... 1 Acknowledgements ............................... 3 Introduction .................................... 5 CHAPTER 1. Gaia EDR3 and the white dwarf population . . . . . . 7 1.1. The Gaia mission ................................ 7 1.1.1. The Gaia satellite . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 1.1.2. The Gaia photometric system . . . . . . . . . . . . . . . . . . . . . 8 1.1.3. Gaia astrometric solution . . . . . . . . . . . . . . . . . . . . . . . 9 1.2. Astrophysical content ............................. 10 1.2.1. Our Galaxy: The Milky Way . . . . . . . . . . . . . . . . . . . . . . 10 1.2.2. Main sequence and white dwarf stars . . . . . . . . . . . . . . . . . 12 1.2.3. The white dwarf sub-populations . . . . . . . . . . . . . . . . . . . 13 CHAPTER 2. The Random Forest algorithm ............... 17 2.1. Supervised machine learning ......................... 17 2.2. Random Forest ................................. 17 2.3. Optimizing the Random Forest . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3.1. Hyperparameters . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 2.3.2. Oversampling and undersampling . . . . . . . . . . . . . . . . . . . 21 2.3.3. Hold out and cross-validation . . . . . . . . . . . . . . . . . . . . . 22 2.3.4. Principal component analysis . . . . . . . . . . . . . . . . . . . . . 23 2.4. Metrics: assessing the performance of the algorithm . . . . . . . . . . . . 25 2.4.1. Class prediction . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.4.2. Confusion matrix . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.4.3. Success rate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 2.4.4. Precision and recall . . . . . . . . . . . . . . . . . . . . . . . . . . 27 2.4.5. AUC-ROC curves . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 2.5. Random Forest application schema . . . . . . . . . . . . . . . . . . . . . . 30
CHAPTER 3. Reproducing Gaia DR2 results . . . . . . . . . . . . . . 31 3.1. RF training samples and its main features . . . . . . . . . . . . . . . . . . 31 3.2. Optimizing the RF to apply to Gaia DR2 . . . . . . . . . . . . . . . . . . . . 34 3.2.1. Preparing the dataset . . . . . . . . . . . . . . . . . . . . . . . . . 35 3.3. Applying the RF algorithm to previous Gaia DR2 . . . . . . . . . . . . . . 38 CHAPTER 4. Selection of the model to apply to Gaia EDR3 . . . . 43 4.1. Model 1 ..................................... 43 4.1.1. Unbalanced sample . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.1.2. Balanced sample . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 4.2. Model 2 ..................................... 47 4.2.1. Unbalanced sample . . . . . . . . . . . . . . . . . . . . . . . . . . 48 4.2.2. Balanced sample . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 4.2.3. Varied mixture samples . . . . . . . . . . . . . . . . . . . . . . . . 52 CHAPTER 5. Classification of the new Gaia EDR3 . . . . . . . . . . . 57 5.1. 100 pc Gaia EDR3 sample ........................... 57 5.1.1. Applying RF trained with balanced file from Model 2 . . . . . . . . . 58 5.1.2. Applying RF trained with unbalanced sample of Model 2 . . . . . . . 61 5.2. 500 pc Gaia EDR3 sample ........................... 64 Conclusions .................................... 69 APPENDIX A. Relationship between temperature and color . . . . . 71 APPENDIX B. Halo WDs candidates found in the 100 pc Gaia EDR3 sample .............................. 73 APPENDIX C. Kinematic models ....................... 77 C.1. Model 1 ..................................... 77 C.2. Model 2 ..................................... 77 Bibliography .................................... 79
LIST OF FIGURES 1.1 Gaia EDR3 pass-bands. They cover all visible spectrum and lower part of infrared. Gin green, GBP in blue and GRP in red. [1] . . . . . . . . . . . . . . . . 9 1.2 Basic definitions regarding the space motion of a star. Extracted from [2]. . . . 10 1.3 The Milky Way structure. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 1.4 Hertzsprung-Russell diagram from Hipparcos catalog [3] . . . . . . . . . . . . 12 1.5 RPM diagram for the Gaia EDR3 observed sample of WDs within 500 pc. All stars with tangential velocity lower than 20 km/s have been filtered out. See text for details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 1.6 Toomre diagram for the Gaia EDR3 observed sample of WDs within 500 pc. See text for details. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.1 Diagram of a decision tree generated by the RF algorithm. See text for details. . 18 2.2 Normalized confusion matrices obtained when applying our RF after not having (left matrix) and having (right matrix) used oversampling technique on the same dataset. As it can be clearly seen, the oversampling notably increases the performance of the RF algorithm. . . . . . . . . . . . . . . . . . . . . . . . . 21 2.3 Diagram showing common subdivision in the data used to train and test any classification algorithm. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 2.4 Cross-validation technique: ksubgroups are used as validation dataset at each iteration. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2.5 Stars from a given dataset classified with (right panel) and without (left panel) having applied PCA technique. . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2.6 Class prediction performed by the RF algorithm (previously trained) on test set of a balanced file. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 2.7 Normalized (left panel) and non-normalized (right panel) CMs issued from the classification done by the same RF as in Figure 2.6. . . . . . . . . . . . . . . . 26 2.8 Precision-recall curve issued from the RF trained with the same balanced file as in Table 2.5..................................... 28 2.9 ROC curves for all 3 sub-populations obtained from applying the trained RF to the test set of balanced file 4.1.2. ........................ 29 2.10Schema showing all different steps when facing a problem for which a RF algorithm has been chosen as a solution. . . . . . . . . . . . . . . . . . . . . . . . 30 3.1 Representation of α,δ,ϖ,µ∗ α,µδ,G,GBP and GRP features in pairs for all WDs generated in one simulation realization. Synthetic thin, thick and halo WDs are plotted as red, blue and black dots, respectively. . . . . . . . . . . . . . . . . . 33 3.2 Two last parameters, galactic latitude and longitude of the simulated sample. Synthetic thin, thick and halo WDs are plotted as red, blue and black dots, respectively. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 3.3 Importance percentage for each physical parameter when classifying WDs from the sample generated by our simulator [4]. . . . . . . . . . . . . . . . . . . . . 34 3.4 Reduced proper motion diagram for all synthetic stars contained in our dataset. Cooling sequences for different values of tangential velocity have also been included as in [5]. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
ACKNOWLEDGEMENTS First, I would like to thank both my tutors Santiago Torres and Carles Cantero, who is also a great friend of mine, for their unconditional support and help throughout this interesting project. Without you, it would have been much harder to complete and I would not be feeling like I have learned so much. My deepest gratitude to my family and girlfriend for putting up with me through endless hours and stressing moments. You are the reason why I am trying to get better at everything day after day and I am so proud of being a part of your lives. 3
4 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm
INTRODUCTION Since ancient times, the human being has always been obsessed with discovering everything hidden from us in the sky, among this countless number of stars which we enjoy every night. In fact, there is evidence from approximately 32,000 years ago, during the stone age, of inscriptions that indicated the changes in the various phases of the moon. However, there is no doubt that the evolution of technology and, especially, advances in optics field (appearance of lenses and so on) and the invention of the telescope, allowed us to take a great step forward when it comes to scanning the sky. Regarding observation by means of telescope, there is no better way to do this than preventing it from being affected by all phenomena (such as distortion, rain clouds and light pollution, among others) that continuously occur in our atmosphere. Thus, since the mid-1960s, when the first space telescopes were launched into space by the Soviet Union, human beings have not stopped launching these objects in a multitude of missions with the most varied purposes. This possibility of improving our knowledge of the Universe, though, arose a new challenge when huge amounts of data are continuously sent and need to be dealt with (i.e. certain observation satellites send hundreds of terabytes of images daily, which makes it impossible for human beings to handle them). The Gaia mission (successor of the Hipparcos mission), despite not reaching the aforementioned figures, has been sending a non-despicable 5 Mbits/s for 8 hours a day in certain phases of its lifetime. Thus, it has been necessary to put aside classical methods for dealing with this data and resort to artificial intelligence for its exhaustive analysis. Artificial intelligence has finally arrived after such long time of dreaming on what unimaginable things we would be able to do with it. So many daily tasks are nowadays controlled up to a certain extent by hundreds and hundreds of algorithms whose goal is to make our lives easier and to simplify to the maximum tedious jobs. Such wonderful technology is also helping researchers in universities all around the globe achieve amazing breakthroughs which will change the way we understand our Universe and how we cope with yet-to-come challenges. Artificial intelligence can be seen as the general concept, where the basis is that machines become capable of carrying out tasks intelligently, or in other words, in a human-like way. To achieve this, machine learning tells us that they must be able to learn and adapt through experience and, keeping that goal in mind, deep learning (perhaps the most used implementation technique within machine learning) imitates the workings of the human brain in processing data and creating patterns for use in decision-making. As best known examples of deep learning we have neural networks, where a collection of connected units or nodes called artificial neurons model the neurons in a biological brain and their interconnections, and random forests. Random forest (RF) is a supervised learning algorithm using an ensemble learning method for classification, regression and other tasks that operates by constructing a multitude of decision trees at training time. RF is a wellknown algorithm that has been proven effective and performant in many publications such as master thesis, ’Machine learning classification of the Gaia 2nd data release based on a Random Forest algorithm’ [6] where Carles Cantero Mitjans, explores a wide variety of options for classifying Gaia data and he finally selects RF algorithm as the most flexible and robust option. In this master thesis our main objective is to disentangle a specific type of star extracted from Gaia’s 3rddata release into its different Galactic components. As mentioned, we will 5
6 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm take advantage of cutting-edge work done by [6], where the RF algorithm was identified as the one that can provide best results. Since it is a supervised method, the algorithm requires a known sample of labelled objects for the training phase. In our case, we will use a synthetic sample generated by a detailed simulator of the white dwarf population, provided by the Astronomy and Astrophysics Group (GAA) of the Physics Department of the UPC. Once we have the right tools, we will first analyze a large set of techniques that could help us improve the classification made by our algorithm. In this sense, we will go in detail through the optimization of the main parameters that RF uses to create itself and some other techniques widely used in bibliography such as Principal Component Analysis. Besides, we will also explore the effect of modification of the distribution of stars contained in the synthetic samples that the Random Forest uses to train itself. When we will have achieved an algorithm configuration that produces the best possible results, we will apply it to the real sample of white dwarf stars provided by Gaia in its 3rddata release. We will use the Gaia 100 pc sample as a test-bed for our classification and then expand it to the 500 pc sample. It is expected that the results achieved in this last case will lead to a subsequent publication in a referenced journal of astrophysics.
CHAPTER 1. GAIA EDR3 AND THE WHITE DWARF POPULATION In this Chapter we provide all the relevant information about the Gaia mission and its different data releases. In addition, we briefly introduce the different populations of stars in the Galaxy and give some basic notions of what are the stars that are of interest to us in this thesis, the white dwarfs. 1.1. The Gaia mission 1.1.1. The Gaia satellite Gaia, the acronym of Global Astrometric Interferometer for Astrophysics, is one of the cornestone missions of the ESA agency [7]. Gaia is a space observatory satellite which is the successor of previous space missions (See Table 1.1). Name Agency leading project Year of launch Part of spectrum scanned Goal Hubble space telescope NASA 1990 Ultraviolet through Infrared Be first telescope to be placed in space Chandra X-ray Observatory NASA 1999 X-ray Examines x-rays emitted by universe’s strangest objects Spitzer Space Telescope NASA 2003 IR Scanning distant and Nearby Objects Planck Observatory ESA 2009 Microwave Analyze cosmic Microwave Background Kepler Mission NASA 2009 Visible Uncover features of Extrasolar planets Hipparcos ESA 1993 From UV to Infrared Mapping Milky Way by surveying about 100000 stars, herald of Gaia mission. Gaia (Global Astrometric Interferometer for Astrophysics) ESA 2013 From UV to Infrared Create three-dimensional map of Milky Way by surveying about 1% of the Milky way’s 100 billion stars. Table 1.1: Some of the most important missions regarding sky observation and its main features. Gaia mission is highlighted in yellow. Gaia satellite was launched on December 19th, 2013 from the Center Spatial Guayanais in Kourou. It was launched aboard a Soyuz-ST-B rocket with a total mass of the spacecraft of 2,029 kilograms. The astronomic observatory was then located at Sun-Earth L2 Lagrange Point and an accurate sky-scanning law has been providing around 5 Mbits/s, 8h per day. Gaia is, thus, attempting to create the largest and most-precise 3-D map of our Galaxy, the Milky Way. In order to achieve this, it contains three scientific instruments: •Astrometric Instrument (ASTRO): devoted to measuring stellar positions on the sky. By combining all measurements of a given star over the mission period, it will be possible to deduce its parallax and thus its distance, as well as the velocity of the star as it moves across the plane of the sky, what is called the proper motion. [8]. •Photometric Instrument: provides color information for celestial objects by gen- 7
8 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm erating two low-resolution spectra, one in the blue and one in the red range of the optical spectrum. These data help to determine key stellar properties such as temperature, mass and chemical composition [8]. •Radial Velocity Spectrometer (RVS): reveals the velocity of the star along the line of sight by measuring the Doppler shift of absorption lines in a high-resolution spectrum covering a narrow wavelength range [8]. We can check that Gaia is equipped with most cutting-edge technology to be able to fulfill its main duty. To date, there have already been three Gaia data releases: •Gaia DR1, published on September 14, 2016. •Gaia DR2, published on April 25, 2018. •Gaia EDR3, published the 3 December 2020. •Gaia DR3 expected first half 2022. The information obtained from all data released has been studied in-depth by the scientific community and thousands of publications have seen the light of day. Since last data release has yet to be carried out, in this thesis we have worked exclusively with Gaia EDR3, continuing the work done in [5]. 1.1.2. The Gaia photometric system A key parameter in astronomic observation is the brightness of a stellar object. That is the luminosity (or radiated light/electromagnetic power), which is defined as the total amount of electromagnetic energy emitted per unit of time by a star, galaxy, or other astronomical object. It can be expressed in two different ways: in terms of the luminosity of our Sun (L; Sirius, brightest star in the night sky has 25.4L) or as an apparent magnitude, which is a logarithmic measure of the luminosity within some specific wavelength range or filter band. Apparent magnitude in turn can be transformed into absolute magnitude, which is defined to be equal to the apparent magnitude that the object would have if it were viewed from a distance of exactly 10 parsecs from us [9]. As we have said, luminosity is measured within some specific wavelength range or filter band. Gaia mission is using a system consisting in three pass-band filters seen in Figure 1.1,G,GBP and GRP. We briefly describe them hereunder: •G: Covering all visible spectrum and farther (up to 1000 nm). Centered around 650 nm. •GBP: Covering blue part of the visible spectrum and having a span of roughly 400 nm. Centered around 500 nm. •GRP: Covering red part of the visible spectrum and infrared, having a span of roughly 400 nm. Centered around 800 nm.
CHAPTER 1. GAIA EDR3 AND THE WHITE DWARF POPULATION 9 Figure 1.1: Gaia EDR3 pass-bands. They cover all visible spectrum and lower part of infrared. Gin green, GBP in blue and GRP in red. [1] 1.1.3. Gaia astrometric solution Along with the photometric system, Gaia mission is mainly devoted to measure distances (or, in fact, the inverse of the distance that is called the parallax1). Moreover, the variation of the location of a star in the sky for different epochs provide us with a measure of its proper motion. That is the astrometric measure of the observed changes in the apparent places of stars or other celestial objects in the sky, as seen from the center of mass of the Solar System, compared to the abstract background of the more distant stars [2]. In Figure 1.2, we show a diagram which allows us to better understand how proper motion is defined and computed in astronomy. It is worth saying that once known the proper motion, µ, and the distance, d, we can derive the transverse or tangential velocity, VTof the object. On the other hand, obtaining radial velocity component requires taking into account Doppler effect, which is expected to be given by the RVS of Gaia. However, as we will later see, that is not possible for all type of stellar objects. Tangential velocity together with the radial velocity determine the complete space velocity. 1Strictly speaking the parallax is the angle, ϖ, subtended by an object observed at different points from Earth orbit. If the distance is not too large, we can approximate the distance, d, as d=1/ϖ, being ϖ measured in arcsec and din parsecs.
10 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 1.2: Basic definitions regarding the space motion of a star. Extracted from [2]. In summary, Gaia mission in EDR3 is going to provide the following information [10]: •The full astrometric solution (5 parameters) - positions on the sky in equatorial coordinates, (α,δ), parallaxes, and proper motions - for around 1,468 billion (1.468.109) sources, with a limiting magnitude of about G≈21 and a bright limit of about G≈3. •The full astrometric solution has been done as 5-parameter solution for 585 million sources and as 6-parameter solution for 882 million sources. In the 6-parameter solution, the additional fitted quantity is the so-called pseudo-colour that had to be included for sources without high-quality colour information. •In addition, two-parameters solutions - positions on the sky (α,δ) - for around 344 million additional sources. •Gmagnitudes for around 1.806 billion sources. •GBP and GRP magnitudes for around 1.542 billion and 1.555 billion sources, respectively. 1.2. Astrophysical content 1.2.1. Our Galaxy: The Milky Way A galaxy is a large ensemble of stars, gas, and dust bound together by gravity and they come in a huge variety of shapes and sizes. The Galaxy we live in, the Milky Way, is a large barred spiral galaxy and most of the stars we see in the night sky belong to it. It has several satellite galaxies and is part of the Local Group of galaxies, which form part of the Virgo Supercluster, which is itself a component of the Laniakea Supercluster. Its diameter accounts for 100,000–200,000 light-years and some recent simulations suggest that a dark matter disk, also containing some visible stars, may extend up to a diameter
CHAPTER 1. GAIA EDR3 AND THE WHITE DWARF POPULATION 11 of almost 2 million light-years. Total number of stars in a galaxy is very hard to determine, but the Milky way is estimated to contain 100–400 billion stars and at least that number of planets. Given the immense number of stars contained in the Galaxy, astronomers decided to subdivide them into different populations: Figure 1.3: The Milky Way structure. In figure 1.3 we can distinguish a total of 4 different sub-populations whose characteristics we are going to define succinctly: •Bulge: is a tightly packed group of stars around the center of the Galaxy, known as Sagittarius A (radio source containing super massive black hole at the Galactic center). •Thin disk: it contains all stars which are confined to the Galactic plane of rotation with a scale height of about 400 light years and about 100.000 light years across. It accounts for 85% of the stars in the Galactic plane and 95% of the total disk stars. •Thick disk: it is formed by the stars located between 3.300 and 16.300 light years above the Galactic plane and is composed almost exclusively of older stars. Its stellar chemistry and stellar kinematics set it apart from the thin disk. •Halo: roughly spherical region around the Galactic center. As for the Milky Way’s halo, it is thought to have a radius of some 50.000 light-years. Only about 1% of the Galaxy’s stellar mass resides in its halo, and due to its low luminosity (with most stars having ages greater than 12 billion years), the observation of halos in other galaxies is extremely difficult. Our Solar System is located at a radius of about 27,000 light-years from the Galactic Center, on the inner edge of the Orion Arm, one of the spiral-shaped concentrations of
18 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 2.1: Diagram of a decision tree generated by the RF algorithm. See text for details. one and all samples can be classified into 3 different categories (0: thin, 1: thick and 2: halo). Therefore, every time one of the stars of the dataset xtrain has a lower value for x1than 17 mag for Gmagnitude, decision tree shown will appeal to x2to find out which category the element should be labelled with. Depending on the value for x2, the star will be considered belonging to one or other subcategory. It is very important to point out that these ‘rules’ artificially created by the RF to classify the data give rise to regions that must never overlap. Otherwise, at the bottom of the decision-tree, one same star could belong to two different categories and the ‘final decision’ done by the algorithm would be purely random. There are several python modules available which can be used to generate a given tree, but we will focus on the one used by the Scikit-learn package, CART algorithm [13]. This algorithm applies a series of steps which define all yes/no questions leading to the greatest reduction of Gini impurity metric1. In other words, all ‘rules’ seen in Figure 2.1 for variables x1and x2are recursively changed after going through a random subset of the stars in the dataset until we reach a configuration which minimizes Gini impurity in leaf nodes (should be equal to 0 in the nodes at the bottom of the tree when ‘decision’ has been made). The Gini metric is defined as: IG(n) = 1− J ∑ i=1 p2 i(2.1) where piis probability of samples belonging to class iat a given node. Thus, the Gini Impurity is a number between 0-1, which indicates the likelihood of new, random data being misclassified at a given node if it were given a random class label according to the class distribution in the dataset. To get a better understanding on how Gini function works, 1Shannon entropy is other main metric option for classification algorithms, but Gini reduces computation time since Shannon entropy is calculated by means of logarithms [12]
CHAPTER 2. THE RANDOM FOREST ALGORITHM 19 we present in Table 2.1 a straightforward example. It shows the Gmagnitude and parallax, ϖ, features of a set of five WDs belonging to the populations with labels 0, 1 and 2. Star number G(mag) ϖ(mas) Population 1 12 3 0 2 18 1 1 3 9 2.5 1 4 15 0.8 1 5 11 1.25 2 Table 2.1: Example of artificial dataset out of which decision tree shown in Figure 2.1 could have been built. In order to build the decision tree, the first step is to compute the Gini metric (Eq. 2.1) in the top node (see Fig. 2.1). Therefore: Itop =1−"1 42 +2 42 +1 42#=10 16 =0.625. Since Itop 6=0, at least one more layer of nodes has been needed in order to reach Gini=0 at each node (sine qua non condition to complete the decision tree). That is why leaf nodes have been created. In these nodes, Gini is equal to 0 since all stars fulfilling specific criteria to split belong to the same population. If Gini had not been 0, more layers using one or more features would have been generated up to the point where all leaf nodes would have had Gini value equal to 0. RF is a model made up of many decision trees. Rather than just simply averaging the prediction of trees, this model uses two additional key concepts that gives it the name random: •When training, each tree in a RF learns from a random sample of the data points. The samples are drawn with replacement, known as bootstrapping, which means that some samples will be used multiple times in a single tree. The idea is that by training each tree on different samples, although each tree might have high variance with respect to a particular set of the training data, overall, the entire forest will have lower variance but not at the cost of increasing the bias. •Only a subset of all the features are considered for splitting each node in each decision tree. Generally, this is set by the user through hyperparameter max f eatures (explained in Section 2.3.1.) for classification meaning that if, for instance, there are 16 features, at each node in each tree, only 4 random features will be considered for splitting the node. (The RF can also be trained considering all the features at every node). Now, we could question ourselves on why not only working with one decision tree. Indeed, a decision tree can perfectly match with some classification problems and generate accurate results. As seen in the example of Fig. 2.1, it allows us to perfectly classify the training data whether we do not limit the maximum depth of the tree (number of layers). This is the
20 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm key point: if we generate a decision-tree which essentially memorizes the training data by fitting it closely, this model will not only be learning actual relationships in the data, but also any noise present in it. This phenomenon is known as overfitting and it goes against one of the objectives of machine learning, to generalize well to new data it has never seen before. Our goal is to create a flexible model, one with high variance since learnt parameters can vary considerably with the training data. As opposed to overfitting, we have underfitting that generally manifests itself when you try to train a model with a very complex data set at the level of correlations and statistical dependencies, but you have few data and therefore you do not cover in the training the variance that you should cover. Therefore, both overfitting and underfitting must be avoided if we want a model that can generalize well when faced with new data. Once we know why more than one tree is needed, we can explain briefly how algorithm actually learns: several individual decision trees are trained in parallel on various subsets of the training dataset using different subsets of available features (technique known as bootstrapping, as already mentioned). This technique ensures that each individual decision tree in the random forest is unique, which reduces the overall variance of the RF classifier. For the final decision, RF classifier aggregates the decisions of individual trees. 2.3. Optimizing the Random Forest 2.3.1. Hyperparameters In machine learning, we call as hyperparameters those algorithm parameters that are not directly learnt along the training stage and therefore, they must be set for the user. For instance, neural networks architecture generally consists on a set of dense neurons distributed on different layers. The number of neurons on each layer of the network is an example of a hyperparameter. In our case, the RF algorithm has its own set of hyperparameters. Table 2.2 summarizes the most used. Hyperparameter Definition Range of values n estimators Number of trees in a RF From 40 to 500 in steps of 5 min samples split Minimum number of samples required to split a node [2, 5, 10] min samples leaf Minimum number of samples required at each leaf node [1, 2, 4] max features Number of features to consider at every split [’auto’, ’sqrt’] max depth Maximum number of levels in tree From 10 to 40 in steps of 2 bootstrap Method of selecting samples for training each tree [True, False] Table 2.2: Set of hyperparameters used by a RF algorithm for any classification problem. Range of values tested for each hyperparameter when training any RF presented in this thesis. As for max f eatures, ’auto’ means all features can be considered when doing any split, while ’sqrt’ will make that only a subset will be taken into account. These 6 hyperparameters are the most used for any classification problem where RF has been selected as solution. From the bibliography and after several tests conducted on available data, we have concluded that each of these hyperparameters could only take values within a certain range as shown in the third column of Table 2.2. To find optimal combination of them, we have used a function known as RandomizedsearchCV which
CHAPTER 2. THE RANDOM FOREST ALGORITHM 21 allows us to randomly test combinations of these hyperparameters on a given dataset (this has been done every time we have started to work with a new dataset since set of hyperparameters can slightly differ whether data used as input to train the algorithm changes). 2.3.2. Oversampling and undersampling These techniques can only be used when working with imbalanced datasets. These datasets are those where there is a severe skew in the class distribution, such as 1:100 or 1:1000 examples in the minority class to the majority class. This bias in the training dataset can influence many machine learning algorithms, leading some to ignore the minority class entirely. This is a problem as it is typically the minority class (as it can be in our problem since we would like to detect as many stars as possible belonging to the halo sub-population) on which predictions are most important. The two main approaches to randomly re-sampling an imbalanced dataset are to delete examples from the majority class, called undersampling, and to duplicate examples from the minority class, called oversampling. Undersampling is a technique which cannot be used so straightforwardly since it implies eliminating samples from the majority class and this can lead to an information loss and, therefore, likely misclassifications. On the other hand, oversampling is only about replicating existing samples of the minority class so, it does not bring about any data loss. We now look at the differences of the same dataset with and without oversampling (equalizing number of elements in each class by replicating already existing elements in the minority classes). In Section 2.4.2. we will introduce the concept of confusion matrix but, to make our point, it is enough to know that elements in the diagonal of the matrix represent percentage of elements for each class classified correctly: Figure 2.2: Normalized confusion matrices obtained when applying our RF after not having (left matrix) and having (right matrix) used oversampling technique on the same dataset. As it can be clearly seen, the oversampling notably increases the performance of the RF algorithm. There are several things worth to mention when comparing the two previous confusion
22 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm matrices: •The number of thin elements classified correctly has slightly decreased, from 97 to 94%, after applying oversampling. This was expected since we are giving more importance to the two minor classes (thick and halo) and taking it away from the predominant class (thin WDs). •Elements tagged with the right label for halo stars have increased to 100%. Consequently, all halo stars have been classified correctly. As for thick stars, the performance has also notably increased from 30 to nearly perfect 98%. After the previous example, we may conclude that oversampling should always be used given improvement seen in the overall results. But that is not the case, since one important drawback arises. Using oversampling leads to a very well-known issue which we have already explained in Section 2.2.: overfitting. RF trained with oversampled dataset has been used to break down different datasets and the results have been significantly worse than the ones obtained using non-oversampled dataset. This indicates that, when oversampling such an imbalanced dataset, most of the duplicated WDs are only introducing noise into the sample and this makes the RF very good when classifying original dataset but not so optimal when applied to others. In spite of not being able to use oversampling technique for our classification problem, we have detected that having balanced datasets can lead to better success rate when categorizing WDs so, we will explore this further in Section 5. 2.3.3. Hold out and cross-validation Hold out relies on the assumption that learning the parameters of a prediction function and testing it on the same data is a methodological mistake: our RF would just repeat the labels of the samples that it has just seen and would have a perfect score but would fail to predict anything useful on yet-unseen data. We are yet again faced with overfitting. To avoid this effect, it is common practice when performing a (supervised) machine learning experiment to separate our dataset in two blocks: one of them will be our training set (the one used to train the data, in our case the algorithm will have access to the population every WD belongs to) and the rest of the samples will be tagged as test set (in this case, the algorithm will make a prediction to which population each WD is part of and we will be able to know how well our RF performs by applying different metrics). Figure 2.3: Diagram showing common subdivision in the data used to train and test any classification algorithm.
CHAPTER 2. THE RANDOM FOREST ALGORITHM 23 Figure 2.3 shows how any dataset is divided into train and test sets (splitting the data like this is commonly known as hold-out). At the same time, we can also see a third dataset which is called validation dataset. This last one will allow us to check a certain configuration of the RF (with specific hyperparameters and a given number of trees with its corresponding branches and decision points) and make sure it is the optimal one. It is on this validation subset where we will apply cross-validation. This technique consists of randomly dividing the data that you are going to use to train the algorithm into kgroups of approximately the same size, so that k−1groups are used to train the model and one of the groups is used as validation (See Figure 2.4). This process is repeated ktimes using a different group as validation in each iteration. The process generates kestimates of the error, the average of which is used as the final estimate. Figure 2.4: Cross-validation technique: ksubgroups are used as validation dataset at each iteration. Both hold out and cross-validation are techniques commonly used in classification problems that allow to significantly improve the performance of the algorithm. 2.3.4. Principal component analysis Up to this point, we have gone through a series of techniques which allow any RF user to improve the performance of the algorithm. Now, we will focus on Principal Component Analysis (PCA) [14], a specific technique used in many different scientific fields that can reduce complexity of our problem. PCA of a collection of samples are a group of northogonal unit vectors where i-th vector is the direction of a line which best fits the data, that is, a eigenvector of the data. In this specific case, a best-fitting line is defined as one that minimizes the average squared distance from the points to the line. These directions constitute an orthonormal basis (orthogonal and all vectors having norm 1) in which different individual dimensions of the data are linearly uncorrelated. PCA is the process of computing the principal components and using them to perform a change of basis on the data, sometimes using only the first few principal components and ignoring the rest. For instance, in our WD sample we can have 8 different variables: equatorial coordinates (α,δ), parallax, ϖ, proper motion, µ, in equatorial coordinates (µ∗α,µδ)and three photo-
24 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm metric magnitudes, (G,GBP,GRP). Our goal is to find hidden linear relationships (since no human would be able to do it by simple observation of the data) between all these features and be able to reduce data dimensionality and, consequently, the complexity of the data and ameliorate computation time (since the smaller the number of features used to create all decision trees in the forest, the faster our tree can classify every star in the dataset). We show hereunder the results of applying a PCA to the balanced dataset 4.2.1. (same number of elements for all three types of WDs, i.e., 36,319) and described by the variables previously commented: PC1 PC2 PC3 PC4 PC5 PC6 Variance (%) 51.37 46.56 1.77 0.27 0.001 0.000008 Table 2.3: First 6 principal components and their variance obtained from PCA applied to file presented in 4.1.2. Finding 6 principal components for this dataset has provided very interesting results. With only 2 components we obtain nearly 98% of the total variance (information) contained in the data. Furthermore, if we take four of them, we are at 99.99%. Therefore, we can conclude that there are several linear relationships between the variables used to described the population. Data dimensionality reduction can therefore be applied and we can proceed and train our RF with only 4 principal components instead of all 8 parameters early mentioned. We can now compare (see Figure 2.5), using one of the metrics which are presented in 2.4., the classification of the test set (20% of total amount of WDs) with the RF trained with (right panel) and without (left panel) PCA. Figure 2.5: Stars from a given dataset classified with (right panel) and without (left panel) having applied PCA technique. From Figure 2.5, it can be seen that results slightly differ one from the other. Success rate drops by just 3% with respect to the case where PCA has not been used. Despite these outstanding results, we must remember two crucial characteristics when using PCA: •In this example we are analyzing data coming from a simulator created by humanbeings. Simulations are generated through artificial data issued from applying laws
CHAPTER 2. THE RANDOM FOREST ALGORITHM 25 of physics which are plagued with linear relationships. This does not need to happen in nature, where relationships between different features are hardly ever linear and therefore not so easy to decompose and reduce their dimensionality. •Loss of the physical meaning when working with new components: since principal components are projections into an initial high-dimensional space, new variables utilized to train the RF loose a big amount of physical meaning that the initial variables have. This means it becomes much more difficult to comprehend why only two of the initial eight variables account for more than 97% of the total variance of the data. Taken all this into account, PCA has been used throughout this project to obtain an initial classification for all different models which will be introduced later but not for the final classification of the WDs in Gaia EDR3 since understanding physical meaning of the results is one of the main goals of this thesis. 2.4. Metrics: assessing the performance of the algorithm 2.4.1. Class prediction For each of the different classes a certain element of our dataset can be tagged with (in our specific problem: 0=thin, 1=thick and 2=halo), obtain the number of stars classified correctly and those which have not. In Figure 2.6 we can see an example of class prediction diagram. Figure 2.6: Class prediction performed by the RF algorithm (previously trained) on test set of a balanced file.
26 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 2.7: Normalized (left panel) and non-normalized (right panel) CMs issued from the classification done by the same RF as in Figure 2.6. In the abscissa axis we present all 3 different classes in which WDs can be classified and in the ordinate axis we have the total number of elements in each class. Then, for all stars belonging to a certain population, we can see how many of them have been labelled correctly and how many have not. Even though we do not have the exact number of stars having been correctly and incorrectly classified (confusion matrix will give us that information), we can immediately get a hint on how well our RF algorithm has performed. 2.4.2. Confusion matrix A confusion matrix (also known as error matrix) is a specific table layout that allows visualization of the performance of a supervised learning algorithm. Each row of the matrix represents the elements in an actual class while each column represents the elements in a predicted class. This is an alternative way to present the same results as with the class prediction but containing more numerical information. In the left panel of Figure 2.7 we show percentages of elements of each class classified correctly (diagonal of the matrix) and classified incorrectly (outside the diagonal). Thus, element 1x1 in the matrix is telling us that more than 80% of the total number of thin stars have been tagged as belonging to the thin disk by the RF and elements 1x2 and 1x3 indicate that 20% left has been broken down into 19% of thick disk stars and less than 1% as halo stars. Both configurations of the CM give us specific information on how the algorithm has classified our data and they also may highlight possible mis-classification issues between different subcategories every WD can be classified on. 2.4.3. Success rate The success rate is simply the fraction or percentage of success among the number of attempts. For our specific problem, we have defined two different ways of calculating this: i) The number of stars classified correctly divided by the total number of stars contained in the dataset (%). Also known as accuracy metric in the bibliography. [13]
CHAPTER 2. THE RANDOM FOREST ALGORITHM 27 ii) The mean average of the percentages of stars having been labelled into the right population. Like this, we can give the same importance to all three sub-populations even if the initial number of stars is not the same in each of them. Even though the success rate can easily give us an indication on whether an algorithm is performing well, we need to go further if we really want to get a grasp on how a certain RF model is classifying a dataset. Table 2.4 displays both types of success rate definitions for the CM presented in Figure 2.6. Success rate (i) Success rate (ii) Value (%) 79.81 79.33 Table 2.4: Both types of success rate used in this thesis used on a balanced file. As we were working with a balanced file and these files have nearly same number of elements for each class, both success rates are very close to each other. We will see later that this does not happen when we evaluate results gathered from an unbalanced file. 2.4.4. Precision and recall Precision and recall are two complementary concepts used to evaluate the performance of classification system. They are calculated according to the following definitions: precision =tp tp+fp (2.2) and recall =tp tp+fn ,(2.3) where tpis true positive rate, that is the number of elements of a given class which are relevant and which the model correctly identified as relevant, fpis the number of elements which are not relevant but the model incorrectly identified as relevant and fnis the false negative rate, that is the number of elements which are relevant and the model incorrectly identified as not relevant. Consequently, we can conclude that the precision metric (it is also given the name positive predictive value in the bibliography) indicates how ’accurate’ the algorithm is. In other words, of all the predictions for a specific class, how many of these are true. On the other hand, recall (known as sensitivity or true positive rate) indicates how good the algorithm is when identifying elements of a given class. Thin Thick Halo Precision 76 70.45 88.9 Recall 78.4 71.9 93.7 Table 2.5: Precision and recall calculated from Figure 2.6 for three different subpopulations of WDs in the Galaxy. Precision and recall for each class extracted from Figure 2.6 are given in Table 2.5. The results show that our trained RF algorithm is very efficient at identifying true halo stars and,
34 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 3.3: Importance percentage for each physical parameter when classifying WDs from the sample generated by our simulator [4]. Figure 3.3 is showing that the components of the proper motion of the star account for more than nearly 50% of the ‘decision’ that the RF algorithm must make every time a star is classified. This means that during the generation of the different trees which will make up the forest, a certain criterion over the value of the components of the proper motion will be present in more than 50% of the nodes through which every WD goes before it is tagged as being part of a specific population. Aside from that, the parallax value of the star is more than 10% important, the two photometric values together are nearly 20% responsible for the final decision and, finally, position of the star in the sky represented by right ascension and declination is roughly 10% important altogether. 3.2. Optimizing the RF to apply to Gaia DR2 Our goal in this section was to recreate and optimize the RF algorithm in order to achieve a success rate as close as possible to the one used in [5]. To accomplish that, one synthetic sample generated by our simulator [4] containing tens of thousands of WDs has been used to train and test the RF algorithm. The features used in this dataset are the first eight parameters previously explained, α,δ,ϖ,µ∗ α,µδ,G,GBP plus and an additional label, indicating membership to one of the Galactic components. The total number of WDs generated in this sample is 164073, distributed in 117675(71.7%) thin disk WDs, 33156(20.2%) thick disk WDs and 13242(8%) halo stars.
CHAPTER 3. REPRODUCING GAIA DR2 RESULTS 35 Figure 3.4: Reduced proper motion diagram for all synthetic stars contained in our dataset. Cooling sequences for different values of tangential velocity have also been included as in [5]. 3.2.1. Preparing the dataset In this section, the synthetic dataset generated by our simulator presented is prepared before being used to train the RF algorithm. We have first had to apply several filters to the dataset since these were the ones applied to the observed sample of WDs (i.e. Gaia DR2 sample). 3.2.1.1. Filtering the sample Figure 3.4 shows how our dataset is distributed into RPM diagram: As we have commented previously, several filters have now been applied in line with the ones applied to the Gaia DR2 observed sample. These filters have been obtained from the bibliography [5] and are as follows: •The bigger the Hvalue for a given star, the harder it is to obtain reliable data from it, therefore, we have decided to eliminate all objects with H>30 as/yr. •As we can see, there are no objects with color index GBP-GRP lower than -0.5 but all values can be accepted for this parameter. From now on, a minimum value of -0.5 will be considered when working with any new data. •Finally, in order to eliminate possible contaminants (especially background noise due to non-WDs objects) from our dataset, we select objects with tangential velocity
36 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 3.5: Reduced proper motion diagram for all synthetic stars contained in our dataset. The right triangle delimited by the three filter lines will be used to train our RF algorithm as in [5]. greater that 20 km/s. Therefore, we have removed all stars which (H,GBP-GRP) values place them above the extrapolation of the WD cooling sequence with Vtan > 20 km/s. In Figure 3.5, we can see the filters applied and the stars selected to later train and test our RF algorithm. After the filtering process, the total number of objects available to train the algorithm is distributed as follows: 99960 thin stars, 30382 would belong to the thick disk and 12599 are halo WDs. Consequently, the total number of WDs that will be used to train and test from synthetic dataset is 142941, which means a reduction of roughly 13% with respect to the initial number of WDs. 3.2.1.2. Training the algorithm Once we have selected the right WDs, it is time to train the algorithm and apply it to the filtered sample. Table 3.2 is showing the best set of hyperparameters found which will be used as input for the RF before applying it to the test dataset. We can see that this time the RF algorithm has taken the approach of using a lot of decision trees without much depth in them. This reduces the computation complexity and helps in dealing with datasets with many samples. CM issued from applying the RF tuned with hyperparameters seen in Table 3.2 to the corresponding test dataset is shown in Figure 3.6.
CHAPTER 3. REPRODUCING GAIA DR2 RESULTS 37 n estimators Max depth Max features min samples leaf min samples split bootstrap 154 13 ‘auto’ 2 5 True Table 3.2: Best set of hyperparameters found by function RandomizedsearchCV after applying it to the synthetic filtered sample. Figure 3.6: CM issued from the RF algorithm applied to the test set of the synthetic filtered sample. We now analyze the information extracted from Figure 3.6: •96% of thin disk stars are correctly classified as belonging to the thin disk. Since majority of the stars contained in the dataset belong to the thin disk, the algorithm can better discriminate which ones do belong to this subcategory. •There are 47% of real thick stars that have been correctly labelled. This number does not seem very appealing since other 53% have been misclassified, mainly as thin and also as halo stars. This clearly indicates that the algorithm is favoring the classification as thin stars instead of thick ones due to an overlapping between these two sub-populations and the disproportionate ratio between these two classes. •Finally, 83% of halo stars are correctly classified, 15% are erroneously marked as thick disk stars and much less than 5% are flagged as thin disk stars. It seems that the algorithm does not get halo stars mixed up with WDs belonging to other sub-populations. In Figure 3.7, we have plotted the PR curve for the RF algorithm tuned with the hyperparameters shown in Table 3.2. As it was expected, Figure 3.7 confirms the results shown by the CM of Figure 3.6. Even though the overall average precision is very good (90%), there is one class for which classification has not been efficient whatsoever: thick disk sub-population. We are faced with the issue already explained in the previous paragraph, where RF gives preference to the majority class over the others. We can observe, though, a very weird phenomenon of low oscillations at low thresholds. This happens because small changes in the threshold
38 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 3.7: PR curve for the synthetic filtered sample. can produce that a non-negligible number of stars is classified with a different tag than in the previous classification. Sometimes there are more WDs going from one class to the other but, in the next step, it can be the other way around. Figure 3.8 is now showing the classification performed by the RF tuned with the hyperparameters seen in Table 3.2 on the synthetic filtered sample. Since it will be used later to explain changes when introducing new models to study Gaia EDR3, Figure 3.9 presents the number of stars vs tangential velocity for our synthetic dataset. 3.3. Applying the RF algorithm to previous Gaia DR2 Once filtered and prepared the dataset obtained from our synthetic sample we have use it in our RF algorithm applied it to the Gaia DR2 data. Figure 3.10 is showing how the total 12900 observed stars selected from Gaia as likely WD candidates have been classified by our RF algorithm. Most of them (nearly 90%) have been tagged as thin stars, a little more than 10% have been identified as belonging to the thick disk and just 95 stars (something less than 1%) have been labelled as halo members. Besides, we can see that the classical way based on reduced proper motion cuts agree quite well with the results given by our RF for hot objects (i.e., GBP-GRP <0.7). However, some discrepancies arise for cooler objects where the overlap between sub-population is quite evident in the RPM diagram. Regarding, stars classified as halo, we can see some distinctive features: •Out of 95 stars labelled as halo, at least 84 of them have a GBP-GRP color index higher than 1. The higher the GBP-GRP color index, the redder the WD is bound to
CHAPTER 3. REPRODUCING GAIA DR2 RESULTS 39 Figure 3.8: Reduced proper motion diagram showing the classified WDs (thin, thick and halo WDs correspond to red, blue and black dost, respectively) of the synthetic filtered sample. For illustrative purposes we also show the extrapolated cooling sequences for tangential velocities of 20, 100 and 200 km/s. Figure 3.9: Histogram showing number of stars (logarithmic scale) versus tangential velocity for each sub-population (green: thin; orange: thick; and blue: halo) of the synthetic filtered sample.
40 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 3.10: RPM diagram of the Gaia DR2 data after applying our RF algorithm trained with the filtered synthetic sample. be and, at the same time, temperature (it is possible to link them by means of given formula A) of the star is also lower. Finally, we know that a star becomes red when it has entered in the last stages of its life so, we can conclude that WDs found in the halo sub-population tend to be older than stars dwelling in other parts of the Galaxy. •Halo WDs are bound to have higher velocities than stars belonging to other subpopulations as we can see in the plot. All black dots are seen at the bottom of the H axis and this clearly indicates high velocities with respect to us. Figure 3.11 displays the Toomre diagram for the Gaia DR2 classification performed by means of our RF algorithm. One more time, we detect in Figure 3.11 that the RF algorithm has associated WDs to the halo sub-population with highest speed objects. Even though not all halo stars are beyond the line delimiting 200 km/s for the module of the velocity, they are, most of them, in the region where expected values for Galactic velocity are found. To finish this chapter, we comment that the results obtained are according to the expected ones. That is, these results coincide completely with those found in [5]. Consequently, they allow us to explore new simulator configurations and, also, to be able to change the composition of the synthetic samples that are used to training and testing the RF algorithm.
CHAPTER 3. REPRODUCING GAIA DR2 RESULTS 41 Figure 3.11: Toomre diagram obtained from applying our RF algorithm to the Gaia DR2 data.
CHAPTER 4. SELECTION OF THE MODEL TO APPLY TO GAIA EDR3 In this Chapter, we have tested and evaluated a set of two synthetic models which have led to different trained RFs. The goal is to find out which model could provide better results when applied to the new Gaia data release, EDR3. All these RFs have been trained with synthetic samples generated by the simulator [4]. Some modifications have been introduced between different models. One additional issue we have taken into account is whether balanced samples (those with the same number of elements in each class), even if observational percentages of WDs are not balanced, can provide better results than unbalanced one. 4.1. Model 1 This new configuration represents an evolution of the physical model presented in the previous Chapter (see Section 3.9). Some of the improvements introduced concern the photometric system (G,GBP,GRP), which has been updated in accordance with EDR3 pass-bands system1and a modeling update of the kinematic of the Galactic components (see Appendix Cfor a description of the models). Consequently, the simulator generates a new distribution of tangential velocities for each of the three sub-populations of the Galaxy. We can illustrate this in a much clearer way through the Figure 4.1 where we show an histogram of the number of stars (logarithmic scale) versus tangential velocity for each WD sub-population. If we compare the Figure 4.1 with the corresponding distribution obtained for the synthetic sample used to classify Gaia DR2, as shown in Figure 3.9, some differences can be pointed out: •Thin WD distribution stops at 200 km/s instead of doing it at 130 km/s as in Figure 3.9. This means that we have accepted the possibility of finding thin WDs with higher velocities than in [5]. •As for thick stars, we can see that the maximum velocity they can reach has also been incremented from approximately 200 in Figure 3.9 to 230 km/s. •Finally, halo star distribution has not been substantially modified. Only more stars have been added to generate the balanced sample of Model 1. 4.1.1. Unbalanced sample This sample has been created with comparable WD proportions to the ones seen in Section 3.2.1. Only the number of halo stars has been slightly reduced due to changes in the initial configuration of the simulator. It contains elements for all three sub-populations with similar rates to the ones found in our Galaxy. That is, the number of elements for each 1Gaia EDR3 pass-bands: https://www.cosmos.esa.int/web/gaia/edr3-pass-bands 43
50 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 4.8: Confusion matrix used to assess the performance of the RF algorithm trained with an unbalanced sample issued from Model 2. Figure 4.9: Representation of α,δ,ϖ,µ∗ α,µδ, G, GBP and GRP features in pairs for all WDs contained in the balanced sample of our Model 2. Synthetic thin WDs are in red, thick WDs are in blue and halo ones in black.
CHAPTER 4. SELECTION OF THE MODEL TO APPLY TO GAIA EDR3 51 As it has been seen with the other balanced samples presented in this Chapter, it is extremely difficult to obtain any crucial information or even to glimpse any significant distinction among the sub-populations plotted in Figure 4.9. Which is important here is assessing how good metrics of evaluation are compared to the ones for the rest of the samples seen up to now. In Figures 4.10 and 4.11 we present metrics utilized to evaluate the performance of the RF algorithm trained with balanced model. Figure 4.10: Confusion matrix used to assess the performance of the RF algorithm trained with a balanced sample issued from Model 2. Figure 4.11: PR curve showing the performance of the RF trained with the balanced sample from Model 2.
52 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm In this case, the performance of the RF algorithm is the best found so far. Nearly all thick and halo WDs have been correctly classified and we have only penalized thin subpopulation which is now at an acceptable 80% success rate. The overall success rate is roughly 90%, which is almost 10% better than the one obtained from the balanced sample of Model 1 (see Section 4.1.2.). Furthermore, the PR (see Figure 4.11) curve is confirming these optimal results by showing an average precision of 90% and 97% PR for halo stars at default value for threshold. The balanced sample from Model 2 has therefore been selected as the one to apply to the observed Gaia EDR3 data. However, the proportions in a balanced sample are not the ones we can expect to find in nature (much closer to the ones of the unbalanced sample presented in Section 4.1.1.). This fact can lead to an overestimation of the number of halo and thick stars classified as such when applying the RF algorithm. Consequently, we have decided to generate a new set of samples to apply to DR3 data whose proportions are in-between the ones of balanced and unbalanced files. 4.2.3. Varied mixture samples As previously stated, we have decided to, apart from our balanced sample from Model 2, create a set of samples with much similar proportions to the ones found in nature. Table 4.1 shows all different combinations we have tested to generate our set of varied mixture samples. WD proportions (% thin-thick-halo) Success rate (%) Average precision (%) 45-35-20 86.7 88 50-35-15 86 87 56-30-14 85.6 87 50-40-10 85.2 87 55-35-10 85 86 60-30-10 84.3 86 Table 4.1: Varied mixture samples generated out of the balanced model presented in 4.2.2. and their corresponding performances. All these combinations have been generated by means of randomly selecting all three sorts of WDs from the balanced sample of Model 2. Table 4.1 is clearly showing the previously mentioned tendency of the RF algorithm to give more importance to majority class in a dataset as its ratio of presence increases and, consequently, to better classify any given dataset as it gets closer to having equal proportions for all types of elements contained in it. Out of the 6 combinations presented, we have only retained two of them (the ones marked in red and green in Table 4.1) to test since the other 4 were neither close enough to the observed populations of WDs found in our Galaxy, nor near enough of the balanced sample which has provided the best results so far. The two highlighted mixtures have been exhaustively compared and tested. Since our main goal here is to analyze results given by an unbalanced configuration which can ensure a good trade-off between good classification ability and, especially, good representation of physics of the problem, we have selected the mixture sample marked in green. Corresponding metrics after having applied RF trained with model (in green in Table 4.1) to the adequate test set are shown in Figures 4.12 and 4.13
CHAPTER 4. SELECTION OF THE MODEL TO APPLY TO GAIA EDR3 53 Figure 4.12: Confusion matrix used to assess the performance of the RF algorithm trained with unbalanced sample marked in green in Table 4.1 These metrics are coherent with what we have seen so far. Having increased the ratio of thin stars ameliorates the number of thin stars classified correctly but, on the other hand, penalizes the other two sub-populations. Figure 4.13: PR showing performance of the RF trained with unbalanced sample marked in green in Table 4.1
54 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm 4.2.3.1. RPM diagrams for the two best sample Finally, we compare the RPM diagrams for the two best samples, that are, the balanced sample presented in 4.2.2. and the 60:30:10 mixed sample presented in 4.2.3. from Model 2. As previously stated, the objective of selecting these two samples is to utilize RF algorithms trained with them to classify the Gaia EDR3 data. In Figure 4.14 we show the RPM diagrams after having classified the corresponding test sets with RF algorithms. Top panel shows classification performed by balanced model presented in 4.2.2. and bottom panel shows classification done by unbalanced model seen in 4.2.3. Figure 4.14: RPM diagrams obtained after classifying the corresponding test sets with RF algorithms having been trained with the balanced sample of Model 2 (top panel) and with the mixed 60:30:10 sample of Model 2 (bottom panel).
CHAPTER 4. SELECTION OF THE MODEL TO APPLY TO GAIA EDR3 55 Even though we observe a substantial difference with respect to the total number of WDs in the samples, the distribution of stars for each of them follows the exact same pattern (since they have been generated out of the same model, i.e., Model 2). Then, it is reasonable to expect that when applying the RF to Gaia EDR3 with the two trained samples, they only will differ from one another according to the difference in proportions of the samples.
CHAPTER 5. CLASSIFICATION OF THE NEW GAIA EDR3 Now that we have got all necessary tools, we are going to classify the last release of the most extent catalog available, Gaia EDR3 [7]. As we have mentioned earlier (see Section 1.1.), the full catalogue contains roughly 1.5 billion sources of stars of our Galaxy, but not all these stars match with the sort of stars that we want to classify. Firstly, we have narrowed down the distance criteria to 100 pc with respect to our Sun, since WDs are intrinsically faint objects and, consequently, they are only observable in the solar neighborhood. Secondly, we have selected stars on the Hertzsprung-Russell diagram with typical values for luminosity of WDs (see Figure 1.4). 5.1. 100 pc Gaia EDR3 sample In Figure 5.1, we plot the RPM diagram for the observed sample of WDs extracted from Gaia EDR3 to which we are going to apply our RFs. A total of 12263 objects have been selected as WD candidates and will be classified by our RFs presented in Chapter 4. Figure 5.1: RPM diagram of the 12263 WD candidates extracted from Gaia EDR3 at a maximum distance of 100 pc with respect to the Sun. In Figure 5.2, we represent main features of the observed sample to make sure that they match with the ones of the synthetic stars generated by our simulator. If we compare this set of plots with the ones issued from the models we have used to train our RF algorithms in 4.2.2. and 4.2.3., we will see that no significant differences can be spotted. This leads us to think that applying our RF algorithm to the Gaia observed sample is completely coherent and is likely to produce acceptable results. 57
58 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 5.2: Representation of α,δ,ϖ,µ∗ α,µδ, G, GBP and GRP features in pairs for all WDs contained in the 100 pc Gaia EDR3 sample. 5.1.1. Applying RF trained with balanced file from Model 2 Given that it was the RF trained with the balanced model from Model 2 (Section 4.2.2.) the one which provided better overall results of all different RF tested, it will be the first to be applied to the observed Gaia EDR3 sample. In Figure 5.3 we have displayed a RPM diagram of the resulting classification of the observed sample. Thin Thick Halo Percentage (%) 84.1 14.3 1.6 Table 5.1: Percentages of each population issued from classifying the observed 100 pc Gaia EDR3 sample performed by our RF trained with the balanced sample of Model 2.. In general terms, classification seen in Figure 5.3 is in accordance with what a priori was expected. The vast majority of stars have been classified as thin WDs (84.1%), since this is the predominant sub-population as we have explained in Chapter 1. Having increased range of tangential velocities thick stars can get to in the simulator (see Figure 4.6) has made some of the WDs classified as thick stars appear at higher values of H(reduced proper motion), even surpassing the classical limit of 200 km/s. This goes in line with modifications introduced into the simulator (see again Figure 4.6) and was, once again, awaited. As for the halo stars, we detect that now they may present lower values for Hand this might come directly from having trained the RF with the same number of halo stars as for the other sub-populations. Furthermore, we find halo WDs for all possible values of
CHAPTER 5. CLASSIFICATION OF THE NEW GAIA EDR3 59 Figure 5.3: RPM diagram showing the classification of the observed 100 pc Gaia EDR3 sample performed by our RF trained with the balanced sample of Model 2. color index, which indicates that, after changes performed in the simulator, halo stars can now be found with younger ages (the redder a star, which corresponds to lower GBP-GRP, the older it is). Figure 5.4 presents the Toomre diagram of the classified observed Gaia sample by means of RF trained with balanced model presented in 4.2.2. The Toomre diagram of Figure 5.4 is also showing very coherent results with respect to what we could have expected. Comparing this figure with Figure 3.11, many halo stars are now found inside semicircle marking less than 200 km/s for the module of the Galactic velocity. This goes against the classical approach but is in line with last studies on the matter which led to the modifications introduced into the simulator and is in accordance with results presented in [5]. On the other hand, as we get closer to 0 km/s we should not ideally run into any halo WDs, but we can see that there are roughly nine stars with less than 100 km/s and others with velocity values a little bit higher than this. This may indicate that the RF algorithm is overestimating the overall number of halo stars contained in DR3 due to having been trained with a balanced dataset (as many halo stars as thick or thin stars). Finally, in Figure 5.5, we introduce the Hertzsprung-Russell diagram, Gversus GBP −GRP of the classified observed Gaia sample by means of our RF algorithm.
66 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm Figure 5.11: Toomre diagram for the stars contained in the 500 pc Gaia EDR3 sample classified among the three different sub-populations by the RF algorithm trained with the unbalanced sample. Figure 5.11 presents the corresponding Toomre diagram. No relevant difference are seen in Figure 5.11 with respect to other Toomre diagrams already shown, except that we now see that the percentage of halo candidates with low Galactic speed module has increased. It is beyond the scope of the present project, but it is recommended a more exhaustive analysis that will include the classification of the 500 pc Gaia EDR3 sample by a RF algorithm trained with a balanced dataset. Finally, in Figure 5.12, we introduce the Hertzsprung-Russell diagram of the classified observed Gaia sample by means of our RF algorithm trained with the unbalanced model seen in Table 5.3. The beautiful Hertzsprung-Russell diagram reveals certain regions of interest where stars of the same type are gathered, and which contains much more information than what it can be seen with the naked eye.
CHAPTER 5. CLASSIFICATION OF THE NEW GAIA EDR3 67 Figure 5.12: Hertzsprung-Russell diagram for all WDs contained in the 500 pc Gaia DR3 sample classified by our RF trained with an unbalanced sample.
68 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm
CONCLUSIONS In this thesis we have prepared a Random Forest algorithm to classify, among the different populations of our Galaxy (thin, thick and halo), the WDs contained in the latest data release from the Gaia project, known as EDR3. First, we have studied in detail the RF algorithm and how to improve its performance in order to carry out a fully optimized classification (see Section 2). Once the intricacies of the algorithm have been understood, we have proceeded to recover the training files that were used in [6], as well as the WD candidates that were isolated from Gaia DR2, managing to reproduce the results of WDs already classified among the different populations seen in [5]. Next, we have proceeded to modify the configuration of the simulator used to generate the synthetic sample that allow us to train the algorithm. These modifications have consisted of changing the tangential velocity profiles for each of the different populations as we can see in 4.1. and in 4.2. At the same time, we have checked that the algorithm exhibits better performance when trained with samples that contain the same number of elements for each subcategory (balanced dataset). Finally, we have selected the trained algorithm that shows the best performance (see Section 4.2.2.) to classify the WDs contained in EDR3 and, since we do not want to overestimate the number of stars in any of the subcategories, we have developed a second trained algorithm by using a sample with a distribution of stars that more closely matches the one known for our Galaxy. Once the process of study, development and selection of the RF algorithms to be applied has been completed, all the WD candidates have been extracted and filtered from [10] by means of considering the distinctive characteristics of this type of stars (see Section 5.1.). Initially, only the stars contained within a maximum distance of 100 pc from the sun have been retained. Comparing Tables 5.1 and 5.2, we see that there are significant differences between the classifications made by both RF algorithms. This is due to the way we have trained each of them, with balanced and unbalanced models respectively. In Figure 5.5, we have presented the Hertzsprung-Russell diagram of the classified observed Gaia sample by means of a RF trained with the balanced sample presented in Section 4.2.2.. Compared to the equivalent diagram of Gaia DR2, we see that almost all the stars found by the algorithm presented in Section 3.2.1. (WDs marked in yellow), have been found by our algorithm and, in addition, there are more than a hundred new candidates to halo WDs that deserve a further study and will probably lead to a publication. In the absence of confirmation from the detailed study that will be carried out on each and every one of the new candidates, we think that the modifications applied to the simulator have allowed us, not only to detect new stars in the halo whose speeds relative to us clearly indicate that they may belong to this subcategory, but also other very long-lived stars whose age makes them clear candidates to be in the Galactic halo (this would be a novelty with respect to the work carried out in [6]). Since the results obtained after classifying WDs in Gaia EDR3 up to 100 pc seen in Chapter 5.1. show sufficient coherence with those presented in [5], we have decided to extend 69
70 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm the distance for which we want to classify WDs up to 500 pc from our Sun. To this end, we have prepared a new optimized algorithm following the same procedure as in Section 4.2.3. but modifying the simulator configuration to take into account the differences in the stars of the three populations found at a greater distance. Therefore, we have presented the Hertzsprung-Russell diagram of the classified observed Gaia sample by means of a RF trained with the unbalanced sample. In Figure 5.12 the corresponding classification, where we can see than nearly two hundred of additional candidates to halo stars have been found and, also, that the more stars try to classify, the closer the final classification is to the real proportions found in our Galaxy. All candidate stars to halo WDs will be thoroughly analyzed outside the scope of this project to verify that they may indeed belong to that sub-population. The results obtained will be included in a publication in a referenced journal of astrophysics.
APPENDIX A. RELATIONSHIP BETWEEN TEMPERATURE AND COLOR Stars are not perfect black bodies. However, the spectrum of a star is close enough to the standard black body spectrum. Consequently we can use Wien’s Law: λmax =(0.29(cm ∗K)) T That is, if you observe the spectrum of a star and can determine the wavelength where the emission peaks λmax, you can calculate that star’s temperature. Here is a plot which illustrates the emission curve of any black body depending on its temperature: Figure A.1: Two-dimensional plot of the spectrum of a black body with different temperatures. We can see on figure A.1 that the color of a star provides a fairly accurate measurement of its surface temperature. For example, a 4500 K black body peaks in the red part of the spectrum, a 6000 K black body in the green part of the spectrum, and a 7500 K black body in the blue part of the spectrum. Measuring a star’s spectrum is not always easy, but astronomers can often measure a star’s color reasonably well. To do this, they use a blue filter (GBP) on the telescope and observe the star. They then re-observe the same star with a visual (GRP), or red, filter. The GBP filter measures the star’s brightness in blue light, and the GRP filter measures the star’s brightness in red light. The difference between these two, GBP-GRP, is the star’s color. 71
APPENDIX B. HALO WDS CANDIDATES FOUND IN THE 100 PC GAIA EDR3 SAMPLE α(deg) δ(deg) ϖ(as) µ∗ α (as/yr) µδ(as/yr) G (mag) GBP (mag) GRP (mag) ID 188,2774 -47,9692 14,4089 -454,933 -109,381 15,1909 19,83139 18,70817 Gaia EDR3 6128698119835593728 280,3079 -21,8497 21,51097 39,20085 -647,817 15,12334 19,00633 17,67805 Gaia EDR3 4079375988065756928 300,3463 -63,3747 13,59702 -171,427 -639,508 15,58437 20,34385 18,99697 Gaia EDR3 6430390886288472832 101,3243 -21,7209 10,27197 60,41229 -277,356 12,26569 17,33708 16,98738 Gaia EDR3 2926790487316353664 83,46693 -32,5766 16,33937 128,4001 -495,844 15,18298 19,70881 18,41527 Gaia EDR3 2901708286325947136 87,40268 23,49401 19,29865 1027,264 -918,229 14,50516 18,7022 17,3765 Gaia EDR3 3427482725113315200 163,7949 34,19289 11,24479 -411,775 -76,2975 14,70698 19,877 18,80829 Gaia EDR3 738203138997224832 2,395904 31,14404 18,70249 -359,092 -395,596 13,06801 16,81096 16,51628 Gaia EDR3 2861792754354276352 82,66824 59,47235 17,54259 475,3473 -197,31 14,93521 19,25997 18,07476 Gaia EDR3 282639432539759872 76,11629 57,36887 10,33688 -20,4583 -289,726 12,75376 17,81422 17,45064 Gaia EDR3 280580558366891648 111,6852 -79,3862 16,1134 -116,126 361,916 13,6368 17,72929 17,3535 Gaia EDR3 5208283952533531776 339,7776 -30,485 18,95424 73,15776 -480,577 15,65741 20,14089 18,44536 Gaia EDR3 6608056396078408576 256,239 -2,95346 20,29291 125,2408 -491,011 12,59856 16,17011 15,88218 Gaia EDR3 4366155146278913408 296,6248 9,617591 23,13351 70,42775 -565,328 13,88403 17,34677 16,61735 Gaia EDR3 4301829970867752704 179,9238 -46,5095 16,27912 -621,309 97,77881 15,20794 19,72279 18,51447 Gaia EDR3 5377861317357370240 179,9868 -46,4842 15,94287 -620,769 97,96483 13,44927 17,59017 17,16325 Gaia EDR3 5377861592235273856 357,4487 -1,41511 15,90954 471,4875 -324,836 15,04674 19,63933 18,33663 Gaia EDR3 2641576685735609472 205,4996 -34,2503 48,11495 -2301,29 1146,887 14,64977 16,67211 15,6357 Gaia EDR3 6165095738576250624 44,1751 -7,01031 16,68485 373,3635 -204,936 14,28133 18,72802 17,48023 Gaia EDR3 5180517706222368768 45,43411 -0,74635 14,39225 107,1487 -548,953 15,2639 20,22993 18,68969 Gaia EDR3 5188044687948351872 107,6622 -64,7775 11,95053 -23,0496 263,0603 14,12326 19,08904 18,30204 Gaia EDR3 5282549228479635200 79,7101 -11,917 12,66974 148,2742 -484,557 15,62957 20,92205 19,32002 Gaia EDR3 2989049057626796416 141,3801 0,303994 15,20282 -69,6216 -574,579 15,12979 19,76597 18,50117 Gaia EDR3 3840846114438361984 78,21233 47,59391 17,60294 -47,4153 -444,349 15,7235 20,2459 18,67406 Gaia EDR3 212906961997015552 156,3488 0,71311 19,64017 -67,234 -1111,08 14,39608 18,31545 17,35826 Gaia EDR3 3831362929727997440 123,7005 15,09841 14,05778 73,21178 -415,091 15,03342 19,88374 18,62438 Gaia EDR3 655355968638552576 323,3438 -6,18825 14,03079 -149,738 -294,917 14,05753 18,62034 17,88875 Gaia EDR3 2670770991487735424 8,620365 -68,8277 14,96175 -6,91849 -506,406 14,812 19,47721 18,29143 Gaia EDR3 4703491116182416896 116,4086 -33,9235 64,8179 -276,113 1680,502 15,31445 16,88825 15,50343 Gaia EDR3 5588614164276695424 335,2418 -33,7856 20,90527 -92,3488 -563,388 14,84584 18,75858 17,58768 Gaia EDR3 6599733642813014784 31,30267 -5,29667 31,07563 960,1152 392,3546 15,57008 18,84938 17,32773 Gaia EDR3 2490975272405858048 341,0021 77,20175 16,80667 192,7685 293,7293 13,96843 18,25455 17,26076 Gaia EDR3 2282213645340901248 159,2288 7,536346 17,90683 -681,02 23,24312 15,22833 19,69136 18,20088 Gaia EDR3 3862858165427681536 163,8142 8,280146 14,39527 -313,63 -355,192 15,36458 20,46078 18,81203 Gaia EDR3 3865951435233552896 57,79123 -56,4566 14,85366 272,4911 -1043,11 15,8595 20,68799 19,06126 Gaia EDR3 4731177819694416000 126,6535 17,27318 14,27163 -84,1956 -356,015 14,78651 19,5207 18,36299 Gaia EDR3 662043992928302080 146,53 -6,19318 11,76426 -317,594 -204,253 13,03826 17,85898 17,38048 Gaia EDR3 3820953917572756480 305,5931 -58,3694 17,4232 281,1514 -435,628 12,46528 16,29694 16,19635 Gaia EDR3 6467585887187253760 4,668198 34,69841 10,46172 333,5288 -3,614 13,17623 18,24143 17,77015 Gaia EDR3 2876148734080688256 312,5281 77,67558 18,57837 242,3226 467,644 14,7776 18,92327 17,80769 Gaia EDR3 2290785163113859712 111,0261 4,522644 17,17436 82,17565 -417,242 14,16649 18,33632 17,47033 Gaia EDR3 3139699128636949248 229,5466 -38,052 16,221 -364,182 -343,693 15,61744 20,23977 18,81982 Gaia EDR3 6007140379167609984 234,7603 -61,4014 16,41116 -208,524 -545,97 15,16116 19,73428 18,40341 Gaia EDR3 5827557213731539328 319,3523 -41,9473 16,82786 516,3865 -302,708 15,09927 19,62093 18,29266 Gaia EDR3 6580458035746362496 319,3535 -41,9349 16,75039 516,3392 -304,05 15,30254 19,78093 18,45242 Gaia EDR3 6580551872194787968 51,1957 -14,137 13,35056 15,63256 -406,766 15,10857 20,18203 18,80192 Gaia EDR3 5113119911182752768 21,25862 34,2675 15,08815 406,1355 -53,0889 14,30012 18,84864 17,89152 Gaia EDR3 317317170285551104 291,5656 -46,4607 11,56184 -58,6977 -527,1 14,99897 20,52701 18,89049 Gaia EDR3 6663268308043562112 263,3766 -31,7335 10,88091 42,92034 -326,004 14,02196 19,00936 18,48333 Gaia EDR3 4055233289668168448 249,1223 -18,1907 16,64029 -390,365 -385,661 14,75513 19,15519 17,98637 Gaia EDR3 4131862957999471744 47,74766 66,56546 26,04374 684,7164 -435,767 14,96403 18,44308 17,19819 Gaia EDR3 492442090962517376 27,03765 -17,2089 13,03594 -106,511 -1106,19 13,11177 17,71968 17,23801 Gaia EDR3 5142197118950177280 51,72941 -10,7397 16,92981 280,2335 -366,414 14,41199 18,70362 17,70864 Gaia EDR3 5163016990097716352 125,5807 -12,8235 16,7473 865,0089 -881,345 15,59011 20,06848 18,79294 Gaia EDR3 5726927573083821440 174,3668 20,68566 13,28581 -376,265 -95,1696 12,93945 17,46979 17,06187 Gaia EDR3 3979070527235441792 280,6079 -78,0862 12,0845 126,4778 -311,896 10,81145 15,33482 15,56066 Gaia EDR3 6364918198670588928 177,8797 1,997871 11,70403 80,57758 -522,394 15,07919 20,36126 19,0501 Gaia EDR3 3892524535332945280 106,0368 71,19434 13,58753 -57,6356 -416,724 14,38808 19,18503 18,16692 Gaia EDR3 1109924900541714304 152,7636 -37,8826 17,82781 -55,2373 -514,704 15,47409 19,89943 18,47688 Gaia EDR3 5421162078117867264 335,6441 12,36269 25,99618 706,1698 189,8858 15,44085 19,11202 17,60729 Gaia EDR3 2730707260103011712 288,3695 -22,7473 12,51132 177,1848 -358,8 13,90681 18,6873 18,09441 Gaia EDR3 4080881391252112640 73
74 Machine Learning Classification of the Gaia 3rd data release based on a random forest algorithm 350,389 -76,5461 17,61593 509,7598 -66,6283 14,07054 18,14398 17,36085 Gaia EDR3 6377483104018023168 301,659 45,74764 15,20951 -506,645 -204,608 15,28969 19,95894 18,63628 Gaia EDR3 2082254987541672960 310,5722 36,50943 12,77265 -112,917 324,2852 15,80411 20,99467 19,53223 Gaia EDR3 1870629029611071104 29,25907 39,5499 15,10728 506,3322 -83,5672 15,58421 20,36698 18,95864 Gaia EDR3 343356212681211392 294,1304 -49,219 13,08754 335,3409 -426,271 15,42398 20,54738 19,04953 Gaia EDR3 6647162730439433984 230,9205 31,87958 19,93228 169,5245 -629,717 15,52504 19,63805 18,35794 Gaia EDR3 1277232907719022464 256,5768 -8,63128 14,6744 -260,045 -333,83 13,20591 17,37136 17,38767 Gaia EDR3 4336571785203401472 225,0092 36,00488 12,98605 -691,844 -605,295 14,65334 19,58631 18,47324 Gaia EDR3 1294793345366747776 138,4478 -75,884 15,25525 175,9455 480,9132 15,35066 20,19584 18,62963 Gaia EDR3 5215833268091571840 66,44239 -28,9396 15,41079 -92,6599 -357,56 13,5996 17,85875 17,34174 Gaia EDR3 4891261146421822464 88,7921 -4,17893 155,2373 535,2486 -2317,01 15,19165 14,72664 13,59298 Gaia EDR3 3022956969731332096 343,4836 -6,78483 117,1388 2485,799 -681,254 15,76473 16,08142 14,66117 Gaia EDR3 2611561706216413696 349,787 -6,22094 27,54935 -605,808 -1589,95 15,04522 18,43288 17,13112 Gaia EDR3 2631967439437024384 327,365 -9,0085 21,63725 734,1508 -345,238 16,18774 20,26287 18,67745 Gaia EDR3 2618224196924872576 39,40868 -84,756 16,30929 763,097 -55,1075 15,64258 20,24651 18,75045 Gaia EDR3 4616895783694932736 213,2408 -40,0237 15,42303 -390,534 -178,432 14,21232 18,60333 17,76845 Gaia EDR3 6116237221408728832 12,29674 5,376557 231,78 1231,399 -2711,88 14,12454 12,53123 11,93364 Gaia EDR3 2552928187080872832 11,34139 -33,498 30,45361 1826,374 -1485,01 16,02593 19,31098 17,80571 Gaia EDR3 5006232026455470848 16,57111 11,69675 17,08106 476,0488 -388,515 15,7431 20,38124 18,86289 Gaia EDR3 2583365245917474816 204,1161 3,674479 119,7566 -3735,84 -1113,58 14,76622 14,87014 13,72176 Gaia EDR3 3713594960831605760 204,3522 3,964741 13,36398 -431,044 -20,9195 15,32569 20,26784 18,98362 Gaia EDR3 3714381180364354688 22,46154 -22,9542 12,30316 393,1813 -199,876 15,59516 20,99638 19,37841 Gaia EDR3 5042228731477861888 165,5724 41,21475 28,68527 -102,234 -1754,84 16,03404 19,51582 17,87306 Gaia EDR3 777395029106166272 42,05729 -30,0243 12,74321 444,8379 323,6925 13,86918 18,64255 17,89088 Gaia EDR3 5065611697758431360 221,9591 44,83911 12,83362 -839,373 229,4554 15,56952 20,75248 19,21183 Gaia EDR3 1490688148061362304 235,2637 5,950054 18,40125 -273,58 -380,463 15,53418 19,84909 18,45718 Gaia EDR3 4429655653631543552 198,2211 -47,4691 59,58271 -2165,62 -60,8226 15,56604 17,41785 15,87015 Gaia EDR3 6085402414245451520 32,8428 39,92042 58,23059 1028,678 -500,415 13,23108 14,58322 14,09747 Gaia EDR3 333010327952701696 295,8071 -5,17712 10,52195 -6,88109 -315,983 12,34522 17,30509 17,1203 Gaia EDR3 4209477007070084736 209,4679 35,19075 13,84264 13,1543 -389,217 15,4956 20,4907 19,05476 Gaia EDR3 1482922018261625728 195,8203 26,05423 26,34693 -845,911 107,0527 15,48733 19,06114 17,64019 Gaia EDR3 1459546263999675264 204,5243 -68,0767 25,13703 -562,303 -86,3471 12,57659 15,66795 15,40079 Gaia EDR3 5850533227210203520 313,2338 7,158068 16,14154 -172,772 -895,711 15,98601 21,16655 19,1031 Gaia EDR3 1737588947276271744 177,5264 24,06457 33,19854 -638,13 -693,43 16,97061 20,42541 18,47232 Gaia EDR3 4004185576130620288 190,5482 29,96434 18,5161 -495,686 -346,047 14,99966 19,17573 18,05362 Gaia EDR3 4011194202932877696 117,5617 7,188999 54,96747 211,5197 -1782,62 15,29255 17,23377 15,83342 Gaia EDR3 3144837318276010624 56,69637 24,92893 25,29408 520,1774 -1157,43 15,58844 19,32029 17,7759 Gaia EDR3 66837563803594880 188,9674 41,16056 16,55132 -510,975 189,228 15,699 20,49213 18,76675 Gaia EDR3 1533950318546008448 196,6647 43,93326 12,19306 -298,757 -167,2 13,61213 18,41253 17,75968 Gaia EDR3 1529609897612606592 193,7781 46,92141 26,83861 -1092,16 -113,127 15,53957 18,9125 17,68869 Gaia EDR3 1531097433767946240 7,861271 -44,6368 15,02135 346,8864 23,42206 12,71869 16,89695 16,72542 Gaia EDR3 4980291008103325312 225,758 55,16188 13,45576 -901,279 71,57926 15,71328 20,78112 19,32415 Gaia EDR3 1612339420228653440 192,5301 54,77948 42,19756 -277,946 -1253,28 15,4543 18,08707 16,50347 Gaia EDR3 1570514066627694336 71,96931 48,27485 17,76796 458,0318 -271,144 15,73597 20,02956 18,82409 Gaia EDR3 255924254922549504 40,5581 16,92123 23,69881 85,00282 -706,935 13,80309 17,15626 16,55047 Gaia EDR3 81957772828837888 58,40477 -50,0986 17,72959 264,7102 452,5995 15,53652 19,86704 18,648 Gaia EDR3 4829673651857102848 195,3521 -27,3721 16,12002 -476,92 -205,694 15,41093 20,06586 18,56886 Gaia EDR3 6187146135032473344 68,15405 -39,0341 29,92709 699,8665 721,0487 14,84943 17,97506 16,77669 Gaia EDR3 4864752883148064512 56,38727 -36,187 12,89247 154,3146 -582,837 15,34687 20,39222 19,01872 Gaia EDR3 4857106909354185344 55,03878 -33,0181 18,33425 492,5083 -335,859 15,74078 20,09066 18,81406 Gaia EDR3 4862884499360563968 336,4572 63,96358 26,32584 1089,67 1344,162 14,58019 17,94008 16,88095 Gaia EDR3 2205493129867600256 13,98259 85,75095 15,35289 381,1243 199,2498 15,46384 20,40272 18,72624 Gaia EDR3 574070177802252288 13,98836 85,75359 15,21622 382,1523 197,2129 15,53585 20,36429 18,80624 Gaia EDR3 574070280881467264 337,6469 -75,2649 66,50947 409,5135 -1827,88 15,55748 17,16051 15,63285 Gaia EDR3 6357629089412187648 63,83079 -7,67295 199,6911 -2236,17 -3338,96 11,04403 9,481124 9,672128 Gaia EDR3 3195919254111315712 183,2538 -71,7598 13,59397 -371,082 47,02633 13,71438 18,53679 17,39339 Gaia EDR3 5842715768222744960 127,9635 -16,7272 27,73965 565,6979 -500,855 15,5521 18,99217 17,49677 Gaia EDR3 5709868512742196608 229,8744 21,60302 11,96491 -315,528 249,6934 15,23181 20,03307 19,5951 Gaia EDR3 1214994502274335360 229,4389 -66,7504 12,01644 -402,61 -17,2693 15,80948 21,31388 19,78975 Gaia EDR3 5824436284328653312 143,3972 63,35164 13,10723 -116,253 -420,172 15,37687 20,33702 19,02447 Gaia EDR3 1064196589898916096 147,7808 64,89997 12,32723 406,5043 -35,3509 16,13789 20,82045 20,44803 Gaia EDR3 1064727654013838336 165,3118 63,56264 12,09278 -140,231 -577,395 15,29308 20,36398 19,13494 Gaia EDR3 1055533400343235456 145,3741 65,1921 21,74921 869,3214 -793,744 15,12553 19,07173 17,7054 Gaia EDR3 1064978578888570496 163,487 -3,13292 15,5817 -296,523 -565,943 15,44726 20,14385 18,827 Gaia EDR3 3801499128765222400 176,4566 -64,8431 215,6753 2661,64 -344,933 13,09211 11,51577 11,23002 Gaia EDR3 5332606522595645952 317,8291 54,13918 15,50799 -383,894 55,90464 15,33773 20,0092 18,66122 Gaia EDR3 2176535223402463872 159,2347 71,18092 56,72524 -1857,34 -463,508 15,38085 17,15443 15,9272 Gaia EDR3 1076941716370493696 249,8616 80,64774 16,46361 -160,387 422,9086 14,50984 18,74584 17,96753 Gaia EDR3 1710386067532886272 267,4082 82,78864 61,17533 -1436,91 3314,437 13,14979 14,39274 13,905 Gaia EDR3 1711005951573009792
APPENDIX B. HALO WDS CANDIDATES FOUND IN THE 100 PC GAIA EDR3 SAMPLE75 142,6095 50,56112 13,40169 -224,808 -353,647 15,06707 20,08989 18,72281 Gaia EDR3 1018659143306715392 166,8636 -12,5422 13,75111 -402,129 -10,8145 14,09343 18,71768 17,93275 Gaia EDR3 3565820559403642240 161,4039 -19,1152 53,19044 -1867,28 -604,067 14,07001 15,719 14,91824 Gaia EDR3 3554395813252626048 55,55551 -3,74484 13,69682 399,2579 -243,512 15,4908 20,43278 19,18482 Gaia EDR3 3249657094642979840 65,59486 26,69983 15,91905 409,2591 -79,022 14,62713 19,0033 18,07926 Gaia EDR3 152091973137497216 63,14268 23,90301 12,73104 208,1499 -399,85 14,05359 18,72893 18,18338 Gaia EDR3 149824883240282496 310,6491 -52,3057 12,0368 400,1254 -829,974 14,71411 19,79967 18,71209 Gaia EDR3 6471523921227261056 138,7594 -62,6231 11,87786 86,9123 357,7402 14,97631 20,17346 18,89291 Gaia EDR3 5298579455182262400 228,8784 19,18908 11,21655 113,823 -944,729 14,99658 20,32286 18,9778 Gaia EDR3 1212348119518459392 356,5105 -47,8527 22,77839 -265,309 -461,985 14,31567 17,90138 16,994 Gaia EDR3 6525160400529646080 116,2899 26,44859 25,5373 530,436 -719,861 15,74869 19,41554 17,87016 Gaia EDR3 874900643675606912 107,3535 -32,0831 20,25909 -193,024 504,4494 12,13504 15,66178 15,51273 Gaia EDR3 5604216131195297664 270,0573 9,538144 13,45756 -367,995 -142,765 15,51905 20,45719 19,0845 Gaia EDR3 4476576831311990144 256,9709 -63,3211 18,61856 -327,525 -506,483 15,10019 19,34305 18,05914 Gaia EDR3 5817295536128445568 3,35785 54,63535 30,9766 776,838 600,1679 15,45192 18,63682 17,18859 Gaia EDR3 420531621029108608 190,0971 -23,299 23,871 -760,635 -796,488 13,23622 16,69062 15,81533 Gaia EDR3 3501922067493606272 338,7262 -40,7562 11,86486 277,8915 -245,646 12,89815 17,65001 17,29108 Gaia EDR3 6545401932855791744 31,56482 18,60712 27,45076 785,6531 97,30502 15,34329 18,81971 17,38956 Gaia EDR3 92597914738232448 31,45605 20,9511 11,71191 -213,071 -250,368 12,72639 17,28905 17,58618 Gaia EDR3 94276941624384000 23,24019 19,69599 11,30511 440,7314 69,45356 14,74153 20,05539 18,84809 Gaia EDR3 96095735719745280 52,21493 -61,9927 13,67918 377,416 159,4807 15,77 20,6311 19,4457 Gaia EDR3 4674547640808092800 112,9792 -6,64785 12,61927 161,7904 -322,342 13,91245 18,76361 17,86977 Gaia EDR3 3055174889519233408 162,4892 -74,0078 23,74399 -1023,72 601,9678 16,05884 19,87731 18,38226 Gaia EDR3 5228861484450843648 199,1806 -15,6025 17,98286 -219,533 -668,743 11,10796 14,78904 14,95715 Gaia EDR3 3607725941130742528 255,5835 71,98124 11,3713 -290,035 118,4716 15,10043 20,39314 19,06568 Gaia EDR3 1651999178303252864 194,1812 -62,0356 13,23665 -1124,04 24,14091 15,18853 20,22164 18,89952 Gaia EDR3 5863122429179888000 114,1838 -4,59708 15,86711 -235,088 -442,567 15,74742 20,26054 18,91366 Gaia EDR3 3057061995066739840 138,8474 -21,8233 12,00492 267,0121 -306,302 13,91176 18,83954 18,03685 Gaia EDR3 5676011388625525120 175,947 14,80016 13,18926 -216,603 -292,855 13,96426 18,56803 18,01651 Gaia EDR3 3924198849694079488 184,3283 8,511038 12,66336 -337,176 -306,936 15,59517 20,85284 19,29113 Gaia EDR3 3905186270720273152 185,2014 9,235241 26,68184 -346,176 -388,232 16,73336 20,03113 19,1596 Gaia EDR3 3905335598144227200 176,8753 -74,9604 50,08175 -1067,84 1354,603 15,65323 17,90876 16,33751 Gaia EDR3 5224999346778496128 13,81812 38,79669 12,60409 -410,625 -233,249 13,49289 18,36195 17,47123 Gaia EDR3 367799116372410752 132,0347 34,19769 13,2 -293,655 -576,697 15,55736 20,72783 19,19755 Gaia EDR3 716399690274827392 22,74217 -73,8304 17,58789 412,9708 -85,3108 12,84279 16,76397 16,37413 Gaia EDR3 4686195252815125888 267,1266 -72,2895 12,1362 -239,726 -209,492 10,95053 15,47544 15,67591 Gaia EDR3 5803689358905636736 267,0161 70,88157 160,9952 -1266,39 1108,801 14,81227 14,17906 13,17623 Gaia EDR3 1638979384378696704 69,26675 -12,5715 11,97951 290,1115 -388,017 14,89536 19,96274 18,66378 Gaia EDR3 3177914510686683776 295,0015 83,81424 27,98514 -834,605 -406,284 15,50911 18,84938 17,62067 Gaia EDR3 2301882675705225472 82,46206 52,6624 25,56152 364,1934 -548,307 12,70101 15,5795 15,85399 Gaia EDR3 263082591016645504 321,9256 15,76055 13,16018 -161,945 -505,006 14,25022 19,04548 18,2528 Gaia EDR3 1783614400935169408 358,5785 -36,5683 16,3267 26,55135 -672,162 11,28836 15,18795 15,32957 Gaia EDR3 2310942857676734848 306,1781 -0,54631 15,9399 61,46468 -407,552 15,00738 19,61746 18,31052 Gaia EDR3 4229400153462745472 260,7404 57,88246 16,21167 -37,6137 394,5573 14,81207 19,13081 18,26031 Gaia EDR3 1433166540130924544 248,5807 57,17446 67,35385 -1110,95 1199,385 13,99055 15,10767 14,42267 Gaia EDR3 1431176943768691328 118,3012 -67,7987 122,413 1467,123 -1489,72 14,21665 14,12093 13,26163 Gaia EDR3 5273943488410008832 58,22168 49,698 17,70144 394,8589 -284,048 13,45508 17,39103 16,92669 Gaia EDR3 250278709394343936 166,8765 48,92277 20,92795 -730,242 -76,7909 15,17478 19,15271 17,84465 Gaia EDR3 831946229073235200 161,4888 59,07442 17,33225 -1019,31 -1462,49 13,83397 17,73213 17,44493 Gaia EDR3 855361055035055104 298,9463 -20,5193 17,42943 95,55669 -386,622 11,31524 15,07748 15,20524 Gaia EDR3 6865430941202657408 131,3579 -27,0177 19,66073 -512,676 -215,151 15,54887 19,73702 18,36354 Gaia EDR3 5646089927728820736 170,938 -51,8452 13,47724 -444,558 191,9496 15,63519 20,73648 19,26274 Gaia EDR3 5348874243767794304 107,9491 46,12624 13,71631 -305,611 -451,39 14,80539 19,74355 18,50909 Gaia EDR3 977441274176008192 80,21718 -25,4367 16,26881 -1,98318 -460,814 14,3048 18,61069 17,73894 Gaia EDR3 2957768982608383488 304,0119 -36,3243 12,11506 126,8349 -378,733 15,59238 20,98454 19,32899 Gaia EDR3 6694526083591689216 34,81038 8,869927 12,71555 453,0175 -27,3029 14,60918 19,7635 18,31819 Gaia EDR3 23720971231885696 159,1833 -82,4326 16,05378 -486,4 116,0258 15,61146 20,41315 18,73151 Gaia EDR3 5192296911732427904 102,5704 56,49868 14,17531 40,23229 -391,729 14,5632 19,17105 18,21704 Gaia EDR3 1000299395067039488 161,2365 -47,5193 13,23143 -365,289 -213,225 15,00673 19,94675 18,74169 Gaia EDR3 5363078628333820288 222,7021 7,557417 13,2571 -813,415 -447,915 11,12229 15,4797 15,62006 Gaia EDR3 1161215296909017728 318,628 19,8084 20,64893 560,6168 -41,8922 15,68922 19,83863 18,236 Gaia EDR3 1788893259339772032 276,2423 12,21655 25,02071 -280,109 -1078,43 15,52035 19,2603 17,71762 Gaia EDR3 4484289866726156160 86,24521 26,04386 27,76884 999,7639 -1389,76 14,09412 17,39611 16,20359 Gaia EDR3 3429296884940000000 Table B.1: Main features of all stars identified in the 100 pc Gaia EDR3 sample as likely halo stars.