Welcome to the documentation for slicematrixIO-python

SliceMatrix-IO is a Platform as a Service (PaaS) where you can easily create and store machine learning models in our global cloud

Core Concepts

The 2 core concepts for SliceMatrix-IO are:

  1. The Analytical Pipeline
  2. The Model

AP’s can be thought of as assembly lines of code which can train machine learning models. AP’s are reusable, meaning you can use the same AP to train multiple machine learning models using different input data.

Model’s are where the real magic happens. After the Pipeline trains a Model, the Model live’s on SliceMatrix-IO’s machine learning infrastructure in the cloud. That means you can access your model after you create it in a distributed manner. You can also train models in parallel subject to your usage plan’s request / throttling limits.



>>> from slicematrixIO import SliceMatrix
>>> sm  = SliceMatrix(api_key)

Create a minimum spanning tree model

>>> mst = sm.MinimumSpanningTree(dataset = prices)
>>> mst.neighbors("AAPL")

Train an isomap model

>>> iso = sm.Isomap(dataset = image_data)
>>> iso.embedding()

Use a Kalman filter for online hedge ratio estimation

>>> kf = sm.KalmanOLS(dataset = pairs_data)

Get the hedge ratio and update to new data

>>> kf.update(X = 147.25, Y = 88.17)

Train a probabilistic neural network classifer:

>>> pnn = sm.PNNClassifier(dataset = bc_data)
>>> pnn.predict([...])


The easiest way to install the package is with pip:

> pip install slicematrixIO

To get an API key, go here


slicematrixIO-python depends on:

  • Python >=2.7.9
  • NumPy
  • Pandas
  • Requests

Package Structure

The package is organized into many different submodules. They can be roughly grouped as follows:

Examples / Use Cases

  1. Manifold Learning and Visualization on the Nasdaq 100
  2. KNN vs PNN Classification: Shuttle Dataset
  3. Dynamic Hedge Ratios with the Kalman Filter
  4. KNN vs PNN Classification: Breast Cancer Image Dataset
  5. Minimum Spanning Trees in Python
  6. Detecting Stock Market Anomalies
  7. Integrating Bloomberg and SliceMatrix-IO
  8. Integrating D3, NodeJS, and SliceMatrix-IO to Visualize the S&P 500
  9. Simulating Correlated Random Walks for the S&P 500

Indices and tables