Numeric Computation and Statistical Data Analysis on the Java Platform

Numericalcomputation, knowledge discovery and statistical data analysis integrated withpowerful 2D and 3D graphics for visualization are the key topics of this book. ThePython code examples powered by the Java platform can easily be transformed toother programming languages, such as Java, Groovy, Ru...

Full description

Saved in:
Bibliographic Details
Main Author Chekanov, Sergei V
Format eBook
LanguageEnglish
Published Cham Springer Nature 2016
Springer International Publishing AG
Springer International Publishing
Springer
Edition1
SeriesAdvanced Information and Knowledge Processing
Subjects
Online AccessGet full text
ISBN3319285319
9783319285313
3319285297
9783319285290
ISSN1610-3947
2197-8441
DOI10.1007/978-3-319-28531-3

Cover

Table of Contents:
  • 4.1.1 P0D Data Container -- 4.1.2 P0D Transformations -- 4.1.3 Statistical Summary -- 4.1.4 Displaying P0D Data -- 4.1.5 File Input and Output -- 4.2 Arrays for Two Dimensions -- 4.2.1 Data with Errors -- 4.2.2 Viewing P1D Data -- 4.2.3 Plotting P1D Data -- 4.2.4 Contour Plots -- 4.2.5 Manipulations with P1D Data -- 4.2.6 Advanced P1D Operations -- 4.2.7 Weighted Average and Systematical Uncertainties -- 4.2.8 File Input and Output -- 4.2.9 Example I: Henon Attractor -- 4.2.10 Example II. Weighted Average -- 4.3 Other Arrays -- 4.3.1 P2D Data Container -- 4.3.2 P3D Data Container -- 4.3.3 PND Data Container -- 4.3.4 File Input and Output -- 4.4 Third-Party Data Containers -- 4.4.1 Math Arrays -- 4.4.2 Jaida Data Containers -- 4.4.3 jMathTools Arrays -- 4.4.4 Colt Data Containers -- 4.4.5 Lorentz Vector -- 4.5 Multidimensional Arrays -- References -- 5 Linear Algebra and Equations -- 5.1 Vector and Matrix Packages -- 5.1.1 Basic Matrix Arithmetic -- 5.1.2 Elements of Linear Algebra -- 5.1.3 Jampack Matrix Computations -- 5.1.4 La4J Library -- 5.1.5 EJML Matrix Library -- 5.1.6 Multithreaded Matrix Computations -- 5.1.7 JBlas and Other Matrix Packages -- 5.1.8 Python Vector and Matrix Operations -- 5.1.9 Matrix Operations in SymPy -- 5.2 Algebraic Manipulations with Tensors -- 5.3 Equations -- 5.3.1 Polynomial Equations -- 5.3.2 Linear Systems of Equations -- References -- 6 Symbolic Computations -- 6.1 Using the Octave Language -- 6.2 Java Symbolic Computing Library -- 6.2.1 Conversion to Elementary Functions -- 6.2.2 Numeric Calculations -- 6.2.3 Simplify -- 6.2.4 Substitutions -- 6.2.5 Differentiate -- 6.2.6 Integration -- 6.2.7 Factorization -- 6.2.8 MathML Output -- 6.2.9 Integration with DMelt Plotting Canvases -- 6.3 Using SymPy -- References -- 7 Histograms -- 7.1 One-Dimensional Histogram
  • 9.5 HBook XML Data Output -- 9.6 Text File Formats -- 9.6.1 Working with ASCII Files -- 9.6.2 CSV File Format -- 9.6.3 EDN File Format -- 9.6.4 DIF File Format -- 9.7 Reading ROOT and AIDA Files -- 9.7.1 ROOT Files -- 9.7.2 AIDA Files -- 9.8 Google's Protocol Buffer Format -- 9.8.1 Prototyping Data Records -- 9.8.2 Dealing with Data Using Java -- 9.8.3 Switching to Jython -- 9.8.4 Adding New Data Records -- 9.8.5 Using C++ with the Protocol Buffers -- 9.8.6 Some Remarks -- 9.9 Creating Excel Files -- 9.10 Non-SQL Object Databases -- 9.10.1 Nonsequential Input and Output -- 9.10.2 Persistent Map -- 9.10.3 MapDB Database -- 9.10.4 NeoDatis Database -- 9.11 Relational SQL Databases -- 9.11.1 Derby SQL Database -- 9.11.2 HyperSQL Database -- 9.11.3 SQLite Database -- 9.12 Miscellaneous Input--Output Topics -- 9.12.1 Building List of Files -- 9.12.2 Reading Configuration Files -- 9.13 Summary -- 9.13.1 Dealing with Single Objects -- 9.13.2 Dealing with Object Collections -- 9.13.3 Text Files -- 9.13.4 Databases -- References -- 10 Probability and Statistics -- 10.1 Descriptive Statistics -- 10.1.1 Comparing Data -- 10.2 Statistical Analysis Using Python -- 10.3 Random Numbers -- 10.3.1 Using Random Numbers -- 10.3.2 Random Numbers in Colt -- 10.3.3 Other Packages with Random Numbers -- 10.4 Random Sampling -- 10.4.1 Methods of 1D Arrays -- 10.4.2 Methods of 2D Arrays -- 10.4.3 Sampling Using the Colt Package -- 10.5 Statistical Significance and Confidence Levels -- 10.5.1 Statistical Significance -- 10.5.2 Discovery Sensitivity -- 10.5.3 Confidence Interval -- 10.5.4 Confidence Levels for Small Statistics -- 10.5.5 Statistical Tests -- 10.5.6 Confidence Levels for Distributions -- 10.6 Error Propagation -- 10.6.1 Propagation Using Monte Carlo Technique -- References -- 11 Linear Regression and Curve Fitting -- 11.1 Linear Regression
  • 7.1.1 Probability Distribution and Probability Density -- 7.1.2 Histogram Characteristics -- 7.1.3 Initialization and Filling Methods -- 7.1.4 Accessing Histogram Values -- 7.1.5 Integration -- 7.1.6 Histogram Operations -- 7.1.7 Accessing Low-Level Jaida Classes -- 7.1.8 Graphical Attributes -- 7.2 Histogram in 2D -- 7.2.1 Histogram Operations -- 7.2.2 Graphical Representation -- 7.3 Histograms in Jaida -- 7.4 Histogram in 3D -- 7.5 Profile Histograms -- 7.6 Histogram Input and Output -- 7.6.1 External Programs for Histograms -- 7.7 Analyzing Histograms from Multiple Files -- References -- 8 Scientific visualization -- 8.1 Graphical Canvases -- 8.2 HPlot Canvas -- 8.2.1 Working with the HPlot Canvas -- 8.2.2 Saving Plots -- 8.2.3 Reading Data -- 8.2.4 Axes -- 8.2.5 Summary of the HPlot Methods -- 8.2.6 Exporting to Image Files -- 8.2.7 Labels and Keys -- 8.2.8 Geometrical Primitives -- 8.2.9 Text Strings and Symbols -- 8.3 Interconnected Objects -- 8.4 Showing Charts -- 8.5 Lightweight Canvases -- 8.5.1 Henon Attractor Again -- 8.6 Canvas for Interactive Drawing -- 8.6.1 Drawing Diagrams -- 8.6.2 SHPlotJa Class -- 8.7 Custom Plotting in XY -- 8.7.1 HPlotXY Canvas -- 8.7.2 WPlot Canvas -- 8.7.3 HPlotJas Canvas -- 8.8 HPlot2D Canvas -- 8.9 Visualization in 3D -- 8.9.1 HPlot3D Canvas -- 8.9.2 HPlot3DP Canvas -- 8.9.3 Mathematical Objects in 3D -- 8.10 Plotting Real-Time Data -- 8.10.1 Real-Time Data Using SPlot -- 8.10.2 Real-Time Data Using HPlotRT -- 8.11 Graphs and Java GUI Components -- References -- 9 File Input and Output -- 9.1 Nonpersistent Data: Memory-Based Data -- 9.2 Object Serialization -- 9.3 Persistent Event Records -- 9.3.1 Sequential Input and Output -- 9.3.2 Opening Data in a Browser -- 9.3.3 Saving Event Records Persistently -- 9.3.4 Buffer Sizes -- 9.3.5 XML File Format -- 9.4 PFile Data Format -- 9.4.1 Browser for PFile File Data
  • Intro -- Preface -- Who Is This Book for -- Books You May Read Before -- Acknowledgements -- Contents -- Conventions and Acronyms -- 1 Java Computational Platform -- 1.1 Introduction -- 1.1.1 Programming in Java -- 1.1.2 The DMelt Software Platform -- 1.1.3 Some Warnings -- 1.1.4 Errors -- 1.2 Scripting with DMelt -- 1.2.1 Learning by Example -- 1.2.2 Using Jython for Code Examples -- 1.2.3 Differences with Other Math Software -- 1.3 Installation -- 1.4 DMelt Workbench -- 1.4.1 Source Code Editor -- 1.4.2 DMelt Libraries -- 1.4.3 Jython and BeanShell Consoles -- 1.4.4 Accessing Methods of Instances -- 1.4.5 Editing Jython Scripts -- 1.4.6 Running Jython Scripts -- 1.4.7 Macro Files of the DMelt IDE -- 1.4.8 Running BeanShell Scripts -- 1.4.9 Compiling and Running Java Code -- 1.4.10 DMelt Code Assist -- 1.4.11 Other Features -- 1.4.12 Working with Images -- 1.4.13 DMelt License -- References -- 2 Introduction to Jython -- 2.1 Code Structure and Jython Objects -- 2.1.1 Numbers as Objects -- 2.1.2 Formatted Output -- 2.1.3 Mathematical Functions -- 2.2 Complex Numbers -- 2.3 Strings as Objects -- 2.4 Import Statements -- 2.4.1 Executing Native Applications -- 2.5 Comparison Tests and Loops -- 2.5.1 The ``if-else'' Statement -- 2.5.2 Loops. The ``for'' Statement -- 2.5.3 The ``continue'' and ``break'' Statements -- 2.5.4 Loops. The ``while'' Statement -- 2.6 Collections -- 2.6.1 Lists -- 2.6.2 Tuples -- 2.6.3 Dictionaries -- 2.6.4 Functional Programming -- 2.7 Java Collections in Jython -- 2.7.1 List. An Ordered Collection -- 2.7.2 Set. A Collection Without Duplicate Elements -- 2.7.3 SortedSet. Sorted Unique Elements -- 2.7.4 Map. Mapping Keys to Values -- 2.7.5 Java Map with Sorted Elements -- 2.7.6 Real-Life Example: Sorting and Removing Duplicates -- 2.8 Random Numbers -- 2.9 Time Module -- 2.9.1 Benchmarking -- 2.10 Python Functions and Modules
  • 2.11 Python Classes -- 2.11.1 Initializing a Class -- 2.11.2 Classes Inherited from Other Classes -- 2.11.3 Java Classes in Jython -- 2.11.4 Not Covered Topics -- 2.12 Parallel Computing and Threads -- 2.13 Arrays in Jython -- 2.13.1 Array Conversion and Transformations -- 2.13.2 Performance Issues -- 2.13.3 Used Memory -- 2.14 Exceptions in Python -- 2.15 Input and Output -- 2.15.1 User Interaction -- 2.15.2 Reading and Writing Files -- 2.15.3 Input and Output for Arrays -- 2.15.4 Working with CSV Python Module -- 2.15.5 Saving Objects in a Serialized File -- 2.15.6 Storing Multiple Objects -- 2.15.7 Using Java for I/O -- 2.15.8 Reading Data from the Network -- 2.16 Real-Life Example. Collecting Data Files -- 2.17 Using Java for GUI Programming -- 2.18 Concluding Remarks -- References -- 3 Mathematical Functions -- 3.1 Python Functions -- 3.2 Functions in DMelt -- 3.2.1 Java Implementation of F1D -- 3.2.2 Manipulations with 1D Functions -- 3.3 Plotting 1D Functions -- 3.3.1 Building a Graphical Canvas -- 3.3.2 Drawing 1D Functions -- 3.3.3 Plotting Functions on Different Pads -- 3.3.4 Short Summary of HPlot Methods -- 3.3.5 Example -- 3.4 2D Functions -- 3.4.1 Functions in Two Dimensions -- 3.4.2 Displaying 2D Functions -- 3.4.3 Using a Contour Plot -- 3.5 3D Functions -- 3.5.1 Functions in Three Dimensions -- 3.6 Functions in Many Dimensions -- 3.6.1 FND Functions -- 3.6.2 Drawing FND Functions -- 3.7 Custom Functions -- 3.7.1 Custom Functions and Their Methods -- 3.7.2 Custom Functions Using Expression Builder -- 3.7.3 Custom Functions in Jython -- 3.8 Parametric Surfaces in 3D -- 3.8.1 FPR Functions -- 3.8.2 3D Mathematical Objects -- 3.9 Function Minimization -- 3.9.1 Minimization of Multidimensional Functions -- 3.9.2 Calling Migrad Directly -- 3.10 File Input and Output -- References -- 4 Data Arrays -- 4.1 1D Arrays
  • 11.1.1 Creating Input Data