先安装好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的一些命令的更多相关文章

  1. anaconda常用的命令

    常用操作命令: 一.环境操作 1.查看环境管理的全部命令帮助: conda env -h 2.查看当前系统下的环境: conda info -e 3.创建环境: conda create env_na ...

  2. anaconda 使用conda命令创建虚拟环境

    1.首先在所在系统中安装Anaconda.可以打开命令行输入conda -V检验是否安装以及当前conda的版本. 2.conda常用的命令. 1)conda list 查看安装了哪些包. 2)con ...

  3. Anaconda之常用命令

    1.查看环境列表:conda-env  list 2.删除环境:conda env remove -n tf1.2 3.创建指定python的环境:conda create -n tf1.2 pyth ...

  4. 在Mac上安装anaconda,在命令行中输入conda,提示不是有效命令的解决办法

    原链接:https://stackoverflow.com/questions/18675907/how-to-run-conda

  5. Anaconda换源及常用命令

    推荐一篇文章:http://www.cnblogs.com/IT-LearnHall/p/9486029.html 另外,记录几个自己遇到的问题 首先是换源.无论是安装包还是安装后更新python包, ...

  6. ML学习笔记之Anaconda中命令形式安装XGBoost(pip install)

    0x00 概述 在没有安装XGBoost之前,import xgboot会出错,如下: # ModuleNotFoundError: No module named ‘xgboost’ 0x01 安装 ...

  7. 安装Anaconda

    安装Anaconda来安装一切 spyder是python科学计算IDE,类似matlab.这是一个基于Qt的软件,如果使用pip install安装,会出现各种bug.pip install spy ...

  8. Anaconda使用

    转自PeterYuan   序 Python易用,但用好却不易,其中比较头疼的就是包管理和Python不同版本的问题,特别是当你使用Windows的时候.为了解决这些问题,有不少发行版的Python, ...

  9. Conda常见命令

    Anaconda,Miniconda,Conda,Pip的区别: Anaconda:用于科学计算的python发行版,里面预装好了conda,某个版本的python,众多packages,科学计算工具 ...

随机推荐

  1. 学习Zookeeper需要了解的专业名词

    一.Zookeeper的集群角色 Leader:该角色是整个zookeeper集群工作机制中的核心 Follower:该角色是zookeeper集群状态的跟随者 Observer:在集群中充当观察者的 ...

  2. 在MFC下面实际演示CCriticalSection 的使用

    Q:CCriticalSection是什么? A:CCriticalSection是一种线程同步策略 或者说技术 或者方法  总之呢就是这么个意思.... 参考资料: http://blog.csdn ...

  3. zen-cart 一页支付实现方法

    1.下载插件CSS JS Loader 和 Fast and Easy Checkout for Zen Cart,插件请下载附件 2.先把CSS JS Loader覆盖,后台选项点击,点击后,程序会 ...

  4. 三张图看遍Linux性能监控、测试、优化工具

    Linux 平台上的性能工具有很多,眼花缭乱,长期的摸索和经验发现最好用的还是那些久经考验的.简单的小工具.系统性能专家 Brendan D. Gregg在最近的 LinuxCon NA 2014 大 ...

  5. [转]Raanan Fattal - Image and Video Upscaling from Local Self-Examples 图像放大

    转自:http://www.sigvc.org/bbs/thread-1032-1-1.html 论文链接:http://www.cs.huji.ac.il/~raananf/projects/lss ...

  6. rz时提示command not found

    -bash: rz: command not found rz命令没找到? 执行sz,同样也没找到.     安装lrzsz: # yum -y install lrzsz   现在就可以正常使用rz ...

  7. imx6q android 添加开机启动脚本

    1.在xx/out/target/product/sabresd_6dq/root/init.rc中添加以下内容 ========================================== ...

  8. 【分库分表】sharding-jdbc—分片策略

    一.分片策略 Sharding-JDBC认为对于分片策略存有两种维度: 数据源分片策略(DatabaseShardingStrategy):数据被分配的目标数据源 表分片策略(TableShardin ...

  9. Python3.x:chrome运行webdriver脚本提示--ignore-certificate-errors

    Python3.x:chrome运行webdriver脚本提示--ignore-certificate-errors 1,分析原因: 根本原因是Chromedriver和Chrome的版本不兼容: 网 ...

  10. 20145307第七周JAVA学习报告

    20145307<Java程序设计>第七周学习总结 教材学习内容总结 Lambda Lambda语法概述: Arrays的sort()方法可以用来排序,在使用sort()时,需要操作jav ...