码迷,mamicode.com
首页 >  
搜索关键字:confusion matrix    ( 4333个结果
LeetCode OJ:Maximal Rectangle(最大矩形)
Given a 2D binary matrix filled with 0's and 1's, find the largest rectangle containing all ones and return its area.求出0,1矩阵中的最大矩形区域:DP问题,可以使用数组记下当前行位...
分类:其他好文   时间:2015-12-08 23:48:48    阅读次数:203
Matrix进行图像处理
矩阵的规则:矩阵A与矩阵B能进行乘法操作的条件:当矩阵A的列数等于矩阵B的行数时,A与B可以相乘。矩阵C的行数等于矩阵A的行数,C的列数等于B的列数。乘积C的第行第列的元素等于矩阵A的第行的元素与矩阵B的第列对应元素乘积之和。 例如:,定义矩阵注意 矩阵乘法一般不满足交换律。即:一、 平移变换假定....
分类:其他好文   时间:2015-12-08 22:08:14    阅读次数:253
计算句子相似度
计算编辑距离# -*- coding: utf-8 -*-def distacal(s1,s2):#计算编辑距离 m = len(s1) n = len(s2) colsize, matrix = m + 1, [] for i in range((m + 1) * (n +...
分类:其他好文   时间:2015-12-07 22:33:37    阅读次数:139
zoj 2589 Matrix Searching 二维线段树
题目链接给一个n*n的矩阵, 给q个查询, 每次给出x1, y1, x2, y2, 求这个矩阵中的最小值。代码基本上和上一题相同... 1 #include 2 using namespace std; 3 #define pb(x) push_back(x) 4 #define ll lo...
分类:其他好文   时间:2015-12-07 17:47:41    阅读次数:161
实用矩阵类(Matrix)(带测试)
无意间看到国外一个网站写的Matrix类,实现了加减乘除基本运算以及各自的const版本等等,功能还算比较完善,,于是记录下来,以备后用.
分类:其他好文   时间:2015-12-07 12:29:45    阅读次数:194
uva 11019 Matrix Matcher
题意:给出一个n*m的字符矩阵T,你的任务是找出给定的x*y的字符矩阵P在T中出现了多少次.思路:要想整个矩阵匹配,至少各行都得匹配。所以先把P的每行看做一个模式串构造出AC自动机,然后在T中的各行逐一匹配,找到P中每一行的所有匹配点。只要在匹配时做一些附加操作,就可以把匹配出来的单一的行拼成矩形。...
分类:其他好文   时间:2015-12-07 02:08:21    阅读次数:162
Matrix Zigzag Traversal(LintCode)
Matrix Zigzag TraversalGiven a matrix ofmxnelements (mrows,ncolumns), return all elements of the matrix in ZigZag-order.Have you met this question in ...
分类:其他好文   时间:2015-12-06 21:04:11    阅读次数:621
theano支持的数组、向量、矩阵表达式
1)theano主要支持符号矩阵表达式(2)theano与numpy中都有broadcasting:numpy中是动态的,而theano需要在这之前就知道是哪维需要被广播。针对不同类型的数据给出如下的一张表,基本类型包括scalar、vector、row、col、matrix、tensor3、ten...
分类:编程语言   时间:2015-12-05 14:27:03    阅读次数:1377
[LeetCode]Spiral Matrix II
public class Solution { public int[][] generateMatrix(int n) { int level = (n + 1) / 2; int[][] result = new int[n][n]; int tm...
分类:其他好文   时间:2015-12-05 07:12:39    阅读次数:201
leetcode Search a 2D Matrix II
题目连接https://leetcode.com/problems/search-a-2d-matrix-ii/Search a 2D Matrix IIDescriptionWrite an efficient algorithm that searches for a value in an m...
分类:其他好文   时间:2015-12-04 22:53:11    阅读次数:136
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!