摘要:
机器学习算法——SVM 1. 背景 在线性分类任务中,对于同一个数据集,可能有多个分离超平面。例如在下图中,H2和H3都能够将白色点和黑色点分离开来,那么在这些分界面中,是否存在一个最优的分界面?一个直观的想法是,离所有点都比较远的分割面会是一个好的分割面。可以证明,这样的最优分割面是唯一的。因 阅读全文
摘要:
Add and Search Word - Data structure design Design a data structure that supports the following two operations: void addWord(word) bool search(word) s 阅读全文
摘要:
Course Schedule II 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 co 阅读全文
摘要:
Minimum Size Subarray Sum Given an array of n positive integers and a positive integer s, find the minimal length of a contiguous subarray of which th 阅读全文
摘要:
Implement Trie (Prefix Tree) Implement a trie with insert, search, and startsWith methods. Example: Trie trie = new Trie(); trie.insert("apple"); trie 阅读全文
摘要:
Count Primes Count the number of prime numbers less than a non-negative number, *n*. Example: Input: 10 Output: 4 Explanation: There are 4 prime numbe 阅读全文
摘要:
Isomorphic Strings Given two strings *s* and *t*, determine if they are isomorphic. Two strings are isomorphic if the characters in *s* can be replace 阅读全文
摘要:
Course Schedule There are a total of numCourses courses you have to take, labeled from 0 to numCourses-1. Some courses may have prerequisites, for exa 阅读全文
摘要:
Remove Linked List Elements Remove all elements from a linked list of integers that have value *val*. Example: Input: 1->2->6->3->4->5->6, val = 6 Out 阅读全文
摘要:
机器学习之树模型 大纲 决策树和回归树模型:ID3, C4.5,CART AdaBoost框架 提升树:梯度提升树 决策树 决策树模型可以看做是if-else指令集合,通过对特征空间的划分来完成分类或者回归任务。以下图中的分类任务为例,假设数据集包含了: 三个类别:黄色、蓝色、绿色 两个维度的特征空 阅读全文