自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

Freemanzxp

对机器学习、大数据感兴趣~

  • 博客(86)
  • 收藏
  • 关注

原创 奇异值分解(SVD)原理及实例分析

1. 简介奇异值分解(Singular Value Decomposition,简称SVD)是在机器学习领域广泛应用的算法,它不仅可以用于降维算法中的特征分解,还可以用于推荐系统,以及自然语言处理等领域。本文通过分析原理,推导公式,以及具体实例演示来总结一下SVD。必备线性代数基础:方阵:行数等于列数的矩阵对角阵:只有对角线上有非0元素的矩阵对称阵:元素以主对角线为对称轴对应相等的矩阵...

2019-02-02 17:39:08 20046 11

原创 迁移学习实践与理解

前言:  工程实践结题了,研一生活暂告一段落,这两天在整理文档的过程中发现有些感悟可以记录下。工程实践是做一个图像分类模型,模型侧重点在于数据集中包含了医学类的图像,我们的目的就是能够从茫茫图像中找到它。   完整工程代码在这:Github   迁移学习:  出于硬件条件以及数据集来源的限制,我从一开始就想到了迁移学习的方法,利用已经训练成熟的模型去做调整。迁移学习有很多方式,可以...

2018-05-24 14:14:54 4222 4

原创 GBDT算法原理以及实例理解

【尊重原创,转载请注明出处】http://blog.csdn.net/zpalyq110/article/details/79527653  GBDT 的全称是 Gradient Boosting Decision Tree,梯度下降树,在传统机器学习算法中,GBDT算的上TOP3的算法。想要理解GBDT的真正意义,那就必须理解GBDT中的Gradient Boosting 和Decision...

2018-03-12 21:21:00 141830 171

原创 【LeetCode】295.寻找数据流中的中位数

295. Find Median from Data StreamDescription:Median is the middle value in an ordered integer list. If the size of the list is even, there is no middle value. So the median is the mean of the two m...

2019-04-15 15:47:22 481

原创 【LeetCode】23.K个有序链表合并

23. Merge k Sorted ListsDescription:Merge k sorted linked lists and return it as one sorted list. Analyze and describe its complexity.Difficulty:hardExample:Input:[ 1->4->5, 1->3-&...

2019-04-12 15:38:43 302

原创 【LeetCode】145. 二叉树后续遍历

102. Binary Tree Postorder TraversalDescription:Given a binary tree, return the postorder traversal of its nodes’ values.Difficulty:hardExample:Input: [1,null,2,3] 1 \ 2 / 3...

2019-04-12 13:14:33 335

原创 C++ heap堆的使用

堆的基本操作make_heap() == 默认最大堆,最小堆加参数greater< int >() ==pop_heap() == 先pop,然后在容器中删除 ==push_heap() == 先在容器中加入,再push ==sort_heap()#include<iostream>#include<vector>#include<alg...

2019-04-12 11:25:34 2670

原创 【LeetCode】122. Best Time to Buy and Sell Stock II

122. Best Time to Buy and Sell Stock IIDescription:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit. You may co...

2019-02-01 23:00:38 157

原创 【LeetCode】371. Sum of Two Integers

371. Sum of Two Integers Description:Calculate the sum of two integers a and b, but you are not allowed to use the operator + and -.Difficulty:Easy方法:位操作class Solution {public: int getSum(i...

2019-02-01 21:39:04 134

原创 【LeetCode】236. Lowest Common Ancestor of a Binary

236. Lowest Common Ancestor of a Binary Description:Given a binary tree, find the lowest common ancestor (LCA) of two given nodes in the tree.According to the definition of LCA on Wikipedia: “The ...

2019-01-31 17:58:36 169

原创 【LeetCode】69. Sqrt(x)

69. Sqrt(x)Description:Implement int sqrt(int x).Difficulty:EasyExample:Input: 8Output: 2Explanation: The square root of 8 is 2.82842..., and since the decimal part is truncated, ...

2019-01-30 21:52:26 166

原创 【LeetCode】139. Word Break

139. Word BreakDescription:Given a non-empty string s and a dictionary wordDict containing a list of non-empty words, determine if s can be segmented into a space-separated sequence of one or more d...

2019-01-30 16:46:54 141

原创 【LeetCode】208. Implement Trie (Prefix Tree)

208. Implement Trie (Prefix Tree)Description:Implement a trie with insert, search, and startsWith methods.Note:You may assume that all inputs are consist of lowercase letters a-z.All inputs are ...

2019-01-30 15:22:33 127

原创 【LeetCode】207. Course Schedule

207. Course ScheduleDescription:There are a total of n courses you have to take, labeled from 0 to n-1.Some courses may have prerequisites, for example to take course 0 you have to first take cours...

2019-01-29 14:53:04 146

原创 【LeetCode】200. Number of Islands

200. Number of IslandsDescription:Given a 2d grid map of '1’s (land) and '0’s (water), count the number of islands. An island is surrounded by water and is formed by connecting adjacent lands horizo...

2019-01-28 21:06:37 148

原创 【LeetCode】17. Letter Combinations of a Phone Number

17. Letter Combinations of a Phone NumberDescription:Given a string containing digits from 2-9 inclusive, return all possible letter combinations that the number could represent.A mapping of digit ...

2019-01-28 16:53:26 147

原创 【LeetCode】300. Longest Increasing Subsequence

300. Longest Increasing SubsequenceDescription:Given an unsorted array of integers, find the length of longest increasing subsequence.Difficulty:MediumExample:Input: [10,9,2,5,3,7,101,18]Output:...

2019-01-27 19:39:14 211

原创 【LeetCode】240. Search a 2D Matrix II

240. Search a 2D Matrix IIDescription:Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted in ascendi...

2019-01-27 18:42:24 150

原创 【LeetCode】114. Flatten Binary Tree to Linked List

114. Flatten Binary Tree to Linked ListDescription:Given a binary tree, flatten it to a linked list in-place.Difficulty:MediumExample: 1 / \ 2 5 / \ \3 4 61 \ 2 \ 3...

2019-01-27 17:16:23 178

原创 【LeetCode】309. Best Time to Buy and Sell Stock with Cooldown

309. Best Time to Buy and Sell Stock with CooldownDescription:Say you have an array for which the ith element is the price of a given stock on day i.Design an algorithm to find the maximum profit....

2019-01-27 16:31:24 178

原创 【LeetCode】394. Decode String

394. Decode StringDescription:The encoding rule is: k[encoded_string], where the encoded_string inside the square brackets is being repeated exactly k times. Note that k is guaranteed to be a posit...

2019-01-27 14:21:55 146

原创 【LeetCode】96. Unique Binary Search Trees

96. Unique Binary Search TreesDescription:Given n, how many structurally unique BST’s (binary search trees) that store values 1 … n?Difficulty:MediumExample:Input: 3Output: 5Explanation:Given...

2019-01-27 13:27:33 129

原创 【LeetCode】416. Partition Equal Subset Sum

416. Partition Equal Subset SumDescription:Given a non-empty array containing only positive integers, find if the array can be partitioned into two subsets such that the sum of elements in both sub...

2019-01-26 21:15:13 187

原创 【LeetCode】494. Target Sum

494. Target SumDescription:You are given a list of non-negative integers, a1, a2, …, an, and a target, S. Now you have 2 symbols + and -. For each integer, you should choose one from + and - as its...

2019-01-26 17:56:22 317 1

原创 【LeetCode】215. Kth Largest Element in an Array

215. Kth Largest Element in an ArrayDescription:Find the kth largest element in an unsorted array. Note that it is the kth largest element in the sorted order, not the kth distinct element.Difficu...

2019-01-26 16:04:55 179

原创 【LeetCode】102. Binary Tree Level Order Traversal

102. Binary Tree Level Order TraversalDescription:Given a binary tree, return the level order traversal of its nodes’ values. (ie, from left to right, level by level).Difficulty:MediumExample:Gi...

2019-01-26 13:43:49 142

原创 【LeetCode】337. House Robber III

337. House Robber IIIDescription:The thief has found himself a new place for his thievery again. There is only one entrance to this area, called the “root.” Besides the root, each house has one and...

2019-01-25 20:52:37 198

原创 【LeetCode】22. Generate Parentheses

46. PermutationsDescription:Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.Difficulty:MediumExample:[ &quot;((()))&quot;, &quot;(()())&quot;, &quot;(())()&quot;,..

2019-01-24 21:10:54 110

原创 【LeetCode】46. Permutations

46. PermutationsDescription:Given a collection of distinct integers, return all possible permutations.Difficulty:MediumExample:Input: [1,2,3]Output:[ [1,2,3], [1,3,2], [2,1,3], [2,3,1]...

2019-01-24 20:15:55 104

原创 【LeetCode】647. Palindromic Substrings

647. Palindromic SubstringsDescription:Given a string, your task is to count how many palindromic substrings in this string.The substrings with different start indexes or end indexes are counted a...

2019-01-24 19:25:48 126

原创 【LeetCode】406. Queue Reconstruction by Height

406. Queue Reconstruction by HeightDescription:Suppose you have a random list of people standing in a queue. Each person is described by a pair of integers (h, k), where h is the height of the pers...

2019-01-23 22:13:17 181

原创 【LeetCode】338. Counting Bits

338. Counting BitsDescription:Given a non negative integer number num. For every numbers i in the range 0 ≤ i ≤ num calculate the number of 1’s in their binary representation and return them as an ...

2019-01-23 20:29:59 138

原创 【LeetCode】160. Intersection of Two Linked Lists

160. Intersection of Two Linked ListsDescription:Write a program to find the node at which the intersection of two singly linked lists begins.Difficulty:EasyNote:1.If the two linked lists have no...

2019-01-23 13:41:46 115

原创 【LeetCode】155. Min Stack

155. Min StackDescription: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...

2019-01-23 13:00:54 232

原创 【LeetCode】141. Linked List Cycle

141. Linked List CycleDescription:Given a linked list, determine if it has a cycle in it.To represent a cycle in the given linked list, we use an integer pos which represents the position (0-indexe...

2019-01-22 19:57:10 137

原创 【LeetCode】198. House Robber

198. House RobberDescription:You are a professional robber planning to rob houses along a street. Each house has a certain amount of money stashed, the only constraint stopping you from robbing each...

2019-01-22 19:38:23 217

原创 【LeetCode】572. Subtree of Another Tree

572. Subtree of Another TreeDescription:Given two non-empty binary trees s and t, check whether tree t has exactly the same structure and node values with a subtree of s. A subtree of s is a tree co...

2019-01-22 13:34:14 132

原创 【LeetCode】437. Path Sum III

437. Path Sum IIIDescription:You are given a binary tree in which each node contains an integer value.Find the number of paths that sum to a given value.The path does not need to start or end at t...

2019-01-21 21:25:53 263

原创 【LeetCode】101. Symmetric Tree

101. Symmetric TreeDescription:Given a binary tree, check whether it is a mirror of itself (ie, symmetric around its center).**Note:**Bonus points if you could solve it both recursively and iterati...

2019-01-21 21:00:41 96

原创 【LeetCode】70. Climbing Stairs

70. Climbing StairsDescription:You are climbing a stair case. It takes n steps to reach to the top.Each time you can either climb 1 or 2 steps. In how many distinct ways can you climb to the top?*...

2019-01-21 20:10:30 99

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除