Python Environment Setup

今天正式开始上Statistical Machine learning。 需要配置Python
https://conda.io/docs/user-guide/getting-started.html

下一步还需要做

  • review numpy, matplot, pandas.
Conda Overview

The conda command is the primary interface for managing installations of various packages. It can

  • Query and search Anaconda package index and current Anaconda installation.
  • Create new conda environment.
  • Install and update packages into existing conda environments

Conda environments
A conda environments is a directory that contains a specific collection of conda packages that you have installed

  1. e.g. you may have one environment with NumPy 1.7 and its dependencies, and another environment with NumPy 1.6 for legacy testing. If you change one environment, your other environments are not affected
  2. You can easily activate or deactivate environments, which is how you switch between them.
  3. conda install [packagename] to install conda packages

【坑】

Jupyter notebook ---when importing external .py classes, one has either to reload the class OR restart IPython kernel ---- when the source file is modified.
initializing dumpy array : note there is no way to initialize an array without filling it with something. i.e it is illegal to initialize an array (like what we do in java or cpp)
a = np.array((3,4)) #array of shape(3,4)
instead, one has to use a = np.zeros((3,4)) or a = np.zeros([....]) from existing data https://docs.scipy.org/doc/numpy-1.13.0/reference/routines.array-creation.html

最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
平台声明:文章内容(如有图片或视频亦包括在内)由作者上传并发布,文章内容仅代表作者本人观点,简书系信息发布平台,仅提供信息存储服务。