#! /usr/bin/env/python3 # -*- coding: utf-8 -*- import numpy as np print('hello world!') int_a=3 int_b=int_a print(id(int_a),id(int_b)) int_a=5 print(... ...
分类:
编程语言 时间:
2017-08-24 00:15:51
阅读次数:
185
pandas 安装方法:pip3 install pandas pandas是一个强大的Python数据分析的工具包,它是基于NumPy构建的模块。 pandas的主要功能: 具备对其功能的数据结构DataFrame、Series 集成时间序列功能 提供丰富的数学运算和操作(实质是NumPy提供的) ...
分类:
其他好文 时间:
2017-08-23 10:24:54
阅读次数:
186
import os,math os.environ['TF_CPP_MIN_LOG_LEVEL']='2' import tensorflow as tf import numpy as np import matplotlib.pyplot as plt x_data = np.array([[0... ...
分类:
其他好文 时间:
2017-08-22 20:51:57
阅读次数:
124
可以来我的Github看原文,欢迎交流。 https://github.com/AsuraDong/Blog/blob/master/Articles/%E6%9C%BA%E5%99%A8%E5%AD%A6%E4%B9%A0/numpy%E6%95%B0%E7%BB%84%E3%80%81%E5%9 ...
分类:
编程语言 时间:
2017-08-22 19:50:48
阅读次数:
454
《Machine Learning in Action》 为防止连续乘法时每个乘数过小,而导致的下溢出(太多很小的数相乘结果为0,或者不能正确分类) 训练: 分类: 注意:上述代码中标有注意的地方,是公式中概率连乘变成了对数概率相加。此举可以在数学上证明不会影响分类结果,且在实际计算中,避免了因概率 ...
分类:
其他好文 时间:
2017-08-22 00:21:03
阅读次数:
191
http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy numpy?1.13.1+mkl?cp36?cp36m?win_amd64.whl 注意:安装的是numpy+mkl的 pip3 install numpy?1.13.1+mkl?cp36?cp36m? ...
分类:
其他好文 时间:
2017-08-20 21:05:41
阅读次数:
252
pandas a.基本使用 #结构化的数据分析 pip3 install jupyter pip3 install pandas #import pandas as pd #import numpy as np #事例一: #s = pd.Series([1,3,5,np.NaN,8,4]) #s ...
分类:
其他好文 时间:
2017-08-20 21:05:32
阅读次数:
304
1.Numpy简介 NumPy系统是Python的一种开源的数值计算扩展,一个用python实现的科学计算包。 2.下载 下载地址:https://pypi.python.org/pypi/numpy#downloads 由于我的python版本是3.6的,所以下载了numpy 1.13.1,win ...
分类:
编程语言 时间:
2017-08-20 18:36:42
阅读次数:
247
一. Numpy 常用操作 a. xxxx import numpy as np print(np.arange(1,11)) #[ 1 2 3 4 5 6 7 8 9 10] print(np.arange(1,11).reshape([2,5])) # [ # [ 1 2 3 4 5] # [ ...
分类:
其他好文 时间:
2017-08-20 18:34:18
阅读次数:
196
使用 Matplotlib Matplotlib 中有直方图绘制函数:matplotlib.pyplot.hist()它可以直接统计并绘制直方图。你应该使用函数 calcHist() 或 np.histogram()统计直方图。 1 使用pyplot.hist() 显示灰度图像直方图,代码如下: 2 ...
分类:
其他好文 时间:
2017-08-20 11:26:44
阅读次数:
348