自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(3)
  • 收藏
  • 关注

转载 ggplot2画图

ggplot2 画图 基本要素 - Data - Mapping - Geometric - Scale - Statistics - Coordinate - Layer - Facet - Theme 查看ggplot2 里的 geom_函数 ls("package:ggplot2" 散点图 geom_point() x+y p <- ggplot(data = st.kilda, mapping = aes(x = BuildingArea, y = Price/1000))

2020-09-02 23:51:58 935

转载 Python re 正则表达式

Python re 正则表达式 菜鸟教程:link import re x = 'A123fsai?13djsf' y = '?as3211mkleg+ewrwyi' pattern = re.compile('\w+',re.I) # re.match(pattern, string, flags=0) 只检查字符串起始位置 m1 = re.match(pattern, x) m2 = re.match(pattern, y) print("m1 = ", m1) print("m2 = ", m2)

2020-08-30 14:22:46 265

原创 COMP5318 Python Numpy 求余弦相似度 欧几里得距离

Python求余弦相似度 import numpy as np import math x = [3, 1, 2, 4] y = [1, 2, 1, 2] def dotProduct(v1, v2): v1 = np.mat(v1) v2 = np.mat(v2) z = v1 * v2.T return z cosine_sim = dotProduct(x, y)/math.sqrt(dotProduct(x, x) * dotProduct(y, y)) p

2020-08-29 20:07:15 913

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除