自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

fresh_sugar

永远年轻,永远热泪盈眶

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

转载 用 LSTM 做时间序列预测的一个小例子 ,问题:航班乘客预测

https://machinelearningmastery.com/time-series-prediction-lstm-recurrent-neural-networks-python-keras/数据:1949 到 1960 一共 12 年,每年 12 个月的数据,一共 144 个数据,单位是 1000下载地址目标:预测国际航班未来 1 个月的乘客数import numpyimport ...

2018-04-24 11:27:46 12967 5

转载 各种聚类算法的系统介绍和比较

最近项目用到聚类算法,将其系统的总结一下。一、简要介绍1、聚类概念聚类就是按照某个特定标准(如距离准则)把一个数据集分割成不同的类或簇,使得同一个簇内的数据对象的相似性尽可能大,同时不在同一个簇中的数据对象的差异性也尽可能地大。即聚类后同一类的数据尽可能聚集到一起,不同数据尽量分离。2、聚类和分类的区别聚类技术通常又被称为无监督学习,因为与监督学习不同,在聚类中那些表示数据类别的分类或者分组信息是...

2018-04-16 22:15:42 14441 1

转载 一个Spark推荐系统引擎的实现

http://www.cnblogs.com/muchen/p/6882465.html前言       经过2节对MovieLens数据集的学习,想必读者对MovieLens数据集认识的不错了;同时也顺带回顾了些Spark编程技巧,Python数据分析技巧。       本节将是让人兴奋的一节,它将实现一个基于Spark的推荐系统引擎。       PS1:关于推荐算法的理论知识,请读者先自行学...

2018-03-30 15:49:47 3448

原创 机器学习算法实习生面经 【蚂蚁金服、opera、360、美团】

阿里 3月9号投 12号晚上8:24-9:14电话面试 自我介绍,项目经历RF的具体过程,决策树的特征选择梯度下降法最大似然函数看过的书,印象最深刻的是什么算法(模型)在线编程题:快排23号晚上20:46电话面试 15分钟比赛的时候为什么用分类方法解决问题,而不用回归模型。说一下优缺点。bagging boosting的区别项目中的问题快排的复杂度为什么是o(nlogn)24号早上11点...

2018-03-29 09:51:43 4213 1

原创 损失函数 代价函数 目标函数之间的关系

损失函数和代价函数是同一个东西,目标函数是一个与他们相关但更广的概念,对于目标函数来说在有约束条件下的最小化就是损失函数(loss function)举个例子解释一下:上面三个图的函数依次为 , , 。我们是想用这三个函数分别来拟合Price,Price的真实值记为 。我们给定 ,这三个函数都会输出一个 ,这个输出的 与真实值 可能是相同的,也可能是不同的,为了表示我们拟合的好坏,...

2018-03-19 21:12:42 2814

原创 决策树 ID3 C4.5 CART

我的有道云笔记

2018-03-19 21:01:40 184

原创 逻辑斯蒂回归(LR)的总结

我的有道云笔记

2018-03-19 21:01:13 277

原创 正则表达式

正则表达式语法字符匹配.匹配任意字符(除了\n)[...]匹配字符集\d / \D匹配数字/非数字\s / \S匹配空白/非空白字符\w / \W匹配单词字符[a-zA-Z0-9]/非单词字符*匹配前一个字符0次或者无限次+匹配前一个字符1次或者无限次?匹配前一个字符0次或1次{m}/{m,n}匹配前一个字符m次或者n次{m,}匹配前一个字符m次或更多次*? / +? / ??匹配模式变为非贪婪(...

2018-02-22 22:51:57 143

原创 常用排序算法总结(python)

我们通常所说的排序算法往往指的是内部排序算法,即数据记录在内存中进行排序。排序算法大体可分为两种:a.比较排序,时间复杂度O(nlogn) ~ O(n^2),主要有:冒泡排序,选择排序,插入排序,归并排序,堆排序,快速排序等。b.非比较排序,时间复杂度可以达到O(n),主要有:计数排序,基数排序,桶排序等。       有一点我们很容易忽略的是排序算法的稳定性(腾讯校招2016笔试题曾考过)。  ...

2018-02-13 00:44:41 205

原创 剑指offer第二章python版

https://github.com/linwenfang/Python-Offer2以上链接即为剑指offer第二版2,3,5,6章的题目和多种解法。

2018-02-13 00:22:50 337

原创 xgboost linux安装

xgboost是GBDT算法的实现,可以做回归,分类,和排序。支持各种语言调用,支持单机和分布式。非常适合于大规模数据集安装从项目主页下载源码,解压。[root@biostacs qgzang]# git clone --recursive https://github.com/dmlc/xgboostCloning into 'xgboost'...remote: Counting obje...

2017-06-28 17:19:54 1497

转载 python中sklearn实现交叉验证

http://blog.csdn.net/ztchun/article/details/711695301、概述在实验数据分析中,有些算法需要用现有的数据构建模型,如卷积神经网络(CNN),这类算法称为监督学习(Supervisied Learning)。构建模型需要的数据称为训练数据。模型构建完后,需要利用数据验证模型的正确性,这部分数据称为测试数据。测试

2017-06-26 15:59:41 5339 2

原创 Java从.CSV文件中读取数据和写入

.CSV文件是以逗号分割的数据仓储,读取数据时从每一行中读取一条数据元祖,也就是一条数据,再用字符分割的方式获取表中的每一个数据项。import java.io.BufferedReader; import java.io.FileReader; public class TestRead { public static void main(String[] arg

2017-06-09 10:34:16 41872 1

转载 数据预处理与特征选择

http://blog.csdn.net/u010089444/article/details/70053104?locationNum=10&fps=1#目录(?)[-]数据预处理1 归一化11 区间缩放Min-Max scaling12 标准化standardization2 特征二值化3 one-hot编码4 缺失值计算5 数据变换6 样本不均

2017-06-08 15:59:26 13564

原创 生成n个不重复的随机数 java

需求:根据min和max,生成n个不重复的随机数。(注:范围[min,max],n 思路:0)、把从min到max的可能出现的数字全部放进一个候选List; 1)、随机生成索引index(0 2)、根据index从List中取出一个数,list.get(index),并移除这个元素;import java.util.ArrayList;import jav

2017-06-07 22:38:20 497

转载 混淆矩阵(Confusion Matrix)分析

ContentConfusionMatrixExampleTalbe ofconfusionPreference Confusion Matrix在机器学习领域,混淆矩阵(confusion matrix),又称为可能性表格或是错误矩阵。它是一种特定的矩阵用来呈现算法性能的可视化效果,通常是监督学习(非监督学习,通常用匹配矩阵:match

2017-06-06 11:37:41 2221

原创 561. Array Partition I

Given an array of 2n integers, your task is to group these integers into n pairs of integer, say (a1, b1), (a2, b2), ..., (an, bn) which makes sum of min(ai, bi) for all i from 1 to n as large

2017-05-20 17:24:37 212

原创 聚类算法

一般把学习算法分成有监督和无监督学习两种方式。主要区别是有没有类信息作为指导。聚类分析是典型的无监督学习算法,一般用于自动分类。         聚类分析是按照某个特定标准(通常是某种距离)把一个数据集分割成不同的类(Class),使得类内相似性尽可能的大,同时使得不同的类之间区别性也尽可能的大。直观的说,最终形成的每个聚类,在空间上都是一个稠密的区域。         聚类方法主

2017-05-18 15:33:38 1781

原创 alchemy

alchemy工具的使用:A:在ubuntu台式机上安装alchemy。官网alchemy有bug,在guihub上下载开源改良版进行配置,github网址:http://www.lai18.com/content/5210104.html,安装教程参见github上的readmeB:alchemy官网(http://alchemy.cs.washington.edu/)上有案例程序,跑了

2017-03-25 19:46:10 576

原创 MARKOV LOGIC NETWORK基础知识

统计关系学习(多关系数据挖掘或者概率逻辑学习),是人工智能、数据挖掘和机器学习三个领域结合的产物。统计关系学习结合了关系(逻辑)、拟然推理(不确定性处理)和机器学习(数据挖掘),目的:挖掘多关系数据中的拟然模型。       “概率”:知识是基于概率表示和推理机制的,用概率表示统计推理和学习算法,处理不确定性。推理模型包括:贝叶斯网络(BN)、马尔科夫网络(MN)、隐马尔可夫模型(HMM)等。

2017-03-23 21:04:45 3132 2

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

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 complete as many transactions as you like (ie, buy on

2017-03-05 22:58:19 217

原创 121. Best Time to Buy and Sell Stock

Say you have an array for which the ith element is the price of a given stock on day i.If you were only permitted to complete at most one transaction (ie, buy one and sell one share of the stock),

2017-03-05 20:56:56 283

原创 171. Excel Sheet Column Number

Related to question Excel Sheet Column TitleGiven a column title as appear in an Excel sheet, return its corresponding column number.For example: A -> 1 B -> 2 C -> 3 ...

2017-03-03 23:28:14 200

原创 168. Excel Sheet Column Title

168. Excel Sheet Column TitleAdd to ListDescription Submission SolutionsTotal Accepted: 92486Total Submissions: 371421Difficulty: EasyContributors: AdminGiven a positiv

2017-03-03 23:05:41 196

原创 504. Base 7

Given an integer, return its base 7 string representation.Example 1:Input: 100Output: "202"Example 2:Input: -7Output: "-10"Note: The input will be in range of [-1e7, 1e7].

2017-03-01 21:44:05 211

原创 492. Construct the Rectangle

For a web developer, it is very important to know how to design a web page's size. So, given a specific rectangular web page’s area, your job by now is to design a rectangular web page, whose length L

2017-02-28 22:46:12 257

原创 520. Detect Capital

Given a word, you need to judge whether the usage of capitals in it is right or not.We define the usage of capitals in a word to be right when one of the following cases holds:All letters in t

2017-02-28 11:52:31 444

原创 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 nums

2017-02-28 11:09:32 174

原创 MYSQL命令行查询中文乱码问题解决方案

会出现中文乱码的原因可能有以下几点原因:(1)server问题(2)table语系问题(3)客户端问题解决方案:(1)找到安装mysql时的目录下my.ini文件,用记事本将其打开,看其中的default-character-set是否为utf8,我的my.ini设置如下:(2)在mysql的cmd中输入:show variables like '%char%';

2017-02-21 00:09:34 594

原创 mysql命令大全

(1)登录mysql:cmd命令终端,若没有添加其环境变量,则需cd 进入到mysql的bin目录下。若添加了环境变量,则直接:mysql -u root -p并输入密码。(2)新建数据库首先设置一下字符类型mysql>SET NAMES utf8;创建数据库mysql>CREATE DATABASE demo1;显示所有数据库mysql>SHOW DATABASES;

2017-02-17 17:54:00 355

原创 506. Relative Ranks

Given scores of N athletes, find their relative ranks and the people with the top three highest scores, who will be awarded medals: "Gold Medal", "Silver Medal" and "Bronze Medal".Example 1:In

2017-02-13 21:39:19 342

原创 167. Two Sum II - Input array is sorted

Given an array of integers that is already sorted in ascending order, find two numbers such that they add up to a specific target number.The function twoSum should return indices of the two number

2017-02-13 12:23:47 250

原创 500. Keyboard Row

Given a List of words, return the words that can be typed using letters of alphabet on only one row's of American keyboard like the image below.Example 1:Input: ["Hello", "Alaska", "Da

2017-02-11 22:33:55 907

原创 教你如何抢微信红包!实验数据告诉你先抢后抢的区别有多大?

16年暑期的时候有幸在老师的带动下和200多位同学一起在微信群里发红包,用大量的实际数据研究了微信红包背后的故事。    此片文章主要分析微信群中红包发放的数据,找到红包金额分布规律、时序分布规律以及每个人多次抢到的红包金额的分布规律。最后给出一个抢红包的最佳策略建议。1.1分析    根据提供的20个红包数据进行数据分析。数据可自行下载:20个红包数据(1)根据这20个红

2017-01-29 22:55:24 13069 7

原创 387. First Unique Character in a String

Given a string, find the first non-repeating character in it and return it's index. If it doesn't exist, return -1.Examples:s = "leetcode"return 0.s = "loveleetcode",return 2.Note:

2017-01-20 12:08:29 315

原创 349. Intersection of Two Arrays

Given two arrays, write a function to compute their intersection.Example:Given nums1 = [1, 2, 2, 1], nums2 = [2, 2], return [2].Note:Each element in the result must be unique.The res

2017-01-20 11:21:25 202

原创 485. Max Consecutive Ones

Given a binary array, find the maximum number of consecutive 1s in this array.Example 1:Input: [1,1,0,1,1,1]Output: 3Explanation: The first two digits or the last three digits are consecutiv

2017-01-16 11:06:38 292

原创 SDN关键技术

openflow        SDN是一种网络架构理念,是一个框架,openflow是一个具体的协议,SDN网络的控制层面和数据转发层面通过标准的接口进行通信,openflow就是一种用于控制器和网络设备之间通信的标准化南向接口。         此图 为openflow控制器和openflow交换机的网络架构,通过openflow协议,控制器可以接收交换机的请求,以指令的方式修改交换机的流表进...

2017-01-15 21:49:02 8990

原创 463. Island Perimeter

You are given a map in form of a two-dimensional integer grid where 1 represents land and 0 represents water. Grid cells are connected horizontally/vertically (not diagonally). The grid is completely

2017-01-15 16:59:14 253

原创 383. Ransom Note

Given an arbitrary ransom note string and another string containing letters from all the magazines, write a function that will return true if the ransom note can be constructed from the magazines ; ot

2017-01-15 16:17:28 356

空空如也

空空如也

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

TA关注的人

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