
算法
文章平均质量分 84
involute__
这个作者很懒,什么都没留下…
展开
-
数字图像处理(持续更新)
数字图像处理图像插值算法最近邻插值双线性插值插值算法参考图像插值算法了解插值算法原理掌握OpenCV框架下插值算法API的使用设h(x,y)h(x, y)h(x,y)为原图像, f(x,y)f(x, y)f(x,y)为目标图像f(dstX,dstY)=h(dstXsrcWidthdstWidth,dstYsrcHeightdstHeight)\begin{array}{c}f(dst_{X}, dst_{Y}) = h(\frac{dst_{X}src_{Width}} {dst_{W原创 2021-09-14 11:07:59 · 282 阅读 · 0 评论 -
Nesterov加速算法
8.2 最优化 Nesterov加速算法理论介绍Lipschitz 连续Lipschitz 连续: 在一个连续函数fff上面额外施加了一个限制,要求存在一个常数K≥0K \geq 0K≥0使得定义域内的任意两个元素x1x_1x1 和 x2x_2x2 都满足∣f(x1)−f(x2)∣≤K∣x1−x2∣|f(x_1) - f(x_2)| \leq K |x_1 - x_2|∣f(x1)−f(x2)∣≤K∣x1−x2∣此时称函数 fff的Lipschitz常数为 K。简单理解,就是 f原创 2021-07-29 12:57:45 · 4087 阅读 · 0 评论 -
CTF-Hgame_accuracy_writeup
把相关的代码记录一下, 方便以后使用accuracy石碑上的文字,究竟隐藏着怎样的秘密……Write Up题目给出两个文件, chars.csv dataset.csv,简单查看之后,dataset是数据集, chars是测试集数据集是由784个pixel, 即 28 * 28df.iloc[:,0].unique()#array([10, 11, 12, 13, 14, 15, 1, 0, 4, 7, 3, 5, 8, 9, 2, 6])查看标签,共有1原创 2021-07-29 12:21:38 · 532 阅读 · 0 评论 -
Hands-on-data-analysis 动手数据分析
动手数据分析笔记第一章第一节 数据载入及初步观察数据载入df = pd.read_csv('file_path')df2 = pd.read_table('file_path')read_csv 函数见优快云 博客: https://blog.youkuaiyun.com/weixin_39175124/article/details/79434022问:read_csv 和 read_table 区别?函数说明read_csv从文件、URL、文件型对象中加载带分隔符的原创 2021-07-27 23:56:48 · 572 阅读 · 0 评论 -
Gradient_Algorithm
《最优化理论》 课程作业, 梯度类算法 解决 LASSO问题LASSO问题对于 LASSO问题minx12∥Ax−b∥22+μ∥x∥1.\displaystyle\min_x \frac{1}{2}\|Ax-b\|_2^2 + \mu \|x\|_1.xmin21∥Ax−b∥22+μ∥x∥1.此问题为回归问题,而对于回归问题其实本质就是一个函数拟合的过程,模型不能太过复杂,否则很容易发生过拟合现象,所以我们就要加入正则化项,而对于LASSO问题,采用L1正则化,会使得部分学习到的特征原创 2021-07-26 14:54:42 · 630 阅读 · 0 评论 -
LightGBM_Learning
LightGBM 原理LightGBM 由微软提出,主要解决 GDBT 在海量数据中遇到的问题,可以更好更快地用于工业实践中。LightGBM的贡献单边梯度抽样算法;直方图算法;互斥特征捆绑算法;深度限制的 Leaf-wise 算法;类别特征最优分割;特征并行和数据并行;缓存优化;LightGBM超参数解析https://lightgbm.readthedocs.io/en/latest/Parameters.htmlimport lightgbm as lgbfrom sk原创 2021-07-24 14:07:43 · 326 阅读 · 0 评论 -
Project_Euler_30-40
题目描述In the United Kingdom the currency is made up of pound (£) and pence §. There are eight coins in general circulation:1p, 2p, 5p, 10p, 20p, 50p, £1 (100p), and £2 (200p).It is possible to make £2 in the following way:1×£1 + 1×50p + 2×20p + 1×5p +原创 2021-07-19 00:18:41 · 159 阅读 · 0 评论 -
IntegratedLearning_Task02集成学习
Datawhale 集成学习 Task02 笔记一个完整的机器学习项目分为以下步骤:明确项目任务: 回归 / 分类收集数据集并选择合适的特征。选择度量模型性能的指标。选择具体的模型并进行训练以优化模型。评估模型的性能并调参。数据约定如下:第i个样本:xi=(xi1,xi2,...,xip,yi)T,i=1,2,...,Nx_i=(x_{i1},x_{i2},...,x_{ip},y_i)^T,i=1,2,...,Nxi=(xi1,xi2,...,xip,yi)T,i=1,2原创 2021-07-18 19:49:46 · 202 阅读 · 0 评论 -
Project_Euler_20-30
Amicable numbers题目描述Let d(n) be defined as the sum of proper divisors of n (numbers less than n which divide evenly into n).If d(a) = b and d(b) = a, where a ≠ b, then a and b are an amicable pair and each of a and b are called amicable numbers.For exa原创 2021-07-17 15:41:17 · 227 阅读 · 0 评论 -
Project_Euler_10-20
会随着刷题不断更新。。。。前面的没想着要写笔记,就没有存下代码,故从Problem11来记录代码全由Python实现。 10~20题Largest product in a grid题目描述In the 20×20 grid below, four numbers along a diagonal line have been marked in red.08 02 22 97 38 15 00 40 00 75 04 05 07 78 52 12 50 77 91 0849 49 99 4原创 2021-07-16 21:55:54 · 208 阅读 · 0 评论 -
Bit_operation
n & 1 # 取最低位, 判断奇偶数n & (n - 1)判断奇偶数 : x & 1 取最低位获取二进制位是1还是0交换两个整数变量的值:a = a ^ bb = a ^ ba = a ^ b异或,可以理解为不进位加法例题:找出数组中唯一重复的数字1 2 2 3# input : nums = [1,2,2,3]nums.extend(set(nums))tmp = nums[0]for i in range(1, length): tmp =原创 2021-07-15 18:01:48 · 80 阅读 · 0 评论 -
线性筛求约数个数
author: “xingyu”author_link: “”title: “线性筛求约数个数”date: 2021-01-20T16:59:56+08:00lastmod: 2021-01-20T16:59:56+08:00draft: falsedescription: “”show_in_homepage: truedescription_as_summary: falselicense: “”tags: [“Algorithm”]categories: [“Algorithm.原创 2021-07-14 14:08:27 · 328 阅读 · 0 评论