- 博客(9)
- 资源 (5)
- 收藏
- 关注
转载 L0,L1,L2正则化
在机器学习的概念中,我们经常听到L0,L1,L2正则化,本文对这几种正则化做简单总结。1、概念L0正则化的值是模型参数中非零参数的个数。L1正则化表示各个参数绝对值之和。L2正则化标识各个参数的平方的和的开方值。2、先讨论几个问题:1)实现参数的稀疏有什么好处吗?一个好处是可以简化模型,避免过拟合。因为一个模型中真正重要的参数可能并不多,如果考虑所有的参数起作用,那么可以对训练数据可以预测的很好,...
2018-04-23 22:26:46 177
原创 Jupyter Notebook基本操作
Jupyter Notebook基本操作Jupyter Notebook服务启动与停止Jupyter Notebook常用快捷键1模式切换2命令模式快捷键3编辑模式快捷键Jupyter Notebook中Matplotlib绘图1.Jupyter Notebook服务启动与停止环境为Windows10系统首先进入命令提示符cmd,用cd命令切换到工作目录,这里不做详细解释,可自行百度键入命令jup...
2018-04-20 21:25:04 563
转载 期望风险、经验风险、结构风险的关系
要区分这三个概念,需要先讲一下损失函数L(Y,f(x))的概念。损失函数:针对单个具体样本,表示模型预测值与真实样本值之间的差距。损失函数越小,说明模型对于该样本预测越准确。常见损失函数有0-1损失函数、平方损失函数、绝对损失函数、对数损失函数(对数似然损失函数)。经验风险:对所有训练样本都求一次损失函数,再累加求平均。即,模型f(x)对训练样本中所有样本的预测能力。所谓经验风险最小化即对训练集中...
2018-04-09 23:08:56 726
原创 matplotlib中pyplot中add_subplot方法简介
今天使用matplotlib中pyplot进行绘图的时候,遇到一些疑惑,现在整理如下:import matplotlib.pyplot as pltfrom numpy import *fig = plt.figure()ax = fig.add_subplot(349)ax.plot(x,y)plt.show()参数349的意思是:将画布分割成3行4列,图像画在从左到右从上到...
2018-04-06 15:57:17 7349
转载 Jacobian矩阵和Hessian矩阵
1. Jacobian在向量分析中, 雅可比矩阵是一阶偏导数以一定方式排列成的矩阵, 其行列式称为雅可比行列式. 还有, 在代数几何中, 代数曲线的雅可比量表示雅可比簇:伴随该曲线的一个代数群, 曲线可以嵌入其中. 它们全部都以数学家卡尔·雅可比(Carl Jacob, 1804年10月4日-1851年2月18日)命名;英文雅可比量”Jacobian”可以发音为[ja ˈko bi ən]或者[ʤ...
2018-04-02 14:48:39 155
原创 Binary Tree Preorder Traversal
Given a binary tree, return the preorder traversal of its nodes' values.ExampleGiven: 1 / \ 2 3 / \4 5return [1,2,4,5,3].class Solution { public: vector<int> preorderTrave...
2018-04-01 18:25:49 93
原创 Binary Tree Level Order Traversal
Given a binary tree, return the level order traversal of its nodes' values. (ie, from left to right, level by level).For example:Given binary tree {3,9,20,#,#,15,7}, 3 / \ 9 20 / \ 15...
2018-04-01 17:29:00 114
原创 Insert Node in a Binary Search Tree
Given a binary search tree and a new tree node, insert the node into the tree. You should keep the tree still be a valid binary search tree. Can you do it without recursion?递归/** * Definition of Tree...
2018-04-01 17:11:25 178
原创 Balanced Binary Tree
题目如下Given a binary tree, determine if it is height-balanced.For this problem, a height-balanced binary tree is defined as a binary tree in which the depth of the two subtrees of every node never diffe...
2018-04-01 16:40:20 115
XV6阅读报告(包含进程线程、内存管理、文件系统和中断与系统调用)
2018-01-22
New Directions in Cryptography(diffie-hellman)
2017-09-14
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人