虽然SVM本身算法理论,水比较深,很难懂 但是基本原理却非常直观易懂,就是找到与训练集中支持向量有最大间隔的超平面 形式化的描述: 其中需要满足m个约束条件,m为数据集大小,即数据集中的每个数据点function margin都是>=1,因为之前假设所有支持向量,即离超平面最近的点,的functio...
分类:
其他好文 时间:
2014-07-24 21:45:22
阅读次数:
332
#pragma warning(disable:4996)
#include <Windows.h>
#include <tchar.h>
#include <cstdio>
#include <vector>
using namespace std;
/*
submit time : 1
request :
Given a set of non-overlapping inte...
分类:
其他好文 时间:
2014-07-24 12:32:05
阅读次数:
238
多线程、集合、网络编程、内存优化、缓冲、、spring、设计模式、软件工程、编程思想1、生成对象时,合理分配空间和大小new ArrayList(100);2、优化for循环Vector vect = new Vector(1000);for( inti=0; i<vect.size(); i++)...
分类:
编程语言 时间:
2014-07-23 22:17:47
阅读次数:
272
#pragma warning(disable:4996)
#include <cstdio>
#include <Windows.h>
#include <tchar.h>
#include <vector>
using namespace std;
/*
submit time : 2
1. Runtime Error
[]
request :
Given a ma...
分类:
其他好文 时间:
2014-07-23 21:34:35
阅读次数:
274
sort函数在使用中非常好用,也非常简单,而且效率与冒泡或者选择排序不是一个数量级。本文就sort函数在vector中的用法分为sort函数入门用法与自定义comp比较函数比较结构体这两个最基本的功能讲讲其用法:1、sort入门:使用sort需要包含algorithm头文件,完整代码如下#inclu...
分类:
其他好文 时间:
2014-07-23 16:28:11
阅读次数:
202
一、vector的特性vector其中一个特点:内存空间只会增长,不会减小,援引C++ Primer:为了支持快速的随机访问,vector容器的元素以连续方式存放,每一个元素都紧挨着前一个元素存储。设想一下,当vector添加一个元素时,为了满足连续存放这个特性,都需要重新分配空间、拷贝元素、撤销旧...
分类:
其他好文 时间:
2014-07-23 15:14:06
阅读次数:
221
#pragma warning(disable:4996)
#include <Windows.h>
#include <tchar.h>
#include <cstdio>
#include <vector>
using namespace std;
/*
submit time : 1 // But I don‘t know how to deal with "Follow u...
分类:
其他好文 时间:
2014-07-23 13:55:36
阅读次数:
280
情形一:不允许首尾相连
此情况很常见,方法是动态规划,编程之美的方法三给出了解法,这里就直接给出代码了
int maxSubSum(vector& data)
{
int length = data.size();
assert(length >= 0);
int maxSum = data[length-1],startSum = data[length-1],begin = leng...
分类:
其他好文 时间:
2014-07-23 13:28:36
阅读次数:
197
Collection├List│├LinkedList│├ArrayList│└Vector│ └Stack└SetMap├Hashtable├HashMap└WeakHashMapCollection接口 Collection是最基本的集合接口,一个Collection代表一组Object,即C....
分类:
其他好文 时间:
2014-07-23 12:53:56
阅读次数:
264
题意:给一幅地图,P为起点,D为终点,'*'为传送阵,到达传送阵可以传到任意一个其他的传送阵,传到以后可以正常走或者再传回来,问P->D最短步数。分析:这题一定要细心,分析要到位才能搞定,错一点都WA。有两种思路:1.走到一个传送点之后,将所有能传到的地方都加入队列,然后清除传送阵向量(vector...
分类:
其他好文 时间:
2014-07-23 12:44:46
阅读次数:
282