دسترسی نامحدود
برای کاربرانی که ثبت نام کرده اند
برای ارتباط با ما می توانید از طریق شماره موبایل زیر از طریق تماس و پیامک با ما در ارتباط باشید
در صورت عدم پاسخ گویی از طریق پیامک با پشتیبان در ارتباط باشید
برای کاربرانی که ثبت نام کرده اند
درصورت عدم همخوانی توضیحات با کتاب
از ساعت 7 صبح تا 10 شب
ویرایش: نویسندگان: Gaël Varoquaux, Emmanuelle Gouillart, Olaf Vahtras, Pierre de Buyl, K. Jarrod Millman, Stéfan van der Wal سری: ناشر: creative commons سال نشر: 2023 تعداد صفحات: 696 زبان: English فرمت فایل : PDF (درصورت درخواست کاربر به PDF، EPUB یا AZW3 تبدیل می شود) حجم فایل: 17 Mb
در صورت تبدیل فایل کتاب Scientific Python Lectures به فرمت های PDF، EPUB، AZW3، MOBI و یا DJVU می توانید به پشتیبان اطلاع دهید تا فایل مورد نظر را تبدیل نمایند.
توجه داشته باشید کتاب سخنرانی های علمی پایتون نسخه زبان اصلی می باشد و کتاب ترجمه شده به فارسی نمی باشد. وبسایت اینترنشنال لایبرری ارائه دهنده کتاب های زبان اصلی می باشد و هیچ گونه کتاب ترجمه شده یا نوشته شده به فارسی را ارائه نمی دهد.
I Getting started with Python for science Python scientific computing ecosystem Why Python? The scientist’s needs Python’s strengths How does Python compare to other solutions? Compiled languages: C, C++, Fortran… Matlab scripting language Julia Other scripting languages: Scilab, Octave, R, IDL, etc. Python The scientific Python ecosystem Before starting: Installing a working environment The workflow: interactive environments and text editors Interactive work Elaboration of the work in an editor IPython and Jupyter Tips and Tricks The Python language First steps Basic types Numerical types Containers Lists Strings Dictionaries More container types Assignment operator Control Flow if/elif/else for/range while/break/continue Conditional Expressions Advanced iteration Iterate over any sequence Keeping track of enumeration number Looping over a dictionary List Comprehensions Defining functions Function definition Return statement Parameters Passing by value Global variables Variable number of parameters Docstrings Functions are objects Methods Exercises Reusing code: scripts and modules Scripts Importing objects from modules Creating modules ‘__main__’ and module loading Scripts or modules? How to organize your code How modules are found and imported Packages Good practices Input and Output Iterating over a file File modes Standard Library os module: operating system functionality Directory and file manipulation os.path: path manipulations Running an external command Walking a directory Environment variables: shutil: high-level file operations glob: Pattern matching on files sys module: system-specific information pickle: easy persistence Exception handling in Python Exceptions Catching exceptions try/except try/finally Easier to ask for forgiveness than for permission Raising exceptions Object-oriented programming (OOP) NumPy: creating and manipulating numerical data The NumPy array object What are NumPy and NumPy arrays? NumPy arrays NumPy Reference documentation Import conventions Creating arrays Manual construction of arrays Functions for creating arrays Basic data types Basic visualization Indexing and slicing Copies and views Fancy indexing Using boolean masks Indexing with an array of integers Numerical operations on arrays Elementwise operations Basic operations Other operations Basic reductions Computing sums Other reductions Broadcasting Array shape manipulation Flattening Reshaping Adding a dimension Dimension shuffling Resizing Sorting data Summary More elaborate arrays More data types Casting Different data type sizes Structured data types maskedarray: dealing with (propagation of) missing data Advanced operations Polynomials More polynomials (with more bases) Loading data files Text files Images NumPy’s own format Well-known (& more obscure) file formats Some exercises Array manipulations Picture manipulation: Framing a Face Data statistics Crude integral approximations Mandelbrot set Markov chain Full code examples Full code examples for the numpy chapter 1D plotting 2D plotting Distances exercise Fitting to polynomial Fitting in Chebyshev basis Population exercise Reading and writing an elephant original figure red channel displayed in grey lower resolution Mandelbrot set Random walk exercise Matplotlib: plotting Introduction IPython, Jupyter, and matplotlib modes pyplot Simple plot Plotting with default settings Instantiating defaults Changing colors and line widths Setting limits Setting ticks Setting tick labels Moving spines Adding a legend Annotate some points Devil is in the details Figures, Subplots, Axes and Ticks Figures Subplots Axes Ticks Tick Locators Other Types of Plots: examples and exercises Regular Plots Scatter Plots Bar Plots Contour Plots Imshow Pie Charts Quiver Plots Grids Multi Plots Polar Axis 3D Plots Text Beyond this tutorial Tutorials Matplotlib documentation Code documentation Galleries Mailing lists Quick references Line properties Line styles Markers Colormaps Full code examples Code samples for Matplotlib Pie chart A simple, good-looking plot Plotting a scatter of points Subplots Horizontal arrangement of subplots A simple plotting example Subplot plot arrangement vertical Simple axes example 3D plotting Imshow elaborate Plotting a vector field: quiver A example of plotting not quite right Displaying the contours of a function Plotting in polar coordinates Plot and filled plots Bar plots Subplot grid Axes Grid 3D plotting GridSpec Demo text printing Code for the chapter’s exercises Example demoing choices for an option Code generating the summary figures with a title Code for the chapter’s exercises Exercise 1 Exercise 4 Exercise 3 Exercise 5 Exercise 6 Exercise 2 Exercise 7 Exercise 8 Exercise 9 Exercise Example demoing choices for an option The colors matplotlib line plots Linewidth Alpha: transparency Aliased versus anti-aliased Aliased versus anti-aliased Marker size Marker edge width Colormaps Solid joint style Solid cap style Marker edge color Marker face color Dash capstyle Dash join style Markers Linestyles Locators for tick on axis Code generating the summary figures with a title 3D plotting vignette Plotting in polar, decorated Plot example vignette Multiple plots vignette Boxplot with matplotlib Plot scatter decorated Pie chart vignette Imshow demo Bar plot advanced Plotting quiver decorated Display the contours of a function Grid elaborate Text printing decorated SciPy : high-level scientific computing File input/output: scipy.io Special functions: scipy.special Linear algebra operations: scipy.linalg Interpolation: scipy.interpolate Optimization and fit: scipy.optimize Root Finding Curve fitting Optimization Statistics and random numbers: scipy.stats Statistical Distributions Sample Statistics and Hypothesis Tests Numerical integration: scipy.integrate Quadrature Initial Value Problems Fast Fourier transforms: scipy.fftpack Signal processing: scipy.signal Image manipulation: scipy.ndimage Geometrical transformations on images Image filtering Mathematical morphology Connected components and measurements on images Summary exercises on scientific computing Maximum wind speed prediction at the Sprogø station Statistical approach Computing the cumulative probabilities Prediction with UnivariateSpline Exercise with the Gumbell distribution Non linear least squares curve fitting: application to point extraction in topographical lidar data Introduction Loading and visualization Fitting a waveform with a simple Gaussian model Model Initial solution Fit Going further Image processing application: counting bubbles and unmolten grains Statement of the problem Example of solution for the image processing exercise: unmolten grains in glass Full code examples for the SciPy chapter Finding the minimum of a smooth function Resample a signal with scipy.signal.resample Detrending a signal Integrating a simple ODE Normal distribution: histogram and PDF Integrate the Damped spring-mass oscillator Comparing 2 sets of samples from Gaussians Curve fitting Spectrogram, power spectral density Generate a chirp signal Compute and plot the spectrogram Compute and plot the power spectral density (PSD) A demo of 1D interpolation Demo mathematical morphology Plot geometrical transformations on images Demo connected components Minima and roots of a function Define the function Find minima Root finding Plot function, minima, and roots Plot filtering on images Optimization of a two-parameter function A 2D image plot of the function A 3D surface plot of the function Find minima Plotting and manipulating FFTs for filtering Generate the signal Compute and plot the power Remove all the high frequencies Solutions of the exercises for SciPy Solutions of the exercises for SciPy Crude periodicity finding Load the data Plot the data Plot its periods Curve fitting: temperature as a function of month of the year The data Fitting it to a periodic function Plotting the fit Simple image blur by convolution with a Gaussian kernel The original image Prepare an Gaussian convolution kernel Implement convolution via FFT A function to do it: scipy.signal.fftconvolve() Image denoising by FFT Read and plot the image Compute the 2d FFT of the input image Filter in FFT Reconstruct the final image Easier and better: scipy.ndimage.gaussian_filter() Getting help and finding documentation II Advanced topics Advanced Python Constructs Iterators, generator expressions and generators Iterators Generator expressions Generators Bidirectional communication Chaining generators Decorators Replacing or tweaking the original object Decorators implemented as classes and as functions Copying the docstring and other attributes of the original function Examples in the standard library Deprecation of functions A while-loop removing decorator A plugin registration system Context managers Catching exceptions Using generators to define context managers Advanced NumPy Life of ndarray It’s… Block of memory Data types The descriptor Example: reading .wav files Casting and re-interpretation/views Casting Re-interpretation / viewing Indexing scheme: strides Main point C and Fortran order Slicing with integers Example: fake dimensions with strides Broadcasting More tricks: diagonals CPU cache effects Findings in dissection Universal functions What they are? Parts of an Ufunc Making it easier Exercise: building an ufunc from scratch Solution: building an ufunc from scratch Generalized ufuncs Interoperability features Sharing multidimensional, typed data The old buffer protocol The old buffer protocol Array interface protocol Array siblings: chararray, maskedarray chararray: vectorized string operations masked_array missing data The mask Domain-aware functions recarray: purely convenience Summary Contributing to NumPy/SciPy Why Reporting bugs Good bug report Contributing to documentation Contributing features How to help, in general Debugging code Avoiding bugs Coding best practices to avoid getting in trouble pyflakes: fast static analysis Running pyflakes on the current edited file A type-as-go spell-checker like integration Debugging workflow Using the Python debugger Invoking the debugger Postmortem Step-by-step execution Other ways of starting a debugger Debugger commands and interaction Getting help when in the debugger Debugging segmentation faults using gdb Optimizing code Optimization workflow Profiling Python code Timeit Profiler Line-profiler Making code go faster Algorithmic optimization Example of the SVD Writing faster numerical code Additional Links Sparse Matrices in SciPy Introduction Why Sparse Matrices? Sparse Matrices vs. Sparse Matrix Storage Schemes Typical Applications Prerequisites Sparsity Structure Visualization Storage Schemes Common Methods Sparse Matrix Classes Diagonal Format (DIA) Examples List of Lists Format (LIL) Examples Dictionary of Keys Format (DOK) Examples Coordinate Format (COO) Examples Compressed Sparse Row Format (CSR) Examples Compressed Sparse Column Format (CSC) Examples Block Compressed Row Format (BSR) Examples Summary Linear System Solvers Sparse Direct Solvers Examples Iterative Solvers Common Parameters LinearOperator Class A Few Notes on Preconditioning Eigenvalue Problem Solvers The eigen module Other Interesting Packages Image manipulation and processing using NumPy and SciPy Opening and writing to image files Displaying images Basic manipulations Statistical information Geometrical transformations Image filtering Blurring/smoothing Sharpening Denoising Mathematical morphology Feature extraction Edge detection Segmentation Measuring objects properties: scipy.ndimage.measurements Full code examples Examples for the image processing chapter Displaying a Raccoon Face Image interpolation Plot the block mean of an image Image manipulation and NumPy arrays Radial mean Display a Raccoon Face Image sharpening Blurring of images Synthetic data Image denoising Opening, erosion, and propagation Total Variation denoising Geometrical transformations Find the bounding box of an object Denoising an image with the median filter Measurements from images Histogram segmentation Finding edges with Sobel filters Greyscale dilation Cleaning segmentation with mathematical morphology Segmentation with Gaussian mixture models Watershed segmentation Granulometry Segmentation with spectral clustering Mathematical optimization: finding minima of functions Knowing your problem Convex versus non-convex optimization Smooth and non-smooth problems Noisy versus exact cost functions Constraints A review of the different optimizers Getting started: 1D optimization Gradient based methods Some intuitions about gradient descent Conjugate gradient descent Newton and quasi-newton methods Newton methods: using the Hessian (2nd differential) Quasi-Newton methods: approximating the Hessian on the fly Full code examples Examples for the mathematical optimization chapter Noisy optimization problem Smooth vs non-smooth Curve fitting Convex function Finding a minimum in a flat neighborhood Optimization with constraints Brent’s method Constraint optimization: visualizing the geometry Plotting the comparison of optimizers Alternating optimization Gradient descent Gradient-less methods A shooting method: the Powell algorithm Simplex method: the Nelder-Mead Global optimizers Brute force: a grid search Practical guide to optimization with SciPy Choosing a method Making your optimizer faster Computing gradients Synthetic exercices Special case: non-linear least-squares Minimizing the norm of a vector function Curve fitting Optimization with constraints Box bounds General constraints Full code examples Examples for the mathematical optimization chapter Interfacing with C Introduction Python-C-Api Example NumPy Support Ctypes Example NumPy Support SWIG Example NumPy Support Cython Example NumPy Support Summary Further Reading and References Exercises Python-C-API Ctypes SWIG Cython III Packages and applications Statistics in Python Data representation and interaction Data as a table The pandas data-frame Creating dataframes: reading data files or converting arrays Manipulating data Plotting data Hypothesis testing: comparing two groups Student’s t-test: the simplest statistical test One-sample tests: testing the value of a population mean Two-sample t-test: testing for difference across populations Paired tests: repeated measurements on the same individuals Linear models, multiple factors, and analysis of variance “formulas” to specify statistical models in Python A simple linear regression Categorical variables: comparing groups or multiple categories Multiple Regression: including multiple factors Post-hoc hypothesis testing: analysis of variance (ANOVA) More visualization: seaborn for statistical exploration Pairplot: scatter matrices lmplot: plotting a univariate regression Testing for interactions Full code for the figures Boxplots and paired differences Plotting simple quantities of a pandas dataframe Analysis of Iris petal and sepal sizes Simple Regression Test for an education/gender interaction in wages Multiple Regression Visualizing factors influencing wages Air fares before and after 9/11 Solutions to this chapter’s exercises Solutions to this chapter’s exercises Relating Gender and IQ Sympy : Symbolic Mathematics in Python First Steps with SymPy Using SymPy as a calculator Symbols Algebraic manipulations Expand Simplify Calculus Limits Differentiation Series expansion Integration Equation solving Linear Algebra Matrices Differential Equations scikit-image: image processing Introduction and concepts scikit-image and the scientific Python ecosystem What is included in scikit-image Importing Example data Input/output, data types and colorspaces Data types Colorspaces Image preprocessing / enhancement Local filters Non-local filters Mathematical morphology Image segmentation Binary segmentation: foreground + background Histogram-based method: Otsu thresholding Labeling connected components of a discrete image Marker based methods Watershed segmentation Random walker segmentation Measuring regions’ properties Data visualization and interaction Feature extraction for computer vision Full code examples Examples for the scikit-image chapter Creating an image Displaying a simple image Integers can overflow Equalizing the histogram of an image Computing horizontal gradients with the Sobel filter Segmentation contours Otsu thresholding Affine transform Labelling connected components of an image Various denoising filters Watershed and random walker for segmentation scikit-learn: machine learning in Python Introduction: problem settings What is machine learning? Data in scikit-learn The data matrix A Simple Example: the Iris Dataset The application problem Loading the Iris Data with Scikit-learn Basic principles of machine learning with scikit-learn Introducing the scikit-learn estimator object Fitting on data Supervised Learning: Classification and regression A recap on Scikit-learn’s estimator interface Regularization: what it is and why it is necessary Preferring simpler models Simple versus complex models for classification Supervised Learning: Classification of Handwritten Digits The nature of the data Visualizing the Data on its principal components Gaussian Naive Bayes Classification Quantitative Measurement of Performance Supervised Learning: Regression of Housing Data A quick look at the data Predicting Home Prices: a Simple Linear Regression Measuring prediction performance A quick test on the K-neighbors classifier A correct approach: Using a validation set Model Selection via Validation Cross-validation Hyperparameter optimization with cross-validation Basic Hyperparameter Optimization Automatically Performing Grid Search Built-in Hyperparameter Search Nested cross-validation Unsupervised Learning: Dimensionality Reduction and Visualization Dimensionality Reduction: PCA Visualization with a non-linear embedding: tSNE Parameter selection, Validation, and Testing Hyperparameters, Over-fitting, and Under-fitting Bias-variance trade-off: illustration on a simple regression problem Visualizing the Bias/Variance Tradeoff Validation Curves Learning Curves Summary on model selection High Bias High Variance A last word of caution: separate validation and test set Examples for the scikit-learn chapter Demo PCA in 2D Measuring Decision Tree performance Plot 2D views of the iris dataset A simple linear regression tSNE to visualize digits Use the RidgeCV and LassoCV to set the regularization parameter Plot variance and regularization in linear models Simple picture of the formal problem of machine learning Compare classifiers on the digits data Plot fitting a 9th order polynomial A simple regression analysis on the California housing data Nearest-neighbor prediction on iris Simple visualization and classification of the digits dataset Plot the data: images of digits Plot a projection on the 2 first principal axis Classify with Gaussian naive Bayes Quantify the performance The eigenfaces example: chaining PCA and SVMs Preprocessing: Principal Component Analysis Doing the Learning: Support Vector Machines Pipelining A Note on Facial Recognition Example of linear and non-linear models Bias and variance of polynomial fit Learning curves Tutorial Diagrams IV About the Scientific Python Lectures About the Scientific Python Lectures Authors Editors Chapter authors Additional Contributions Index