当前搜索:

机器学习实战(k-近邻算法)

给定训练数据样本和标签,对于某测试的一个样本数据,选择距离其最近的k个训练样本,这k个训练样本中所属类别最多的类即为该测试样本的预测标签。简称kNN。通常k是不大于20的整数,这里的距离一般是欧式距离。 K最近邻(k-Nearest Neighbour,KNN)分类算法,是一个理论上比较...
阅读(337) 评论(0)

机器学习---预测电影类型

#coding=UTF8 from numpy import * import operator def createDataSet(): group = array([[3,104],[2,100],[1,81],[101,10],[99,5]]) #训练集 labels =...
阅读(445) 评论(0)

机器学习----梯度下降法

回归(regression)、梯度下降(gradient descent) 发表于332 天前 ⁄ 技术, 科研 ⁄ 评论数 3 ⁄ 被围观 1152 次+ 本文由LeftNotEasy所有,发布于http://leftnoteasy.cnblogs.com。如果转载,请注明出处,...
阅读(277) 评论(0)

hdu5137 How Many Maos Does the Guanxi Worth(ACM/ICPC 西安区域赛现场赛)

How Many Maos Does the Guanxi Worth Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 512000/512000 K (Java/Others) Total Submission(s): 1371...
阅读(282) 评论(0)

HDU5461 Largest Point 贪心(2015acm沈阳网络赛)

Largest Point Time Limit: 1500/1000 MS (Java/Others)    Memory Limit: 65535/32768 K (Java/Others) Total Submission(s): 1274    Accepted Submission(...
阅读(383) 评论(0)

人工湖公路(树状数组)

是生命之源,这些大家都知道。所以但凡有水的地方都会有人。而且一般靠近江河湖海的地方人也特别的多。 人工湖是一个美丽壮阔的湖,在湖的四周分布着若干个城市。由于水路并不发达,所以这些城市的交通一般都是靠陆路。每个城市只和靠其左右的两个城市建有公路。即,我们可以这么想象:湖是一个圆,在圆上分布...
阅读(489) 评论(1)

无根树转有根树代码

#include #include #include using namespace std; const int maxn= 10005; int n,p[maxn]; vector G[maxn]; void dfs(int u,int fa) //递归转化为以u为根的子树,u的父亲为fa...
阅读(272) 评论(0)

POJ3497 UVA12124 Assemble(二分 + 贪心)

Assemble Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 3361   Accepted: 1070 Description Recently your...
阅读(268) 评论(0)

2014年 acmicpc北京区域赛题目(hdu5112 hdu5119 hdu5120 hdu5122)

A Curious Matt Time Limit: 2000/2000 MS (Java/Others)    Memory Limit: 512000/512000 K (Java/Others) Total Submission(s): 1071    Accepted Submissi...
阅读(525) 评论(0)

POJ3159 Candies(差分约束 PS:此题spfa+队列过不了,spfa + stack才能过)

Candies Time Limit: 1500MS   Memory Limit: 131072K Total Submissions: 25914   Accepted: 7074 Description During the kindergarten days, f...
阅读(397) 评论(0)

POJ1364 King(差分约束 SPFA)

King Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 11146   Accepted: 4081 Description Once, in one kingdom, there was a qu...
阅读(275) 评论(0)

HDU2449 Remmarguts' Date(第k短路)

Remmarguts' Date Time Limit: 4000MS   Memory Limit: 65536K Total Submissions: 24007   Accepted: 6535 Description "Good man never mak...
阅读(512) 评论(0)

hdu1081 最大子矩阵和(DP动态规划 最大子序列和变形题)

To The Max Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9922    Accepted Submission(s): 4...
阅读(346) 评论(0)

hdu1080 Human Gene Functions (DP动态规划,带权最长公共子串)

Human Gene Functions Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 2733    Accepted Subm...
阅读(261) 评论(0)

HDU1069 Monkey and Banana(dp动态规划,最长非递减子序列变形题)

Monkey and Banana Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 9861    Accepted Submiss...
阅读(554) 评论(0)

HDU1024 Max Sum Plus Plus(DP动态规划 最大子串和增强版)

Max Sum Plus Plus Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 K (Java/Others) Total Submission(s): 20708    Accepted Submissi...
阅读(621) 评论(0)

POJ1986 Distance Queries(LCA最近公共祖先)

Distance Queries Time Limit: 2000MS   Memory Limit: 30000K Total Submissions: 10604   Accepted: 3746 Case Time Limit: 1000MS ...
阅读(426) 评论(0)

POJ3164 Command Network(最小树形图)

Command Network Time Limit: 1000MS   Memory Limit: 131072K Total Submissions: 14736   Accepted: 4232 Description Af...
阅读(227) 评论(0)

POJ2560 Freckles(prim最小生成树)

Freckles Time Limit: 1000MS   Memory Limit: 65536K Total Submissions: 7839   Accepted: 3763 Description In an episode of the Dick Van Dyk...
阅读(321) 评论(0)

POJ2230 Watchcow(欧拉回路)

Watchcow Time Limit: 3000MS   Memory Limit: 65536K Total Submissions: 6467   Accepted: 2819   Special Judge Description Bessie's been appo...
阅读(340) 评论(0)
    个人资料
    等级:
    访问量: 8万+
    积分: 2550
    排名: 1万+
    最新评论