摘要: 一、Linear Models' Bias 上篇学习机器学习一文中,所构造的 $y = b + wx_0$ 函数是一个linear model亦即线性模型,但是linear models有缺陷的——它过于简单了。实际应用中,我们所面临的不会只是一个简单的linear model,因此我们需要更复杂的 阅读全文
posted @ 2024-04-16 15:41 GeekDragon 阅读(30) 评论(0) 推荐(0) 编辑
摘要: 说明:本人正在跟随台大李宏毅老师的课程学习,为了加强学习效果,特写成blog来记录,所有博客中的图片均截取自李宏毅老师的PPT。 一、机器学习是在干什么? 以中学时代所学的函数为例,做应用题时我们都会建立相应的正比例函数、二次函数等来解决,给定一个自变量x都能得到唯一的因变量y。现在我想找到一个函数 阅读全文
posted @ 2024-04-15 16:43 GeekDragon 阅读(31) 评论(0) 推荐(0) 编辑
摘要: B:AIQP操作 考察:vector容器的基本操作 #include <iostream> #include <vector> #include <string> #include <algorithm> using namespace std; vector<int> v; int n, m; i 阅读全文
posted @ 2024-03-23 14:04 GeekDragon 阅读(3) 评论(0) 推荐(0) 编辑
摘要: 2021 5:由二叉树前々序列和中々序列得到后々序列列 #include <iostream> #include <unordered_map> using namespace std; const int N = 50010; int n; int a[N], b[N]; //前序,中序 unor 阅读全文
posted @ 2024-03-22 19:52 GeekDragon 阅读(2) 评论(0) 推荐(0) 编辑
摘要: B:数字配对 考察:map容器的应用 #include <iostream> #include <algorithm> #include <map> using namespace std; int n; map<int, int> mp; int main() { cin >> n; for(in 阅读全文
posted @ 2024-03-21 20:07 GeekDragon 阅读(3) 评论(0) 推荐(0) 编辑
摘要: A:连续字母 #include <iostream> #include <string.h> #include <algorithm> using namespace std; const int N = 110; int n; char str[N]; int main() { cin >> n; 阅读全文
posted @ 2024-03-21 11:16 GeekDragon 阅读(4) 评论(0) 推荐(0) 编辑
摘要: C:架线方案 考察:最小生成树 Prim解决: #include <iostream> #include <cstring> using namespace std; const int N = 1010, INF = 0x3f3f3f3f; int k, n, m; //k组数,n个城市,m条线 阅读全文
posted @ 2024-03-20 18:26 GeekDragon 阅读(1) 评论(0) 推荐(0) 编辑
摘要: 余近日复习C#之基础知识,故作一随笔,也是对此前几篇博客中所记录的传值参数相关内容之汇总,还望诸位加以批评指正。 该博客包括以下内容: 传值参数 引用参数 输出参数 数组参数 具名参数 可选参数 扩展方法(this参数) 传值参数 C#语言规范中道:“声明时不带修饰符的形参是值形参。一个值形参对应于 阅读全文
posted @ 2018-11-11 17:09 GeekDragon 阅读(2163) 评论(0) 推荐(3) 编辑
摘要: 余初学算法,题目较易,望诸大神指正而勿喷。 一、将一个正整数分解质因数。例如:输入90,打印出打印出90=2*3*3*5。 二、输入两个正整数m和n,求其最大公约数和最小公倍数。 两种方案:1、欧几里德算法(辗转相除法);2、更相减损术 三、求s=a+aa+aaa+aaaa+aa...a的值,其中a 阅读全文
posted @ 2018-10-28 16:06 GeekDragon 阅读(427) 评论(0) 推荐(0) 编辑
摘要: 一、列出Fibonacci数列的前N个数 二、求出Fibonacci数列第N个数字(递归) 三、古典问题:有一对兔子,从出生后第3个月起每个月都生一对兔子,小兔子长到第三个月后每个月又生一对兔子,假如兔子都不死,问每个月的兔子总数为多少? 问题分析:其兔子数目依旧是按1,1,2,3,5…的顺序进行排 阅读全文
posted @ 2018-10-24 16:47 GeekDragon 阅读(512) 评论(0) 推荐(0) 编辑