You are on page 1of 6

Scikit-learn using python

By T.Sarathkumar

Introduction
Debugging Matrix handling

Debugging
Insert import pdb; pdb.set_trace() within script to start debugging. Enter next command in shell to execute next line. Enter continue to run continuously. Type the variable name to check its current value.

Plotting
Install matplotlib package. Plot example: import matplotlib.pyplot as plt plt.plot([1,2,3,4]) plt.ylabel('numbers') plt.show()

Matrix Handling
Install numpy package along with matplotlib Matrix creation example: import numpy as np t = np.arange(0.0, 5.0, 0.01) s = np.cos(2*np.pi*t)

You might also like