Explore chapters and articles related to this topic
Python and Its Libraries for Machine Learning
Published in Shrirang Ambaji Kulkarni, Varadraj P. Gurupur, Steven L. Fernandes, Introduction to IoT with Machine Learning and Image Processing using Raspberry Pi, 2020
Shrirang Ambaji Kulkarni, Varadraj P. Gurupur, Steven L. Fernandes
The module that supports Linear Algebra in SciPy is linalg. Let us compute the inverse of matrix using SciPy 105216350
Introduction to Python
Published in Vasudevan Lakshminarayanan, Hassen Ghalila, Ahmed Ammar, L. Srinivasa Varadharajan, Understanding Optics with Python, 2018
Vasudevan Lakshminarayanan, Hassen Ghalila, Ahmed Ammar, L. Srinivasa Varadharajan
SciPy (https://www.scipy.org/): SciPy can be thought of as an extension of NumPy with a large number of modules that are optimized for specific scientific calculations. The SciPy community is Python’s most important platform for scientific computing. The SciPy community is a well-established and growing group of scientists, engineers, and researchers using, extending, and promoting Python’s use for scientific computing, research, and education.
Computing using Python Modules
Published in Ravishankar Chityala, Sridevi Pudipeddi, Image Processing and Acquisition using Python, 2020
Ravishankar Chityala, Sridevi Pudipeddi
Scipy is a library of functions, programs and mathematical tools for scientific programming in Python. It uses numpy for its internal computation. Scipy is an extensive library that allows programming of different mathematical applications such as integration, optimization, Fourier transforms, signal processing, statistics, multi-dimensional image processing etc.
Enhancing Monte Carlo Workflows for Nuclear Reactor Analysis with Metamodel-Driven Modeling
Published in Nuclear Science and Engineering, 2023
Peter J. Kowal, Camden E. Blake, Kurt A. Dominesey, Robert A. Lefebvre, Forrest B. Brown, Wei Ji
A common and important use of MCNP is to model the critical configuration of a system, whether that system is a reactor design or a criticality benchmark. In such a scenario, an iterative procedure consisting of multiple simulations is required to arrive at a precisely critical configuration. Using MCNPy, an entire critical search process can be executed from a straightforward Python script. To demonstrate this, a search for the critical radius of a bare plutonium sphere was performed. While a trivial problem, this clearly shows how MCNPy and Python can be leveraged to perform a search for a critical optimization problem with MCNP. Once provided an initial guess or range of radii, the script will iteratively generate, run, and extract outputs from an MCNP model until criticality within a specified tolerance is reached. The optimization aspect in handled by the optimization module within the Python package SciPy, which enables the user to choose from several optimization schemes. The function being optimized, seen in Listing 10, is responsible for writing the MCNP deck, running MCNP, extracting outputs, and passing a numerical result to the chosen optimization function.
Proper Orthogonal Decomposition Mode Coefficient Interpolation: A Non-Intrusive Reduced-Order Model for Parametric Reactor Kinetics
Published in Nuclear Science and Engineering, 2023
Zachary K. Hardy, Jim E. Morel
Because the choice of interpolant is arbitrary for the POD-MCI ROM, only RBF interpolants with a thin-plate spline kernel, given by , are used in this work. RBFs are advantageous because no special treatment is required when predicting points outside of the available grid of points. While extrapolation should always be minimized, in higher-dimensional spaces where sampling on regular grids is less feasible, some extrapolation in particular dimensions is unavoidable. This particular kernel function is used because it does not require the tuning of a shape parameter. No efforts are made to tune other hyperparameters. For optimal results, one should perform a preliminary analysis to determine the optimal interpolant configuration for the particular data set. In this work, the interpolations are carried out with the RBFInterpolator class within the Python package SciPy.[32]
Managing construction risk with weather derivatives
Published in The Engineering Economist, 2021
David Islip, Jason Z. Wei, Roy H. Kwon
The CVaR optimal portfolio for the parameter setting verifies the remarks and hypothesis outlined earlier. The structure of the hedging portfolio satisfies the common sense ideas of hedging against the aggressive cold in the winter, extreme heat in the summer, and precipitation all year round. For the single-crew example, the largest allocations are made in the winter to offset frigid temperatures.12Figure 9 shows the resulting profit () distribution for the project (hedged and hedge free). The specific portfolio allocations shown in Table 6 confirm the hypothesis above regarding the portfolio structure. Table 7 highlights the in-sample and out of sample simulation performance of the hedging portfolio. Note that all optimizations were performed using the SciPy package in Python 3. The sequential least-squares quadratic programing method was used to solve the optimizations (Jones, Oliphant, & Peterson, 2001).