- 博客(417)
- 收藏
- 关注
原创 【温故而知新】高斯判别分析(Gaussian Discriminant Analysis)
给定数据集;概率判别模型是直接去求,如下: 高斯判别分析是一种概率生成模型,这里我们需要最大化后验概率估计,对于二分类,高斯判别分析并不是直接去求和的值,而是去比较与的大小关系,而是对联合概率进行建模;由贝叶斯公式可知, 此处,与无关,所以正比于,其中,是posterior,是likehood,是piror。GDA假...
2020-02-05 22:41:42 736
原创 【温故而知新】线性判别分析(Linear Discriminant Analysis)
线性判别分析(Linear Discriminant Analysis, LDA)是一种经典的线性分类方法。LDA的基本思想:给定训练数据集,设法将样本投影到一条直线上,使得同类样本的投影点尽可能的接近,不同类样本的投影点尽可能远离;在对新来样本进行分类时,首先将其投影到直线上,再根据投影点的位置来判断样本所属的类别。即:类内小,类间大("高内聚,松耦合")给定数据集,在这里我们将记为...
2020-02-04 21:33:37 846
原创 【温故而知新】线性回归(Linear Regression)
本文主要以下几个角度来讲解线性回归:最小二乘法LSE(矩阵表达,几何意义) 概率角度:最小二乘法LSE——noise为Gaussian MLE 正则化: L1——Lasso L2——Ridge 正则化的几何解释最小二乘法定义为:通过给定样本数据集, , ,试图学习到这样的一个模型,使得对于任意的输入特征向量,模型的预测输出能够表示为输入特征向量的线性函数,即满足: ...
2020-02-04 00:13:41 934
原创 [LeetCode 解题报告]155. Min Stack
Design a stack that supports push, pop, top, and retrieving the minimum element in constant time.push(x) -- Push element x onto stack. pop() -- Removes the element on top of the stack. top() -- Ge...
2020-02-01 17:00:24 180
原创 [LeetCode 解题报告]154. Find Minimum in Rotated Sorted Array II
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7]might become [4,5,6,7,0,1,2]).Find the minimum element.The array may contai...
2020-02-01 16:53:29 156
原创 [LeetCode 解题报告]153. Find Minimum in Rotated Sorted Array
Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e., [0,1,2,4,5,6,7]might become [4,5,6,7,0,1,2]).Find the minimum element.You may assume no du...
2020-02-01 16:28:34 149
原创 [LeetCode 解题报告]152. Maximum Product Subarray
Given an integer arraynums, find the contiguous subarray within an array (containing at least one number) which has the largest product.Example 1:Input: [2,3,-2,4]Output: 6Explanation:[2,3] ...
2020-02-01 16:09:35 133
原创 [LeetCode 解题报告]151. Reverse Words in a String
Given an input string, reverse the string word by word.Example 1:Input: "the sky is blue"Output:"blue is sky the"Example 2:Input: " hello world! "Output:"world! hello"Explanation: ...
2020-02-01 14:28:56 148
原创 [LeetCode 解题报告]150. Evaluate Reverse Polish Notation
Evaluate the value of an arithmetic expression inReverse Polish Notation.Valid operators are+,-,*,/. Each operand may be an integer or another expression.Note:Division between two integers ...
2020-01-30 22:59:11 187
原创 [LeetCode 解题报告]149. Max Points on a Line
Givennpoints on a 2D plane, find the maximum number of points that lie on the same straight line.Example 1:Input: [[1,1],[2,2],[3,3]]Output: 3Explanation:^|| o| o| o +-----...
2020-01-30 22:48:14 204
原创 [LeetCode 解题报告]148. Sort List
Sort a linked list inO(nlogn) time using constant space complexity.Example 1:Input: 4->2->1->3Output: 1->2->3->4Example 2:Input: -1->5->3->4->0Output: -1-...
2020-01-30 15:00:38 142
原创 [LeetCode 解题报告]147. Insertion Sort List
Sort a linked list using insertion sort.A graphical example of insertion sort. The partial sorted list (black) initially contains only the first element in the list.With each iteration one element...
2020-01-30 14:40:22 188
原创 [LeetCode 解题报告]146. LRU Cache
Design and implement a data structure forLeast Recently Used (LRU) cache. It should support the following operations:getandput.get(key)- Get the value (will always be positive) of the key if th...
2020-01-30 14:37:51 154
原创 [LeetCode 解题报告]145. Binary Tree Postorder Traversal
Given a binary tree, return thepostordertraversal of its nodes' values.Example:Input:[1,null,2,3] 1 \ 2 / 3Output:[3,2,1]Follow up:Recursive solution is trivial, coul...
2020-01-27 17:30:04 163
原创 【darknet源码解析-29】图像RGB2HSV与HSV2RGB格式互转
本系列为darknet源码解析,由于在image.c中涉及到图像的RGB,YUV,HSV格式,在本文我们将image.c中涉及到的rgb_to_hsv()函数以及hsv_to_rgb()函数进行解析. RGB格式转为HSV格式 如果max=0 如果max!=0 对应源码如...
2020-01-22 16:27:33 1096
原创 【darknet源码解析-28】图像RGB2YUV与YUV2RGB格式互转
本系列为darknet源码解析,由于在image.c中涉及到图像的RGB,YUV,HSV格式,在本文我们将image.c中涉及到的rgb_to_yuv()函数以及yuv_to_rgb()函数进行解析.RGB格式转为YUV格式对应函数如下:void rgb_to_yuv(image im){ assert(im.c == 3); int i, j; ...
2020-01-21 20:57:41 741
原创 [LeetCode 解题报告]144. Binary Tree Preorder Traversal
Given a binary tree, return thepreordertraversal of its nodes' values.Example:Input:[1,null,2,3] 1 \ 2 / 3Output:[1,2,3]Follow up:Recursive solution is trivial, could...
2020-01-21 15:11:37 140
原创 [OpenVINO 学习笔记-02] Darknet模型转IR数据格式
本文旨在记录如何将YOLO系列模型转换IR数据格式,所有的YOLO模型最初实现框架是Darkent,而Darknet包含有两个文件:.cfg 模型配置文件 .weights 模型权重文件Intel OpenVINO中并没有直接封装从darknet转换IR的脚本,需要先将Darknet转换Tensorflow,然后再有TensorFlow转换至IR。1. 转换YOLOv3模型到Tenso...
2020-01-20 15:11:42 1655 1
原创 [LeetCode 解题报告]143. Reorder List
Given a singly linked listL:L0→L1→…→Ln-1→Ln,reorder it to:L0→Ln→L1→Ln-1→L2→Ln-2→…You maynotmodify the values in the list's nodes, only nodes itself may be changed.Example 1:Given 1->2-...
2020-01-05 22:44:46 153
原创 [LeetCode 解题报告]142. Linked List Cycle II
Given a linked list, return the node where the cycle begins. If there is no cycle, returnnull.To represent a cycle in the given linked list, we use an integerposwhich represents the position (0-i...
2020-01-04 23:47:24 141
原创 [LeetCode 解题报告]141. Linked List Cycle
Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integerposwhich represents the position (0-indexed)in the linked list where tail co...
2020-01-04 23:41:50 108
原创 [LeetCode 解题报告]140. Word Break II
Given anon-emptystringsand a dictionarywordDictcontaining a list ofnon-emptywords, add spaces insto construct a sentence where each word is a valid dictionary word.Return all such possible ...
2020-01-04 23:37:08 147
原创 [LeetCode 解题报告]139. Word Break
Given anon-emptystringsand a dictionarywordDictcontaining a list ofnon-emptywords, determine ifscan be segmented into a space-separated sequence of one or more dictionary words.Note:The ...
2020-01-04 23:22:15 117
原创 [LeetCode 解题报告]138. Copy List with Random Pointer
A linked list is given such that each node contains an additional random pointer which could point to any node in the list or null.Return adeep copyof the list.The Linked List is represented in ...
2020-01-04 23:19:48 282
原创 [LeetCode 解题报告]137. Single Number II
Given anon-emptyarray of integers, every element appearsthreetimes except for one, which appears exactly once. Find that single one.Note:Your algorithm should have a linear runtime complexity....
2020-01-04 21:40:58 117
原创 [LeetCode 解题报告]136. Single Number
Given anon-emptyarray of integers, every element appearstwiceexcept for one. Find that single one.Note:Your algorithm should have a linear runtime complexity. Could you implement it without us...
2020-01-03 17:12:27 124
原创 [LeetCode 解题报告]135. Candy
There areNchildren standing in a line. Each child is assigned a rating value.You are giving candies to these children subjected to the following requirements:Each child must have at least one ca...
2020-01-03 17:07:16 136
原创 [LeetCode 解题报告]134. Gas Station
There areNgas stations along a circular route, where the amount of gas at stationiisgas[i].You have a car with an unlimited gas tank and it costscost[i]of gas to travel from stationito its ...
2020-01-03 17:00:14 119
原创 [LeetCode 解题报告]133. Clone Graph
Givena reference of a node in aconnectedundirected graph, return adeep copy(clone) of the graph. Each node in the graph contains a val (int) and a list (List[Node]) of its neighbors.Example:...
2020-01-03 11:44:19 192
原创 [LeetCode 解题报告]132. Palindrome Partitioning II
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return the minimum cuts needed for a palindrome partitioning ofs.Example:Input:"aab"Output: 1Explana...
2020-01-03 11:27:02 141
原创 [LeetCode 解题报告]131. Palindrome Partitioning
Given a strings, partitionssuch that every substring of the partition is a palindrome.Return all possible palindrome partitioning ofs.Example:Input:"aab"Output:[ ["aa","b"], ["a","a"...
2019-12-30 23:47:08 137
原创 【darknet源码解析-27】l2norm_layer.h 与 l2norm_layer.c 解析
本系列为darknet源码解析,本次解析为src/l2norm_layer.h 和 src/l2norm_layer.c 两个,l2norm_layer主要是完成在每个batch对每个通道进行l2标准化操作;正向传播:反向传播: 如果,则, 否则 ,这与源码上的反传存在差入;l2norm_layer.h的详细定义如下:...
2019-12-30 16:22:13 510
原创 [LeetCode 解题报告]130. Surrounded Regions
Given a 2D board containing'X'and'O'(the letter O), capture all regions surrounded by'X'.A region is captured by flipping all'O's into'X's in that surrounded region.Example:X X X XX O O...
2019-12-29 15:36:50 113
原创 [LeetCode 解题报告]125. Valid Palindrome
Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.Note:For the purpose of this problem, we define empty string as valid palindrome.Examp...
2019-12-29 15:04:06 93
原创 [LeetCode 解题报告]129. Sum Root to Leaf Numbers
Given a binary tree containing digits from0-9only, each root-to-leaf path could represent a number.An example is the root-to-leaf path1->2->3which represents the number123.Find the tota...
2019-12-28 16:52:18 115
原创 [LeetCode 解题报告]128. Longest Consecutive Sequence
Given an unsorted array of integers, find the length of the longest consecutive elements sequence.Your algorithm should run in O(n) complexity.Example:Input:[100, 4, 200, 1, 3, 2]Output: 4Ex...
2019-12-28 16:43:19 135
原创 [LeetCode 解题报告]127. Word Ladder
Given two words (beginWordandendWord), and a dictionary's word list, find the length of shortest transformation sequence frombeginWordtoendWord, such that:Only one letter can be changed at a ti...
2019-12-28 16:20:09 161
原创 [LeetCode 解题报告]124. Binary Tree Maximum Path Sum
Given anon-emptybinary tree, find the maximum path sum.For this problem, a path is defined as any sequence of nodes from some starting node to any node in the tree along the parent-child connectio...
2019-12-28 15:52:41 170
原创 [LeetCode 解题报告]123. Best Time to Buy and Sell Stock III
Say you have an array for which theithelement is the price of a given stock on dayi.Design an algorithm to find the maximum profit. You may complete at mosttwotransactions.Note:You may not e...
2019-12-28 15:36:04 132
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人