自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(48)
  • 收藏
  • 关注

原创 用机器学习解决LeetCode问题

导语机器学习是一种使以计算机为代表的电子设备具备一定智能的技术,是人工智能的重要技术组成之一。特别是近年来以深度学习为代表的机器学习迅猛发展,使得人们的生活逐渐发生质的变化,机器学习从来没有像今天这样受到人们的热切关注。其实机器学习并不是高端到不可亵玩的东西,它只是利用计算机强大的计算能力来解决不能直接求解的数学问题,也就是说让计算机在某一个假设空间内寻找一个映射函数,将输入映射为我们需要的结果。既

2017-09-21 23:48:16 1101

原创 机器学习防止过拟合方法

过拟合解决方法防止过拟合:early stopping、扩增训练集、正则化、dropoutEarly stoppingEarly stopping便是一种迭代次数截断的方法来防止过拟合的方法,即在模型对训练数据集迭代收敛之前停止迭代来防止过拟合。 Early stopping方法的具体做法是,在每一个Epoch结束时(一个Epoch集为对所有的训练数据的一轮遍历)计算validation dat

2017-09-16 16:28:20 465

原创 深度学习学习笔记

深度学习学习笔记导语本文是本人学习深度学习过程中遇到的部分问题,并自己寻找答案,将答案汇总,一是方便自己今后查阅和复习,二是将其分享出来,希望能帮助到需要的同学,共同学习共同进步。1、卷积神经网络有那些重要技巧(trick),你认为哪个技巧最影响结果?卷积神经网络(CNN)在图像分类方面展现出了优异的天赋,现已成为图像处理领域的标准规范。针对特定的问题,需要有多种技巧来调整模型,以使模型在测试数据上

2017-08-22 12:04:17 7551

原创 深入理解Java并发包之ConcurrentHashMap

【声明】本博客大部分内容来自公众号ImportNewHashMap的容量由负载因子决定,插入的元素超过了容量的范围就会触发扩容操作,就是rehash。 在多线程环境下,若同时存在其他元素进行put操作,如果hash值相同,可能出现在同一数组下用链表表示,出现闭环,导致在get的操作会出现死循环,所以hashmap是线程不安全的。Hashtable是线程安全的,它在所有都涉及到多线程操作时都加了sy

2017-08-09 16:42:12 3311 3

原创 TensorFlow实战:手写数字识别之K近邻

导语自从Google发布了TensorFlow之后,作为一款开源的深度学习框架,在全世界范围内产生了巨大的影响力,如今在GitHub上深度学习框架居于第一名,且远远领先其他深度学习开源项目,并且也在工业界被大量运用。学习TensorFlow不仅可以加深对深度学习的理解,而且可以知道如何将深度学习这一门高深的学问用于实践当中。TensorFlow就像其名字一样,由“tensor”和“flow”组成,“

2017-07-03 11:16:42 1004

转载 ImageNet冠军模型解析

导语ImageNet是斯坦福大学李飞飞教授主持设立的关于计算机视觉的数据库,里面含有大量的图片,这些图片分为上万个类别,是深度学习领域一个非常火热的竞赛。近年来由于硬件水平的提高,以及大数据量的爆发式增长,给深度学习提供了便利的发展条件,ImageNet的水平在近5年取得了飞速发展。特别是卷积神经网络(CNN)在计算机视觉领域用于图像分类和识别,在自然语言处理领域的语音识别,都取得了不错的效果。本文

2017-07-01 14:32:24 9789

原创 keras入门实战:手写数字识别

【声明】本文是blog的翻译和个人的学习笔记导读近些年由于理论知识的硬件的快速发展,使得深度学习达到了空前的火热。深度学习已经在很多方面都成功得到了应用,尤其是在图像识别和分类领域,机器识别图像的能力甚至超过了人类。本文用深度学习Python库Keras实现深度学习入门教程mnist手写数字识别。mnist手写数字识别是机器学习和深度学习领域的“hello world”,MNIST数据集是手写数字的

2017-06-30 14:58:38 10433 4

原创 leetcode[496]:Next Greater Element I

【原题】 You are given two arrays (without duplicates) nums1 and nums2 where nums1’s elements are subset of nums2. Find all the next greater numbers for nums1’s elements in the corresponding places of num

2017-03-10 19:07:22 346

原创 leetcode[503]:Next Greater Element II

【原题】 Given a circular array (the next element of the last element is the first element of the array), print the Next Greater Number for every element. The Next Greater Number of a number x is the firs

2017-03-10 19:04:02 276

原创 leetcode[415]:Add Strings

【原题】 Given two non-negative integers num1 and num2 represented as string, return the sum of num1 and num2.Note: 1.The length of both num1 and num2 is < 5100. 2.Both num1 and num2contains only di

2017-02-19 13:37:08 281

原创 leetcode[494]:Target Sum

【原题】 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 new symbol.Find out how

2017-02-17 13:13:33 364

原创 leetcode(378):Kth Smallest Element in a Sorted Matrix

【题目】 Given a n x n matrix where each of the rows and columns are sorted in ascending order, find the kth smallest element in the matrix.Note that it is the kth smallest element in the sorted order, no

2017-01-07 19:49:10 295

原创 leetcode(363):Max Sum of Rectangle No Larger Than K

【原题】 题目链接Max Sum of Rectangle No Larger Than KGiven a non-empty 2D matrix matrix and an integer k, find the max sum of a rectangle in the matrix such that its sum is no larger than k.Example: Given

2016-12-24 00:37:03 402

原创 leetcode(410):Split Array Largest Sum

【原题】 Given an array which consists of non-negative integers and an integer m, you can split the array into m non-empty continuous subarrays. Write an algorithm to minimize the largest sum among these

2016-12-21 23:31:56 402

原创 leetcode[52]:N-Queens II

【原题】 Follow up for N-Queens problem. Now, instead outputting board configurations, return the total number of distinct solutions.【分析】 本题为N皇后问题,要求解的个数 思路是回溯法,一行一行地遍历,每个位置试一下,看能否构成解。 由题目要求,同一行、同一列

2016-12-21 14:33:38 365

原创 leetcode(51):N-Queens

【原题】 The n-queens puzzle is the problem of placing n queens on an n×n chessboard such that no two queens attack each other. Given an integer n, return all distinct solutions to the n-queens puzzle.Ea

2016-12-21 12:01:01 283

原创 leetcode[200]:Number of Islands

【原题】 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 horizontally or vertically. You may a

2016-09-16 19:45:49 442 1

原创 leetcode(148):Sort List

【题目】 Sort a linked list in O(n log n) time using constant space complexity.【分析】要求将一个单链表排序,时间复杂度为O(nlogn)此题考查单链表的归并排序 1.找到单链表的中间节点,将整个单链表分为两个子链表 2.分别对两个子链表进行归并排序 3.将排好序的子链表合并成一个链表【Java实现】publi

2016-09-04 15:06:02 253

原创 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()

2016-08-29 09:58:08 576

原创 leetcode(49):Group Anagrams

【题目】 Given an array of strings, group anagrams together.For example, given: [“eat”, “tea”, “tan”, “ate”, “nat”, “bat”], Return: [ [“ate”, “eat”,”tea”], [“nat”,”tan”], [“bat”] ]【分析】题意为将字符串数组中

2016-08-22 16:03:37 493

原创 leetcode[208]:Implement Trie (Prefix Tree)

【题目】 Implement a trie with insert, search, and startsWith methods.Note: You may assume that all inputs are consist of lowercase letters a-z. 【解析】 题目要求实现Prefix Tree(前缀树)的insert、search和startWith方法,所以

2016-08-20 15:06:29 466

原创 leetcode():Permutations

Permutations : Given a collection of distinct numbers, return all possible permutations.For example, [1,2,3] have the following permutations: [ [1,2,3], [1,3,2], [2,1,3], [2,3,1], [3,1,2],

2016-08-16 17:40:44 444

原创 leetcode:Combination Sum(I,II)

原题: Given a set of candidate numbers (C) and a target number (T), find all unique combinations in C where the candidate numbers sums to T.The same repeated number may be chosen from C unlimited number

2016-08-15 19:56:19 250

原创 leetcode(17):Letter Combinations of a Phone Number

原题: Given a digit string, return all possible letter combinations that the number could represent.A mapping of digit to letters (just like on the telephone buttons) is given below. Input:Digit strin

2016-08-15 17:28:31 296

原创 leetcode(282): Expression Add Operators

Given a string that contains only digits 0-9 and a target value,return all possibilities to add binary operators (not unary) +, -, or * between the digits so they evaluate to the target value. Examples

2016-08-13 15:04:05 861

原创 leetcode(150):Evaluate Reverse Polish Notation

原题: Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another expression.Some examples: [“2”, “1”, “+”, “3”,

2016-08-13 13:43:27 272

原创 leetcode(90):Subsets II

原题: 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,2,2], a solutio

2016-08-12 15:57:52 278

原创 leetcode(274):H-Index

原题: Given an array of citations (each citation is a non-negative integer) of a researcher, write a function to compute the researcher’s h-index.According to the definition of h-index on Wikipedia: “A

2016-08-12 13:07:07 277

原创 leetcode(78):Subsets

原题: Given a set of distinct integers, nums, return all possible subsets.Note: The solution set must not contain duplicate subsets.For example, If nums = [1,2,3], a solution is: [ [3], [1], [2

2016-08-11 21:37:35 271

原创 leetcode(318):Maximum Product of Word Lengths

原题: Given a string array words, find the maximum value of length(word[i]) * length(word[j]) where the two words do not share common letters. You may assume that each word will contain only lower case

2016-08-11 20:58:23 278

原创 leetcode(187):Repeated DNA Sequences

原题: All DNA is composed of a series of nucleotides abbreviated as A, C, G, and T, for example: “ACGAATTCCG”. When studying DNA, it is sometimes useful to identify repeated sequences within the DNA.Wr

2016-08-11 20:11:13 260

原创 leetcode(375):Guess Number Higher or Lower II

原题: We are playing the Guess Game. The game is as follows:I pick a number from 1 to n. You have to guess which number I picked.Every time you guess wrong, I’ll tell you whether the number I picked is

2016-08-11 17:43:52 738

原创 leetcode(368):Largest Divisible Subset

原题: Given a set of distinct positive integers, find the largest subset such that every pair (Si, Sj) of elements in this subset satisfies: Si % Sj = 0 or Sj % Si = 0.If there are multiple solutions, r

2016-08-10 21:49:45 490

原创 leetcode(45):Jump Game II

原题: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Your goal is to

2016-08-10 11:32:52 229

原创 leetcode(316):Remove Duplicate Letters

原题: Given a string which contains only lowercase letters, remove duplicate letters so that every letter appear once and only once. You must make sure your result is the smallest in lexicographical ord

2016-08-10 10:36:30 394

原创 leetcode(55):Jump Game

原题: Given an array of non-negative integers, you are initially positioned at the first index of the array.Each element in the array represents your maximum jump length at that position.Determine if yo

2016-08-09 21:59:05 197

原创 leetcode 204:Count Primes

原题:Count the number of prime numbers less than a non-negative number, n.求小于正整数n的质数的个数通常我们的做法是从最小的质数2开始遍历直到n,判断其中每一个数是否为质数,当n很大的时候,肯定超时。有更高效的解法如下:质数只能被1和他自己整除,也就是说他不包含基本因子2,3,5,7等我们可以排除上述这些数来大大提高遍历效率2是最

2016-07-15 16:10:33 450

原创 leetcode:First Missing Positive

原题:Given an unsorted integer array, find the first missing positive integer.For example, Given [1,2,0] return 3, and [3,4,-1,1] return 2.Your algorithm should run in O(n) time and uses constant space

2016-07-14 22:06:54 226

原创 leetcode: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,null,null,15,7] 3

2016-07-13 23:19:24 332

原创 leetcode 125:Valid Palindrome

原题: Given a string, determine if it is a palindrome, considering only alphanumeric characters and ignoring cases.For example, “A man, a plan, a canal: Panama” is a palindrome. “race a car” i

2016-07-12 09:36:47 361

空空如也

空空如也

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

TA关注的人

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