腾讯云
开发者社区
文档
建议反馈
控制台
首页
学习
活动
专区
工具
TVP
最新优惠活动
文章/答案/技术大牛
搜索
搜索
关闭
发布
登录/注册
首页
学习
活动
专区
工具
TVP
最新优惠活动
返回腾讯云官网
数据处理
专栏作者
举报
97
文章
147946
阅读量
33
订阅数
订阅专栏
申请加入专栏
全部文章(97)
其他(25)
python(16)
编程算法(10)
tensorflow(5)
函数(4)
数据库(3)
spark(3)
numpy(3)
递归(3)
scala(2)
正则表达式(2)
二叉树(2)
scikit-learn(2)
数据分析(2)
sas(2)
root(2)
机器学习(1)
java(1)
c 语言(1)
actionscript(1)
sql(1)
ide(1)
matlab(1)
神经网络(1)
爬虫(1)
shell(1)
ssh(1)
卷积神经网络(1)
hive(1)
面向对象编程(1)
决策树(1)
selenium(1)
大数据(1)
安全(1)
unicode(1)
code(1)
count(1)
distribution(1)
driver(1)
foreach(1)
gaussian(1)
having(1)
init(1)
lambda(1)
map(1)
media(1)
nan(1)
object(1)
random(1)
regression(1)
sh(1)
sleep(1)
space(1)
txt(1)
vim(1)
遍历(1)
登录(1)
脚本(1)
权限(1)
事件(1)
搜索(1)
系统(1)
压缩(1)
搜索文章
搜索
搜索
关闭
pandas操作一列数据
其他
def tt(x): if x.name == "distribution": return [el[0:10] for el in x.values] else: return x test1 = test.apply(tt)
用户1733462
2018-12-05
1.9K
0
hive sql练习1
其他
参考 DROP TABLE student; create TEMPORARY TABLE student ( sid string, sname string, sage int, ssex string ); INSERT into student values("01","zhaolei",19900101,"M"); INSERT into student values("02","qiandian",19901221,"M"); INSERT into student values
用户1733462
2018-10-10
661
0
hive sql练习
其他
参考 -- 创建学生表,学号,姓名,性别,年龄,班级 DROP TABLE student; CREATE TEMPORARY TABLE student( Sno int, Sname VARCHAR(20), Sex VARCHAR(20), Sage int, Sdept VARCHAR(20) ); -- 创建 课程表, 课程编号,课程名称 DROP TABLE course; create TEMPORARY TABLE course( Cno int, Cname
用户1733462
2018-10-10
2.7K
0
回归
其他
看一下损失函数的导函数tanh(x),当x偏离0时,tanh(x)趋向+1或者-1
用户1733462
2018-09-20
371
0
Home Depot Product Search Relevance
其他
kaggle赛题链接Home Depot Product Search Relevance,这个题目关键点就是特征提取,给的数据需要观察处理
用户1733462
2018-08-13
580
0
Bagging与Boosting
其他
加载数据 import pandas as pd df_wine = pd.read_csv('http://archive.ics.uci.edu/ml/machine-learning-databases/wine/wine.data', header=None) df_wine.columns = ['Class label', 'Alcohol', 'Malic acid', 'Ash', 'Alcalinity of
用户1733462
2018-07-04
287
0
149. Max Points on a Line - 草稿
其他
Given n points on a 2D plane, find the maximum number of points that lie on the same straight line. 这个题目难不是很难,建立一个dict,斜率:该斜率上点的个数,算斜率特别要注意,如果使用Fraction(3,4),则会非常影响性能,使用np.longdouble(1)满足要求,真是坑爹。 from fractions import Fraction from collections import defau
用户1733462
2018-06-07
246
0
制图之一
其他
""" ======================================================= Controlling style of text and labels using a dictionary ======================================================= This example shows how to share parameters across many text objects and labels by c
用户1733462
2018-06-07
338
0
图片RGB三维矩阵的表示
其他
一个图片有三个通道RGB,每个通道就是一层数据 以一个图片为例子,从图片数据,再由数据到图片转化过程,理解数据与图形以及表示的关系 兔子 from PIL import Image #打开图片 im
用户1733462
2018-06-07
5.7K
0
tensorflow动态加载文件
其他
如果把文件全部加载到内存中,对大数据量来说,是不可行的,tensorflow使用列队,通过多线程来操作队列进出。举例子来说明> tf.train.slice_input_producer是一个tensor生成器,作用是按照设定,每次从一个tensor列表中按顺序或者随机抽取出一个tensor放入文件名队列。 下面这个例子是将文件名加入到队列中,每次从列队中只能取出一个tensor,然后读取图片数据,还是频繁io操作, import tensorflow as tf import matplotlib.
用户1733462
2018-06-07
1.3K
0
函数与反函数
其他
import numpy as np import matplotlib.pyplot as plt def h(x): return np.exp(x) def g(x): return np.log(x) g_start, g_end = 0.1, 4 h_start, h_end = g(g_start), g(g_end) numbers = 100 h_x = np.linspace(h_start, h_end, numbers) g_x = np.linspace(g_sta
用户1733462
2018-06-01
1K
0
图片操作
其他
from PIL import Image I = Image.open('1111.jpg') #I.show() # RGB 转换为灰度图 L = I.convert('L') im_array = np.array(L) print im_array print im_array.shape L.show() from PIL import Image import matplotlib.pyplot as plt img=Image.open('1111.jpg') im_array = np.ar
用户1733462
2018-06-01
543
0
信息
其他
一、如何度量信息 信息量是对信息的度量,香农不仅对信息作了定性描述,还进行了定量分析。 信源发出的信息常常是随机的,具有不确定性。如果信源中某一消息的不确定性越大,一旦发生,并为收信者接到,消除的不
用户1733462
2018-06-01
567
0
re正则表格式
其他
# coding=utf-8 # "正则表达式学习" import re # "match方法的工作方式是只有当被搜索字符串的开头匹配模式的时候它才能找到匹配对象" match = re.match(r'dog', 'dogsdf cat dog') print match.group() # "开头没有匹配cat,将返回None" match = re.match(r'cat', 'dog cat dog') print match # "使用re.search查找匹配任意位置,search方法不会
用户1733462
2018-06-01
607
0
kaggle-识别手写数字
其他
下载数据到本地,加载数据 import numpy as np import csv import pandas as pd def load_data(csv): lines = csv.reader(open(csv)) l = [] for line in lines: l.append(line) return l l = load_data('train.csv') l = np.array(l[1:], dtype=float) train =
用户1733462
2018-06-01
987
0
梯度下降求损失函数Minimizing cost functions with gradient descent
其他
损失函数与梯度,从上图可以看出梯度向下, 偏导数 可以看出计算样本y误差向量乘以样本x列向量,算出w需要使用所有的样本,然后再次迭代 import pandas as pd import numpy as np import matplotlib import matplotlib.pyplot as plt df = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data', header
用户1733462
2018-06-01
510
0
笔记一python代码
其他
import pandas as pd import numpy as np import matplotlib import matplotlib.pyplot as plt df = pd.read_csv('https://archive.ics.uci.edu/ml/machine-learning-databases/iris/iris.data', header=None) y = df.iloc[0:100, 4].values y = np.where(y=='Iris-setosa',1
用户1733462
2018-06-01
550
0
碰运气的约会-几何概率
其他
甲乙2人相约中午12点至1点钟见面,并约定“第一人到达后可以在等第二人10分钟后不见人来就可离去。甲乙2人在12点到1点到达时间是等概率的,假设甲到达时间是x,乙到达时间是y,则见面的必有 |x-y|<=10,0<=x<=60,0<=y<=60 变成一个线性规划问题 import matplotlib.pyplot as plt import numpy as np x = np.linspace(0,60,60) y1 = [min(max(xi-10,0),60) for xi in x] y2
用户1733462
2018-06-01
441
0
Guess Number Higher or Lower II
其他
Guess Number Higher or Lower II 这个题目还是蛮有意思的 给定整数n,假定我选中的数1到n中的C,我只提示你猜的数与C的大小关系,这样你就可以缩小范围,继续猜测,但是你猜错数字,就要支付等值的美元,我为了获得更多的美元,会通过高低引导你,比如 n = 10 1,2,3,4,5,6,7,8,9,10 这时候如果你第一次选中9,我要是提示你猜小了,则你下一个就可以猜出10,因为只有一个数可以选择,那么我只能得到9美元,如果我告诉你猜高了,还有很多数字可选,这样我也可以获得更
用户1733462
2018-06-01
514
0
scipy算积分有bug
其他
import scipy as sp import numpy as np from sympy import * import matplotlib.pyplot as plt def fun(x): return [np.sin(el)/el for el in x] end = 100 trap = 10000 x = np.linspace(0.001, end, trap) y = fun(x) #分割近似求积分 print sum(y)*end/trap*2 print scipy
用户1733462
2018-06-01
561
0
点击加载更多
社区活动
腾讯技术创作狂欢月
“码”上创作 21 天,分 10000 元奖品池!
立即发文
Python精品学习库
代码在线跑,知识轻松学
立即查看
博客搬家 | 分享价值百万资源包
自行/邀约他人一键搬运博客,速成社区影响力并领取好礼
立即体验
技术创作特训营·精选知识专栏
往期视频·千货材料·成员作品 最新动态
立即查看
领券
问题归档
专栏文章
快讯文章归档
关键词归档
开发者手册归档
开发者手册 Section 归档