O'Reilly logo

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Elegant SciPy

Book Description

Welcome to Scientific Python and its community! With this practical book, you'll learn the fundamental parts of SciPy and related libraries, and get a taste of beautiful, easy-to-read code that you can use in practice. More and more scientists are programming, and the SciPy library is here to help. You'll learn by example with some of the best code available, selected to cover a wide range of SciPy and related libraries—including scikit-learn, scikit-image, toolz, and pandas.

Table of Contents

  1. 1. Elegant NumPy: The Foundation of Scientific Python
    1. What is gene expression?
    2. NumPy N-dimensional arrays
      1. Why use ndarrays as opposed to Python lists?
      2. Vectorization
      3. Broadcasting
    3. Exploring a gene expression data set
      1. Downloading the data
    4. Normalization
      1. Between samples
      2. Between genes
      3. Normalizing over samples and genes: RPKM
    5. Taking stock
  2. 2. Quantile normalization with NumPy and SciPy
    1. Get the data
    2. Biclustering the counts data
    3. Visualizing clusters
    4. Predicting survival
  3. 3. Networks of Image Regions with ndimage
    1. Images are numpy arrays
    2. Filters in signal processing
    3. Filtering images (2D filters)
    4. Generic filters
    5. Graphs and the NetworkX library
    6. Region adjacency graphs
    7. Elegant ndimage
    8. Putting it all together: mean color segmentation
  4. 4. Frequency and the fast Fourier transform
    1. History
    2. Implementation
    3. Choosing the length of the DFT
    4. Discrete Fourier transform concepts
      1. Frequencies and their ordering
      2. Windowing
    5. Real-world Application: Analyzing Radar Data
      1. Signal properties in the frequency domain
      2. Windowing, applied
      3. Radar Images
      4. Further applications of the FFT
      5. Further reading
  5. 5. Contingency tables using sparse coordinate matrices
    1. scipy.sparse data formats
    2. Applications of sparse matrices: image transformations
    3. Back to contingency matrices
    4. Contingency matrices in segmentation
  6. 6. Linear algebra in SciPy
    1. Laplacian matrix of a graph
    2. Laplacians with brain data
      1. Challenge: linear algebra with sparse matrices
      2. Challenge accepted
    3. PageRank: linear algebra for reputation and importance
    4. Concluding remarks
  7. 7. Function optimization in SciPy