先安装好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. js自动类型转换

    <script> testeq0 = null == undefined; testeq1 = "0" == 0; //比较前字符串转换为数字 testeq2 = 0 ...

  2. vue指令与组件

    参考http://blog.csdn.net/lioldamon/article/details/74058222?utm_source=itdadao&utm_medium=referral ...

  3. RabbitMQ、Memcache、Redis RabbitMQ

    RabbitMQ 解释RabbitMQ,就不得不提到AMQP(Advanced Message Queuing Protocol)协议. AMQP协议是一种基于网络的消息传输协议,它能够在应用或组织之 ...

  4. USBasp制作资料及全过程(菜鸟版)

    源:USBasp制作资料及全过程(菜鸟版) 一.usbasp 的一般性介绍: 1.下载线,是“ISP”(In System Programmability:“在系统编程”)或“IAP”(In Appl ...

  5. 20145302张薇《Java程序设计》第九周学习总结

    20145302 <Java程序设计>第九周学习总结 教材学习内容总结 第十六周 JDBC简介 撰写应用程序是利用通信协议对数据库进行指令交换,以进行数据的增删查找 JDBC目的:让Jav ...

  6. v4l2的学习建议和流程解析

    v4l2,一开始听到这个名词的时候,以为又是一个很难很难的模块,涉及到视频的处理,后来在网上各种找资料后,才发现其实v4l2已经分装好了驱动程序,只要我们根据需要调用相应的接口和函数,从而实现视频的获 ...

  7. Quick Search FAQ

    Q: Why does it jump to an incorrect page? A: Some categories, such as twitter, may need to log in in ...

  8. javaWeb中JNDI的使用,为什么要加java:comp/env前缀

    转载自(http://blog.csdn.net/guodongsoft/article/details/52399527) 我们在使用JNDI调用某个对象时,会有下述两种方式 context.loo ...

  9. AVL模板

    感谢此博客 #include <bits/stdc++.h> #define pb push_back #define mp make_pair #define de(x) cout &l ...

  10. Vjudge - F - 比前面更简单的模拟

    2017-07-16 07:31:35 writer:pprp 题目介绍:很基础的string用法 题目如下: 读入一个字符串,字符串中包含ZOJ三个字符,个数不一定相等,按ZOJ的顺序输出,当某个字 ...