- 博客(29)
- 收藏
- 关注
原创 【Tensorflow学习历程】1. windows 8 下的tensorflow 安装
GG,最近开始学tensorflow,因为实验室原因。GG。只有一台电脑,还是windows的,没地方装Linux,只能这样不清真的用windows做项目了。GG流程:1 下载Anacondahttps://www.continuum.io/downloads/ 这个页面就是anaconda的官网,上面有64位的anaconda下载,大概400+M。下载安装就可以使用了。2 创建python环境安
2017-05-25 10:05:05
2196
原创 SVDD(Support Vector Domain Description) 支持向量数据域描述(2)
这篇文章主要介绍高斯核函数的一些性质和基于高斯核函数的SVDD方法一、高斯核函数的一些性质1. 高斯核对饮的映射空间是无限维空间 在上一篇博客中,我们用无穷级数已经说明过这一点,所以这里我们就不再重复了。2.高斯核函数对应的高维空间中,每一个向量的模长一定是1 这个我们可以用高斯核函数本身的性质来进行求解 这样就表明了,所有点在映射之后都在一个模长为1的无限维超球体中。3.在这个高维空间中
2017-03-22 15:34:52
17434
3
原创 SVDD(Support Vector Domain Description) 支持向量数据域描述(1)
在学习SVDD的相关知识的时候,发现网上关于SVDD的中文资料不是很多,所以想和大家一下自己学习SVDD的学习历程。鉴于本人知识水平,文中写的可能有错漏,希望大家可以指出互相学习。1. SVM 支持向量机在写SVDD之前,需要有SVM的相关基础,因为SVDD和SVM在公式推导上是很相像的。 SVM的核心是找一个有着最大间距的超平面实现二分类 目标函数是: 如果碰到了线性不可分怎么办?
2017-03-21 16:23:00
13752
8
原创 LeetCode 74. Search a 2D Matrix
1.题目描述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 from left to right.The first int
2017-01-14 23:34:56
281
原创 LeetCode 105. Construct Binary Tree from Preorder and Inorder Traversal
1. 题目描述Given preorder and inorder traversal of a tree, construct the binary tree.Note:You may assume that duplicates do not exist in the tree.2. 解题思路这是一道数据结构的题目,给出二叉树的前序和中序遍历结果,从而还原二
2017-01-02 15:44:02
228
原创 LeetCode 90. Subsets II
1.题目描述Given a collection of integers that might contain duplicates, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example,If nums = [1
2017-01-01 20:47:59
261
原创 Leetcode 89. Gray Code
1.题目描述The gray code is a binary numeral system where two successive values differ in only one bit.Given a non-negative integer n representing the total number of bits in the code, print the
2017-01-01 20:36:02
273
原创 【算法概论】题目--8.19
1.题目描述 所谓风筝图是这样的,其顶点数为偶数,如2n,且其中的n个顶点构成了一个团,剩余的n个顶点则由一条称为尾巴的路径连接,尾巴的某个端点与团的一个顶点相连。给定一个图和目标g,风筝图问题要求图的一个包含2g个顶点的风筝子图。请证明该问题是NP-完全。2.解题过程主要思路:把团问题归约到风筝图问题【团问题描述】:给定一个图G,和目标g,求一个有g个顶点的完全图。
2016-12-30 13:28:48
346
原创 LeetCode 53. Maximum Subarray
1. 题目描述Find the contiguous subarray within an array (containing at least one number) which has the largest sum.For example, given the array [-2,1,-3,4,-1,2,1,-5,4],the contiguous subarray
2016-12-02 11:47:46
209
原创 LeetCode 283. Move Zeroes
1.题目描述Given an array nums, write a function to move all 0's to the end of it while maintaining the relative order of the non-zero elements.For example, given nums = [0, 1, 0, 3, 12], after
2016-11-29 16:16:01
210
原创 LeetCode 61. Rotate List2.
1.题目描述Given a list, rotate the list to the right by k places, where k is non-negative.For example:Given 1->2->3->4->5->NULL and k = 2,return 4->5->1->2->3->NULL.2.解题思路这个题目的意思是移动一个链
2016-11-29 16:00:45
213
原创 LeetCode 50. Pow(x, n)
1.题目描述Implement pow(x, n).2.解题 思路这道题目一看感觉诶,还很容易诶,为什么是Medium呢?然后很快的顺手写了一个上去,分n为0,正负数讨论。显然,没有AC。样例错的是,溢出了23333然后就判断一下溢出嗯~就可以了3.实现代码class Solution {public: double myPow(double
2016-11-19 23:06:44
242
原创 LeetCode 80. Remove Duplicates from Sorted Array II
1.题目描述Follow up for "Remove Duplicates":What if duplicates are allowed at most twice?For example,Given sorted array nums = [1,1,1,2,2,3],Your function should return length = 5,
2016-11-13 12:39:06
190
原创 LeetCode 148. Sort List
1.题目描述Sort a linked list in O(n log n) time using constant space complexity.2.解题思路我想了一下现有的几种排序,快排,归并。因为这是链表感觉快排不好做吖,涉及了随机访问。然后就想用归并。归并剩下一个要点就是用快慢指针求这个链表的中点。3.代码实现/** * Definition for
2016-11-13 10:03:02
191
原创 LeetCode 21. Merge Two Sorted Lists
1.题目描述Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.2.解题思路最近做题目都想到用递归啊,还有做数论图论的证明题一眼下去就想递归。。呜呜呜
2016-11-13 09:45:32
178
原创 LeetCode 22. Generate Parentheses
题目描述Given n pairs of parentheses, write a function to generate all combinations of well-formed parentheses.For example, given n = 3, a solution set is:[ “((()))”, “(()())”, “(())()”, “()((
2016-11-10 22:31:08
226
原创 LeetCode 31. Next Permutation
题目描述 Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers. If such arrangement is not possible, it must rearrange it as the lowest possi
2016-11-03 18:18:53
191
原创 LeetCode 54. Spiral Matrix
题目描述 Given a matrix of m x n elements (m rows, n columns), return all elements of the matrix in spiral order.For example, Given the following matrix:[ [ 1, 2, 3 ], [ 4, 5, 6 ], [ 7, 8, 9 ] ]
2016-11-03 17:48:41
202
原创 LeetCode 216. Combination Sum III
题目描述 Find all possible combinations of k numbers that add up to a number n, given that only numbers from 1 to 9 can be used and each combination should be a unique set of numbers.Example 1:Input: k =
2016-11-02 22:40:03
236
原创 LeetCode 40. Combination Sum II
题目描述 Given a collection of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T. Each number in C may only be used once in the combin
2016-10-30 17:48:23
196
原创 LeetCode 112. Path Sum
题目描述 ven a binary tree and a sum, determine if the tree has a root-to-leaf path such that adding up all the values along the path equals the given sum. For example: Given the below binary tree and s
2016-10-29 22:31:18
222
原创 LeetCode 16. 3Sum Closest
1.题目描述 Given an array S of n integers, find three integers in S such that the sum is closest to a given number, target. Return the sum of the three integers. You may assume that each input would hav
2016-10-29 21:15:30
222
原创 LeetCode 15. 3Sum
题目描述 Given an array S of n integers, are there elements a, b, c in S such that a + b + c = 0? Find all unique triplets in the array which gives the sum of zero.解题思路 首先这道题目可以暴力的做,三重循环,复杂度是O(n3)O(n^3)
2016-10-27 15:15:46
192
原创 LeetCode 26. Remove Duplicates from Sorted Array
题目描述Given a sorted array, remove the duplicates in place such that each element appear only once and return the new length. Do not allocate extra space for another array, you must do this in place wit
2016-10-24 21:08:54
252
原创 LeetCode 14. Longest Common Prefix
题目描述 Write a function to find the longest common prefix string amongst an array of strings.解题思路 题目说给定一组字符串让我们找最长的公共前缀。 第一个思路就是暴力的做: 先扫所有串的第一个字符看相等不相等,相等就添加到结果。 直到扫到有不同的的就结束。 复杂度是O(n2)O(n^2)算法代码
2016-10-24 20:42:21
181
原创 用LaTeX 写东西遇见的一些坑
长数学符号 使用\mathit 例如: \mathit{Nonuniformity} \mathit{Nonuniformity}={a-b}括号问题: 学术论文中括号的大小不是直接用([{来写 而是用 \big( \bigg( \Big( \Bigg( See Fig. 后面有一个英文句号 插入图表的数轴首字母要大写一个很好用的词语 After that展示用 pres
2016-10-24 19:58:53
1312
原创 LeetCode 9. Palindrome Number
题目描述:Determine whether an integer is a palindrome. Do this without extra space.算法分析:题目要求我们对输入的数字,判断一下是不是回文数。大体的算法:1. 开一个数组。首先对数字每次都模10,然后把数字保存在数组里面2. 扫一遍数组,看看是不是对称注意的点:负数
2016-10-08 15:25:36
191
原创 LeetCode 7. Reverse Integer
题目描述:Reverse digits of an integer.Example1: x = 123, return 321Example2: x = -123, return -321题目分析:首先这个题目是将一个整数给逆转然后输出,保持符号不变.大体的思路就是不断地模10,然后加到结果上面.结果再乘10.几个注意的点
2016-10-08 15:04:31
184
原创 LeetCode 1. Two Sum
这是第一篇博客2333333这是leetcode放在首页的第一道题目问题描述:Given an array of integers, return indices of the two numbers such that they add up to a specific target.You may assume that each input would h
2016-09-07 16:54:04
196
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人