anaconda的一些命令
先安装好TensorFlow。
1.安装sklearn
本安装方式是在anaconda prompt上用命令来更新
(1)激活TensorFlow:activate tensorflow
(2)查看是否有sklearn:conda list
(3)安装:conda install scikit-learn
sklearn使用示例:
>>> import numpy as np
>>> from sklearn.model_selection import train_test_split
>>> X, y = np.arange().reshape((, )), range()
>>> X
array([[, ],
[, ],
[, ],
[, ],
[, ]])
>>> list(y)
[, , , , ]
>>> X_train, X_test, y_train, y_test = train_test_split(
... X, y, test_size=0.33, random_state=)
...
>>> X_train
array([[, ],
[, ],
[, ]])
>>> y_train
[, , ]
>>> X_test
array([[, ],
[, ]])
>>> y_test
[, ]
>>> train_test_split(y, shuffle=False)
[[, , ], [, ]]
2.安装matplotlib
安装与1相同
(1)激活TensorFlow:activate tensorflow
(2)查看是否有sklearn:conda list
(3)安装:conda install matplotlib
matplotlib使用示例:
import matplotlib
import numpy
import scipy
import matplotlib.pyplot as plt plt.plot([1,2,3])
plt.ylabel('some numbers')
plt.show()

import numpy as np
import matplotlib.pyplot as plt X = np.arange(-5.0, 5.0, 0.1)
Y = np.arange(-5.0, 5.0, 0.1) x, y = np.meshgrid(X, Y)
f = 17 * x ** 2 - 16 * np.abs(x) * y + 17 * y ** 2 - 225 fig = plt.figure()
cs = plt.contour(x, y, f, 0, colors = 'r')
plt.show()

import numpy as np
import matplotlib.pyplot as plt N = 5
menMeans = (20, 35, 30, 35, 27)
menStd = (2, 3, 4, 1, 2) ind = np.arange(N) # the x locations for the groups
width = 0.35 # the width of the bars fig, ax = plt.subplots()
rects1 = ax.bar(ind, menMeans, width, color='r', yerr=menStd) womenMeans = (25, 32, 34, 20, 25)
womenStd = (3, 5, 2, 3, 3)
rects2 = ax.bar(ind+width, womenMeans, width, color='y', yerr=womenStd) # add some
ax.set_ylabel('Scores')
ax.set_title('Scores by group and gender')
ax.set_xticks(ind+width)
ax.set_xticklabels( ('G1', 'G2', 'G3', 'G4', 'G5') ) ax.legend( (rects1[0], rects2[0]), ('Men', 'Women') ) def autolabel(rects):
# attach some text labels
for rect in rects:
height = rect.get_height()
ax.text(rect.get_x()+rect.get_width()/2., 1.05*height, '%d'%int(height),
ha='center', va='bottom') autolabel(rects1)
autolabel(rects2) plt.show()

anaconda的一些命令的更多相关文章
- anaconda常用的命令
常用操作命令: 一.环境操作 1.查看环境管理的全部命令帮助: conda env -h 2.查看当前系统下的环境: conda info -e 3.创建环境: conda create env_na ...
- anaconda 使用conda命令创建虚拟环境
1.首先在所在系统中安装Anaconda.可以打开命令行输入conda -V检验是否安装以及当前conda的版本. 2.conda常用的命令. 1)conda list 查看安装了哪些包. 2)con ...
- Anaconda之常用命令
1.查看环境列表:conda-env list 2.删除环境:conda env remove -n tf1.2 3.创建指定python的环境:conda create -n tf1.2 pyth ...
- 在Mac上安装anaconda,在命令行中输入conda,提示不是有效命令的解决办法
原链接:https://stackoverflow.com/questions/18675907/how-to-run-conda
- Anaconda换源及常用命令
推荐一篇文章:http://www.cnblogs.com/IT-LearnHall/p/9486029.html 另外,记录几个自己遇到的问题 首先是换源.无论是安装包还是安装后更新python包, ...
- ML学习笔记之Anaconda中命令形式安装XGBoost(pip install)
0x00 概述 在没有安装XGBoost之前,import xgboot会出错,如下: # ModuleNotFoundError: No module named ‘xgboost’ 0x01 安装 ...
- 安装Anaconda
安装Anaconda来安装一切 spyder是python科学计算IDE,类似matlab.这是一个基于Qt的软件,如果使用pip install安装,会出现各种bug.pip install spy ...
- Anaconda使用
转自PeterYuan 序 Python易用,但用好却不易,其中比较头疼的就是包管理和Python不同版本的问题,特别是当你使用Windows的时候.为了解决这些问题,有不少发行版的Python, ...
- Conda常见命令
Anaconda,Miniconda,Conda,Pip的区别: Anaconda:用于科学计算的python发行版,里面预装好了conda,某个版本的python,众多packages,科学计算工具 ...
随机推荐
- Vmwaretools
先下载Vmwaretools 这一步是设置ubuntu的超级用户root的密码我设置为dong 转换为root用户操作 执行 perl程序 然后就是一路Enter,开始关机重启就行了 来自为知笔记 ...
- SQLAlchemy-Utils,提供choice功能
SQLAlchemy操作数据库建表时,无法像Django一样提供choice方法,我们开头导入SQLAlchemy-Utils来为我们提供这个功能 pip3 install sqlalchemy-ut ...
- Bootstrap 中的插件的学习2(导航)
实例 在导航栏内 下面的实例演示了在导航栏内的下拉菜单的用法: <!DOCTYPE HTML> <html> <head> <link href=" ...
- XSS是什么
1.XSS是跨站脚本攻击(Cross Site Scripting),为不和层叠样式表(Cascading Style Sheets, CSS)的缩写混淆,故将跨站脚本攻击缩写为XSS. 2.恶意攻击 ...
- react.js 引用 NavBar 报错svg-spite-loader
Navbar iconName="false" 配置 改为 iconName={this.props.bool}
- ABP官方文档翻译 1.4 启动配置
启动配置 配置ABP 替换内置服务 配置模块 创建模块配置 ABP提供了基础设施和模型在启动的时候对它及模块进行配置. 配置ABP 在模块的PreInitialize事件中配置ABP.示例配置如下: ...
- logstash编写2以及结合kibana使用
有时候根据日志的内容,可能一行不能全部显示,会延续在下一行,为了将上下内容关联在一起,于是codec插件中的multiline插件 就派上用场了,源日志内容: [2017-09-20T16:04:34 ...
- Java学习第二周学习笔记
20145307<Java程序设计>第二周学习总结 教材学习内容总结 Java语言中的很多基本语法都和C语言类似,以下Java中的基本语法 标识符 标识符是程序中自定义的一些名称. 由26 ...
- linux input输入子系统分析《四》:input子系统整体流程全面分析
1 input输入子系统整体流程 本节分析input子系统在内核中的实现,包括输入子系统(Input Core),事件处理层(Event Handler)和设备驱动层.由于上节代码讲解了设备 ...
- 如何升级到python3版本并且安装pip3
如何升级到python3版本并且安装pip3 准备: Python-3.5.2.tar.xz pip-8.1.2.tar.gz setuptools-24.0.2.zip 步骤: 1.自定义编译安装p ...