- 博客(142)
- 收藏
- 关注
原创 【机器学习】监督学习经典模型
分类学习包括判断是非,多分类问题等等。包括数字识别,新闻分类,物种鉴定,肿瘤判定等等。线性分类器未来预期效果 = 每个维度的特征 * 所在维度的权重 + b截距,然后利用logistic函数将F的数据映射到01上,得到结果。Logistic Regression:擅长精确的计算,但是消耗很多资源。SGD Classifier:擅长大数据(10W+),模型性能略低。支持向量机(分类)根...
2019-12-31 13:57:02
727
原创 【操作系统】进程管理
总结进程1.组成&特点PCB,程序段,数据段;资源分配和调度的独立单位。 2.七状态&四变化 3.控制操作 4.进程通信共享存储:消息传递:管道通信:...
2019-10-16 22:13:34
300
原创 原码,反码,补码几个容易犯错的小问题
Code输入原码,可以得到反码和补码的值。这段代码用来测试原码和补码转换的问题。#include <iostream>#include <string>using namespace std;int main(){ while(1){ cout<<"输入原码,整数的符号位一定要写0"<<endl; string s; cin&...
2019-10-12 15:57:15
297
原创 【组成原理】输入/输出系统
总结外部设备1.输入/输出设备键盘,鼠标,打印机,显示器。(常考问题)显示器:VRAM容量 = 分辨率 * 灰度级位数。VRAM带宽 = 分辨率 * 灰度级位数。 2.外存储器磁盘,固态(F M),磁盘阵列(多个磁盘合起来),磁盘。(常考问题)磁盘&磁盘计算问题驱动器号柱面(磁道)号盘面号扇区号平均存取时间 = 平均寻道时间 + 旋转...
2019-10-11 17:37:54
299
原创 【机器学习:实战】利用tensorflow识别衣物
简述Fashion MnistFashion mnist 是一个衣物数据集,集成在keras中可以直接使用。本文记录了一步一步利用 Fashion minst 的数据库训练 tensorflow 神经网络。Step1:导入所有的模块...
2019-09-21 14:47:19
1191
原创 【408极简笔记】平衡二叉树
Q1:为什么要设置平衡二叉树?为了保证二叉搜索树的深度不会太深,出现”单边行情“。单边行情的意思就是只有一边,而另一边子树什么也没有。Q2:如何判定平衡还是不平衡?设置一个平衡因子。平衡因子 = 结点的左子树深度 - 右子树深度。规定平衡因子只能是 -1,0,1。Q3:如何插入使得二叉排序树可以平衡?整体思路:先插入,再调整。Step1:先按照二叉排序树的方式插入这个结点。...
2019-09-11 11:35:47
380
原创 1150 Travelling Salesman Problem (25 分)
matter1.freopen的使用。非常方便测试。2.逗号的使用也可以让代码简洁。code#include<iostream>#include<algorithm>#include<vector>using namespace std;const int MAXN = 205;const int INF = 10000000;in...
2019-09-07 21:40:28
163
原创 1149 Dangerous Goods Packaging (25 分)
matter纯粹的一道模拟题。code#include<iostream>#include<unordered_map>#include<vector>using namespace std;const int MAXN = 100000;int main(){ int n , m , l , a , b; unordered_ma...
2019-09-07 13:27:52
185
原创 1147 Heaps (30 分)
matter后面的难度绝对没有前面的难。前面有些题真的太难了。很多模拟都做不出来。1.给出一个层序遍历可以利用结点和其左右孩子的关系直接进行前中后序遍历。2.对于三位运算符的使用要多使用。code#include<iostream>#include<vector>using namespace std;const int MAXN = 1005;...
2019-09-06 21:57:22
145
原创 Bonstop算法模板(自创 + 整理)
目录图:DFSBFSDijkstra图:DFSconst int MAXV = 1000;const int INF = 1000000000;//邻接矩阵int n , G[MAXV][MAXV];bool vis[MAXV] = {false};void DFS(int u , depth){ vis[u] = true; for(int ...
2019-09-02 21:47:23
170
原创 1027 Colors in Mars (20 point(s))
matter这个地方注意其实本身只会有两位,所以只需要存一次即可。code#include<iostream>#include<cstdio>using namespace std;int main() { int a , b , c; char trans[14] = {'0' , '1' , '2' , '3' , '4' , '5' , '6...
2019-08-28 19:55:26
164
原创 1019 General Palindromic Number (20 point(s))
matter判断回文和判断进制转换。code#include<iostream>#include<cstdio>#include<vector>using namespace std;bool judge(vector<int> v){ for(int i = 0 ; i <= v.size() / 2 ; i ++)...
2019-08-28 19:53:35
158
原创 1042 Shuffling Machine (20 point(s))
matter1.好蠢的输出。2.只是修改位置而不是修改整个的内容。对下标直接进行修改code#include<iostream>using namespace std;int main(){ int n , id[55] , start[55] , end[55]; scanf("%d" , &n); //intilization the id...
2019-08-27 22:01:26
174
原创 1015 Reversible Primes (20 point(s))
matter1.判断素数的时候注意三点:1.检查特判;2.sqr的转换因为sqrt需要是个float类型;3.循环之中需要对整除这种情况进行判断,所以需要有个等于。2.模板:进制转换模板//十进制转换其他进制while(N > 0){ d[len ++] = N % D; N /= D; }//radix D to 10 conversion for(int i...
2019-08-26 20:24:41
171
原创 1094 The Largest Generation (25 point(s))
matter模板:DFS求每层深度code#include<iostream>#include<vector>using namespace std;vector<int> child[105];int level[105] = { 0 };int maxdepth = 0;void DFS(int root , int depth...
2019-08-25 22:05:49
161
原创 1079 Total Sales of Supply Chain (25 point(s))
matterDFS的作用:遍历整个树,求树的深度code#include<iostream>#include<vector>#include<cmath>using namespace std;const int MAXN = 100005;double P , R , ans;struct node{ int num; vec...
2019-08-25 21:40:16
113
原创 1090 Highest Price in Supply Chain (25 point(s))
matter不行以后都换成double类型的数据。。。2.模板:利用DFS求树的深度。code#include<iostream>#include<vector>#include<cmath>using namespace std;const int MAXN = 100010;vector<int> child[MAX...
2019-08-25 13:55:05
222
原创 1102 Invert a Binary Tree (25 point(s))
Matter很标准的一道题目,考察了前序遍历,后序遍历,层序遍历,可以作为一个模板使用。Code#include<iostream>#include<queue> #include<algorithm>using namespace std;const int MAXN = 15;int num = 0 , n;bool notroo...
2019-08-24 14:06:55
188
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人