自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+

LandscapeMi

landscapemi的博客

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

原创 python配置

http://my.oschina.net/u/1431433/blog/189337python*

2016-07-31 15:33:43 324

原创 机器学习:CRF:条件随机场

2016-07-30 21:43:40 306

原创 机器学习:HMM:算法

学习算法已知观测序列O=(o1,...,oT)O=(o_1,...,o_T), 估计模型λ=(A,B,π)\lambda = (A,B,\pi) 的参数,使得在该模型下观测序列概率 P(O|λ)P(O|\lambda); 极大似然估计的方法1. 监督学习给定 O 和 I已知: SS 个长度 相同的观测序列和对应的状态序列 {(O1,T1),(O2,T2),...,(OS,TS)}\{(O_1,

2016-07-30 21:42:43 996

原创 机器学习:HMM:基础

1. HMM的概念时序概率模型,生产不可观测的状态序列和观测序列定义λ=(A,B,π)\lambda = (A, B ,\pi)Q= 状态集合={q1,q2,...,qN}\{ q_1, q_2, ... ,q_N\}……….N:状态数V= 可能的观测集合= {v1,v2,...,vM}\{v_1,v_2, ... , v_M\}………. M:观测数I=长度为T的状态

2016-07-30 19:48:32 445

原创 机器学习:LDA

待继

2016-07-26 20:06:38 331

原创 推荐算法:推荐系统的评估

用户调查在线评估:A/B test离线评估1.在线评估将真实线上用户分组,对不同的组采用不同的方案同时运行,两个或者两个以上的方案两个方案,只有一个变量不同有明确的评价指标试验中用户,从始而终,只接触一个方案ABtest最常用的场景是 网页优化,测评指标:单击率,转化率等;Myspace:ABtest,使用指标单击率YouTube:ABtest;指标:单击率,长单击率,会话时间,

2016-07-25 13:18:23 14087 2

原创 推荐算法:模型的组合

1. 分类并行式加权式:推荐系统对多种推荐算法的结果进行加权平均,产生单一的推荐结果切换式:推荐系统在不同的推荐算法中进行切换,已适应当前的推荐场景混杂式:推荐系统同时呈现多种推荐算法的结构

2016-07-24 17:45:30 1488

原创 推荐算法:基于情景的推荐

预过滤后过滤建模 => 将用户和物品放入,特定的情景中,考虑; 消费者的决策,和他当时的心情是相关的;1. 建模将情景作为附加数据集合从二维推荐到三维R:User∗Item∗Context−−>RatingR: User*Item*Context --> Rating情景的定义推进系统手册-P157*特征的选择 @@@Toward optimal featrue selecti

2016-07-24 12:10:20 2895

原创 推荐算法:基于约束的推荐

基于知识的推荐1. 分类基于样例的推荐基于约束的推荐相似点收集用户需求找不到推荐方案下,自动修复与需求的不一致性给出合理的推荐解释区别推荐方案如何产生 样例:相似度计算约束:使用预先定义好的知识库(用户需求描述和产品信息的关联程度)2. 约束推荐基本约束推荐两个变量:Vc;VPRODV_c ; V_{PROD}三个约束:CR;CF;CPRODC_R ; C_F; C_{P

2016-07-23 21:22:24 1937

原创 推荐算法:基于svd的算法:比较

svd和cfsvd插值是从过去所有的评分中得到的,全局求解;关联物品 i 和 j 的权重被分解为两个向量的内积CF局部的观点

2016-07-23 17:40:07 433

原创 leetcode_c++:栈:Flatten Nested List Iterator(341)

Given a nested list of integers, implement an iterator to flatten it.Each element is either an integer, or a list – whose elements may also be integers or other lists.Example 1: Given the list [[1,1],

2016-07-23 15:56:56 240

原创 leetcode_c++:栈: Verify Preorder Serialization of a Binary Tree(331 )

One way to serialize a binary tree is to use pre-order traversal. When we encounter a non-null node, we record the node’s value. If it is a null node, we record using a sentinel value such as #. _9_/

2016-07-23 15:45:28 247

原创 leetcode_c++:栈:Remove Duplicate Letters(316 )

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 order am

2016-07-23 15:42:20 561

原创 leetcode_c++:栈: Implement Queue using Stacks(232)

Implement the following operations of a queue using stacks.push(x) – Push element x to the back of queue. pop() – Removes the element from in front of queue. peek() – Get the front element. empty()

2016-07-23 14:51:04 216

原创 leetcode_c++:栈: Implement Stack using Queues(225)

Implement the following operations of a stack using queues.push(x) – Push element x onto stack. pop() – Removes the element on top of the stack. top() – Get the top element. empty() – Return whether

2016-07-23 14:33:06 175

原创 leetcode_c++:栈: Basic Calculator(224)

Implement a basic calculator to evaluate a simple expression string.The expression string may contain open ( and closing parentheses ), the plus + or minus sign -, non-negative integers and empty space

2016-07-23 14:27:59 278

原创 复习(数据结构):字符串:c语言

http://www.cnblogs.com/qq78292959/archive/2013/10/23/3383953.htmlBF复杂度: O[(n−m)m]O[(n-m)m]http://www.tuicool.com/articles/VjMzuqz#include "stdio.h"#include "stdlib.h"#include "math.h"#include"tim

2016-07-23 14:16:20 378

原创 复习(数据结构):队列:c语言

循环队列直接使用顺序存储,出现 Q.rear=MAXSIZEQ.rear=MAXSIZE 时的上溢出rear=队尾;front=对头的下一个元素初始化:Q.front=Q.rear=0;队首指针进1:Q.front=(Q.front+1)%MaxSize队尾指针进1:Q.rear=(Q.rear+1)%MaxSize队列长度:(Q.rear+MaxSize-Q.front)%MaxSize

2016-07-23 09:17:53 436

原创 推荐算法:基于svd的算法:基于领域

基本的方法:CF @@@ An Algorithmmic framework for performing collaborative filtering1. cf 方法的优点相对简单可解释性好提高了用户体验实时性好2. 增强的CF方法(全局化的领域矩阵)CF方法本质是:局部算法矩阵分解:全局的算法* 模型步骤1. 基本公式r^ui=bui+∑j∈R(u)(rui−bui)wij

2016-07-22 21:21:54 1012

原创 leetcode_c++:栈:Binary Search Tree Iterator(173)

Implement an iterator over a binary search tree (BST). Your iterator will be initialized with the root node of a BST.Calling next() will return the next smallest number in the BST.Note: next() and hasN

2016-07-22 16:42:40 210

原创 leetcode_c++:栈:Min Stack(155)

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() – Get the

2016-07-22 16:22:25 178

原创 leetcode_c++:栈:Evaluate Reverse Polish Notation(150)

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-07-22 16:02:07 187

原创 leetcode_c++:栈: Binary Tree Postorder Traversal(145)

Given a binary tree, return the postorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [3,2,1].这里写代码片

2016-07-22 15:45:59 263

原创 leetcode_c++:栈:Binary Tree Preorder Traversal(144)

Given a binary tree, return the preorder traversal of its nodes’ values.For example: Given binary tree {1,#,2,3}, 1 \ 2 / 3 return [1,2,3].递归#include <stdio.h>#include <stdli

2016-07-22 15:37:43 190

原创 复习(数据结构):栈:c语言:练习题

共享空间的两栈这里写代码片

2016-07-22 11:19:00 1024

原创 leetcode_c++:栈:Binary Tree Zigzag Level Order Traversal(103)

Given a binary tree, return the zigzag level order traversal of its nodes’ values. (ie, from left to right, then right to left for the next level and alternate between).For example: Given binary tree

2016-07-21 17:02:15 275

原创 leetcode_c++:栈:Simplify Path(071)

Given an absolute path for a file (Unix-style), simplify it.For example, path = “/home/”, => “/home” path = “/a/./b/../../c/”, => “/c”O(n)#include <iostream>#include <vector>#include<cmath>#includ

2016-07-20 16:11:35 339

原创 leetcode_c++:栈:Valid Parentheses(020)

Given a string containing just the characters ‘(‘, ‘)’, ‘{‘, ‘}’, ‘[’ and ‘]’, determine if the input string is valid.The brackets must close in the correct order, “()” and “()[]{}” are all valid but “

2016-07-20 14:36:51 182

原创 复习(数据结构):栈:c语言:动态数组

这里写代码片这里写代码片

2016-07-20 11:14:28 328

原创 复习(数据结构):栈:c语言:数组

1. 数据结构 typedef struct{ SElemType data[MAXSIZE]; int top; //头部栈指针 }SqStack;2. 操作栈顶:S.top;初始设置S.top=-1; 栈顶元素S.data[S.top];进栈: 栈不满,栈顶先+1,再送值到栈顶元素出栈:栈非空,先取栈顶元素,再栈顶的指针-1栈空:S.top==-1;栈满条件:

2016-07-19 11:54:28 318

原创 机器学习:LDA_数学基础_6:MCMC:Dirichlet分布

1. 二元分布x∈{0,1}x\in \{0, 1\} ; 0<=μ<=1 0 <=\mu < =1 Bern(x|μ)=μx(1−μ)1−xBern(x|\mu) = \mu^x(1-\mu)^{1-x}设数据集合是 D={x1,...,xN}D=\{x_1, ... ,x_N\} ,且每次观测都是从 p(x|μ)p(x|\mu) 中得到;则似然函数是p(D|μ)=∏Nn=1p(xn|

2016-07-19 10:22:02 528

原创 leetcode_c++:链表:Odd Even Linked List(328)

Given a singly linked list, group all odd nodes together followed by the even nodes. Please note here we are talking about the node number and not the value in the nodes.You should try to do it in plac

2016-07-18 16:47:18 204

原创 leetcode_c++:链表:Delete Node in a Linked List(237)

Write a function to delete a node (except the tail) in a singly linked list, given only access to that node.Supposed the linked list is 1 -> 2 -> 3 -> 4 and you are given the third node with value 3, t

2016-07-18 16:41:24 147

原创 leetcode_c++:链表:Palindrome Linked List(234)

Given a singly linked list, determine if it is a palindrome. // 判断是否链表是回文时间:O(n) 空间:O(1) //先将一般翻转,然后两个指针向两边走class Solution {public: ListNode* findMiddle(ListNode* head){ ListNode* p1=he

2016-07-18 16:35:27 235

原创 leetcode_c++:链表:Reverse Linked Lis(206)

Reverse Linked Lisclass Solution {public: ListNode* reverseList(ListNode* head) { if(head==NULL||head->next==NULL) return head; ListNode* dummy=new ListNode(-1);

2016-07-18 16:21:33 189

原创 leetcode_c++:链表:Remove Linked List Elements(203)

Remove all elements from a linked list of integers that have value val.Example Given: 1 –> 2 –> 6 –> 3 –> 4 –> 5 –> 6, val = 6 Return: 1 –> 2 –> 3 –> 4 –> 5class Solution {public: ListNode* remo

2016-07-18 16:14:08 245

原创 leetcode_c++:链表:Intersection of Two Linked Lists(160)

Write a program to find the node at which the intersection of two singly linked lists begins. For example, the following two linked lists:A: a1 → a2 ↘

2016-07-18 16:08:45 173

原创 leetcode_c++:链表:Sort List(148)

Sort a linked list in O(n log n) time using constant space complexity.O(nlgn) 归并排序法:在动手之前一直觉得空间复杂度为常量不太可能,因为原来使用归并时,都是 O(N)的,需要复制出相等的空间来进行赋值归并。对于链表,实际上是可以实现常数空间占用的。利用归并的思想,递归地将当前链表分为两段,然后merge,分两段的方法

2016-07-18 14:07:22 217

原创 leetcode_c++:链表:Insertion Sort List(147)

Sort a linked list using insertion sort.O(n^2)ListNode *insertionSortList(ListNode *head) { if(head == NULL) return head; ListNode *p = new ListNode(-1); p->next = head;

2016-07-18 14:03:52 192

原创 leetcode_c++:链表:Reorder List(143)

Given a singly linked list L: L0→L1→…→Ln-1→Ln, reorder it to: L0→Ln→L1→Ln-1→L2→Ln-2→…You must do this in-place without altering the nodes’ values.For example, Given {1,2,3,4}, reorder it to {1,4,2,3}

2016-07-18 13:59:20 531

空空如也

空空如也

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

TA关注的人

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