1. The need to install python3.7, anaconda package manager (similar to the java maven), tensorflow, pycharm development tools. Download the end of the annex.
2. Install tensorflow, start -Anaconda3-Anaconda3 Prompt. Open the console.
conda create -n tensorflow python=3.5.2
Anaconda Home
3. Common package, Numpy: math library, Scipy: Senior module NumPy development,
pandas: import data, cleaning, processing, and output statistics,
Scikit-learn: specifically for machine learning Python open-source framework
Installation command
conda install XXX
Such as: conda install scipy
4. Open development tools pycharm.
1 import numpy as np 2 import matplotlib.pyplot as plt 3 4 #心形线 5 t = np.linspace(0, 2*np.pi, 100) 6 x = 16 * np.sin(t) ** 3 7 y = 13 * np.cos(t) - 5 * np.cos(2*t) - 2 * np.cos(3*t) - np.cos(4*t) 8 plt.plot(x, y, 'r-', linewidth=2) 9 plt.grid(True) 10 plt.show()
Results of the:
1 # 5.6 渐开线 2 t = np.linspace(0, 50, num=1000) 3 x = t*np.sin(t) + np.cos(t) 4 y = np.sin(t) - t*np.cos(t) 5 plt.plot(x, y, 'r-', linewidth=2) 6 plt.grid() 7 plt.show()