machine learning in physics
play

Machine Learning in Physics Romain Dupuis CmPA May 2, 2019 Romain - PowerPoint PPT Presentation

Machine Learning in Physics Romain Dupuis CmPA May 2, 2019 Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 1 / 55 Why a talk about Machine Learning at CmPA ? Interest in branches of physics - High Energy Physics - Astronomy -


  1. Machine Learning in Physics Romain Dupuis CmPA May 2, 2019 Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 1 / 55

  2. Why a talk about Machine Learning at CmPA ? Interest in branches of physics - High Energy Physics - Astronomy - Computational fluid dynamics Kaggle competition Great potential for plasma physics - Wide amount of data from spacecraft - Scientific discovery from data - Support for numerical simulations A small group at CmPA Two objectives : introduction to ML and link to problems from physics Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 2 / 55

  3. Content Some basics for Machine Learning 1 Learning from the existing : supervised learning 2 Extracting knowledge from data : clustering and dimension reduction 3 Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 3 / 55

  4. Important notions in Machine Learning

  5. Some notions of machine learning Machine Learning Hype Many applications - Natural Language - Computer vision - Fraud/anomaly detection - Deep learning success Object detection, Redmon et al., 2016 Increase in data size and computational resources - Massive use of GPU - Distributed computing General development of Machine Learning (ML) frameworks - Facebook, Google, etc. - Various API : Python, C, Java, etc. Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 5 / 55

  6. Some notions of machine learning Some vocabulary Artificial Intelligence Machine Learning Deep Learning Learning without being Computer systems Cascade of multiple neural layers explicitly programmed performing ”intelligent” tasks Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 6 / 55

  7. Important notions in Machine Learning Different kinds of learning Supervised learning - Regression - Classification Credit S. Carrazza Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 7 / 55

  8. Important notions in Machine Learning Different kinds of learning Unsupervised learning - Clustering - Dimension Reduction Credit S. Carrazza Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 8 / 55

  9. Important notions in Machine Learning Different kinds of learning Also reinforcement learning Credit Deepmind.com Semi-supervised learning Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 9 / 55

  10. Important notions in Machine Learning Different kinds of learning Also reinforcement learning Credit Deepmind.com Semi-supervised learning Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 10 / 55

  11. Important notions in Machine Learning A lot of algorithm Credit S. Carrazza Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 11 / 55

  12. Supervised learning : inferring from data

  13. Supervised learning Notations Learning/training sample { ( x 1 , y 1 ) , · · · , ( x N , y N ) } x ∈ R d and y ∈ Y Regression Y ⊂ R and classification Y ⊂ Z Vocabulary - Estimate : link between input x and output y - Predict : associating a value y to unobserved input x Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 13 / 55

  14. Supervised learning No free lunch theorem Assumption : The target function is chosen from a uniform distribution of all possible functions Theorem no algorithm performs better than random choice (Wolpert) No universally best method Scientific choice : Adaptation of the method to the data Credit towardsdatascience.com, Catherine Huang Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 14 / 55

  15. Supervised learning General learning process Credit Y. Abu-Mostafa Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 15 / 55

  16. Supervised learning General learning process Preparing the data - Cleaning, scaling, etc. - Partitioning the data : learning, validation, test Learning : determining the parameters � N - Very common form to minimize : J ( w ) = 1 i = 1 J i ( w ) n - Gradient descent, simulated annealing, BFGS, etc. Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 16 / 55

  17. Supervised learning Regression Linear regression y ( x ; w ) = w T x Very simple model : ˆ y ( x ; w ) = w T Φ( x ) Can add complexity with basis function : ˆ Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 17 / 55

  18. Supervised learning Regression Linear regression : error of the model How to quantify the error of the model ? Bad ( w 0 = 2 , w 1 = − 0 . 6 ) 3 Model Samples 2 Y 1 0 -1 0 1 2 3 X Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 18 / 55

  19. Supervised learning Regression Linear regression : error of the model How to quantify the error of the model ? OK ( w 0 = 0 , w 1 = 0 . 7 ) 3 Model Samples 2 Y 1 0 -1 0 1 2 3 X Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 18 / 55

  20. Supervised learning Regression Linear regression : error of the model How to quantify the error of the model ? OK ( w 0 = 0 , w 1 = 0 . 7 ) 3 Error Model Samples 2 Y 1 0 -1 0 1 2 3 X Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 18 / 55

  21. Supervised learning Regression Linear regression : error of the model How to quantify the error of the model ? OK ( w 0 = 0 , w 1 = 0 . 7 ) 3 Error Model Samples 2 Y 1 0 -1 0 1 2 3 X Cost function : Sum of the quadratic errors on the training set N J ( w ) = 1 � y ( x i ; w )] 2 [ y i − ˆ 2 N i = 1 Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 18 / 55

  22. Supervised learning Regression Linear regression : error of the model How to quantify the error of the model ? Good ( w 0 = − 1 . 0 , w 1 = 1 . 25 ) 3 Model Samples 2 1 Y 0 -1 0 1 2 3 X Cost function : Sum of the quadratic errors on the training set w ∗ = arg min J ( w ) w Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 18 / 55

  23. Supervised learning Regression Overfitting y ( x ) = w T Φ( x ) = w 0 + w T 1 x + ... + w m x m Polynomial of degree m : ˆ Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 19 / 55

  24. Supervised learning Regression Overfitting y ( x ) = w T Φ( x ) = w 0 + w T 1 x + ... + w m x m Polynomial of degree m : ˆ Degree 1 Cost function = 5.18e-01 5 Model Samples 4 3 Y 2 1 0 -1 0 1 2 3 X Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 19 / 55

  25. Supervised learning Regression Overfitting y ( x ) = w T Φ( x ) = w 0 + w T 1 x + ... + w m x m Polynomial of degree m : ˆ Degree 4 Cost function = 1.11e-02 5 Model Samples 4 3 Y 2 1 0 -1 0 1 2 3 X Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 19 / 55

  26. Supervised learning Regression Overfitting y ( x ) = w T Φ( x ) = w 0 + w T 1 x + ... + w m x m Polynomial of degree m : ˆ Degree 15 Cost function = 4.99e-03 5 Model Samples 4 3 Y 2 1 0 -1 0 1 2 3 X Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 19 / 55

  27. Supervised learning Regression Overfitting y ( x ) = w T Φ( x ) = w 0 + w T 1 x + ... + w m x m Polynomial of degree m : ˆ Degree 15 Cost function = 4.99e-03 5 Model Samples 4 3 Y 2 1 0 -1 0 1 2 3 X Overfitting : the model becomes too specialized Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 19 / 55

  28. Supervised learning Regression Model selection : regularization Limiting the complexity : N J ( w ) = 1 y ( x i ; w )] 2 + � [ y i − ˆ λ Ω( w ) 2 N i = 1 Lasso : Ω( w ) = � w � 1 and Ridge regression : Ω( w ) = � w � 2 Two different constrained optimizations. Mehta et al. Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 20 / 55

  29. Supervised learning Regression Regularization Each color corresponds to a different weight. Mehta et al. Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 21 / 55

  30. Supervised learning Regression Model complexity : biais-variance trade-off Generalization error = systematic error + sensitivity of prediction Credit M. Kagan Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 22 / 55

  31. Supervised learning Regression Ensemble learning Various weak learner (left) and average model (right). Credit Bishop. Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 23 / 55

  32. Supervised learning Regression Generalization in practice Split your data - Training : determining the parameters - Validation : check performance and tune hyperparameters - Test : final evaluation Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 24 / 55

  33. Supervised learning Regression Generalization in practice Credit M. Kagan Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 25 / 55

  34. Supervised learning Regression Other models Gaussian Process Support Vector Machine Neural Networks Random forest, boosting Support Vector Machine Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 26 / 55

  35. Supervised learning Regression Applications : material science Predicting properties (bulk, band gap, melting T) from fingerprints Ramprasad et al., Computational Materials, 2017 Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 27 / 55

  36. Supervised learning Regression Applications : Labquake prediction Machine learning predicting earthquake. Credit Rouet-Leduc. Romain Dupuis (CmPA) Machine Learning in Physics May 2, 2019 28 / 55

Recommend


More recommend