Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 6611D200C4E for ; Fri, 21 Apr 2017 20:47:30 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 64BDB160B97; Fri, 21 Apr 2017 18:47:30 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id A967B160B86 for ; Fri, 21 Apr 2017 20:47:29 +0200 (CEST) Received: (qmail 40634 invoked by uid 500); 21 Apr 2017 18:47:28 -0000 Mailing-List: contact dev-help@systemml.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@systemml.incubator.apache.org Delivered-To: mailing list dev@systemml.incubator.apache.org Received: (qmail 40622 invoked by uid 99); 21 Apr 2017 18:47:28 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 21 Apr 2017 18:47:28 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0A337189FCC for ; Fri, 21 Apr 2017 18:47:28 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.629 X-Spam-Level: X-Spam-Status: No, score=0.629 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FREEMAIL_ENVFROM_END_DIGIT=0.25, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=googlemail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id 95L6xCjSyrtp for ; Fri, 21 Apr 2017 18:47:27 +0000 (UTC) Received: from mail-oi0-f41.google.com (mail-oi0-f41.google.com [209.85.218.41]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 111F25F5C6 for ; Fri, 21 Apr 2017 18:47:27 +0000 (UTC) Received: by mail-oi0-f41.google.com with SMTP id y11so75269504oie.0 for ; Fri, 21 Apr 2017 11:47:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20161025; h=from:subject:to:references:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=BavmGY4NJVjo0I5wV0CZsm4khkO7+NyAXDUhET23kCc=; b=PwIejCo3effQkJRoa4DD8tlx53LUeqooGnIzSNiSE9fCfiBYvb1ftGhWEFXbiwghNl 2Y2zS+3aM5Ask7bI5OWabL+AAToPu+CIcWQdqRJe0dh0nkcEVnoOxDf0Ep6mLJClWPBI TOZB3xc6IsnlqpRcoWAIxsUwVpfbThj+p1QGib/NemQQI0YgwJMhl8aSRzjRo0HVNHGW I8ZPifzVxCkQ4JsMIfXE237gWLJiXuvBV9vUz+CHUlL+Xk2HPy2ua+JoX//WJBZK0cMn MoGC2AQcHhXEfB2Smxs8QoiDqyOO1Y2hyi5cIM0Ot2jDichyUUoj+TVTJPQmt6aGynVY ZmUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:subject:to:references:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=BavmGY4NJVjo0I5wV0CZsm4khkO7+NyAXDUhET23kCc=; b=cnZhUUlCjMoWzHbEJGPotJLOMrQ0S40+oeG/QUhMNlRDmd0eE01018Nx97qmHrNl0k dVK26jQkgKpAWFRMcmMbb9a/qFK95JAg9TDF2DfJtuTPoQYSF5DmTFu3LNic5RW5D2HF DMArCq7xXbZBflXLJ9yFelg/wE7K7MBejp9gQ8PaBXDQnfqODnKqi/FcJSrc0UiQTj0P FJxclC7xhIrQtshJoL7boPSBNpA8T8/53h24T7dSzcF0REc/H4j4eu62ewBqd8QLz3DU vyHQ1CBK68fmm2TZmPkFufoRado5NHgUXcJ6387V3QkzsQxzcEo7uhXTPMx73q8+g6S2 hm2w== X-Gm-Message-State: AN3rC/6HWdG0Z4yOltH/fRPRVjKJgfBKYfbRgzIzYZ8EvJFyl5h3hs4N sIyRylP3Iv0XGXwC X-Received: by 10.157.32.132 with SMTP id x4mr8863136ota.4.1492800446172; Fri, 21 Apr 2017 11:47:26 -0700 (PDT) Received: from ?IPv6:2602:306:cdd1:58f0:48c6:7b0b:d3c6:de1c? ([2602:306:cdd1:58f0:48c6:7b0b:d3c6:de1c]) by smtp.googlemail.com with ESMTPSA id s193sm4405346oie.21.2017.04.21.11.47.25 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 21 Apr 2017 11:47:25 -0700 (PDT) From: Matthias Boehm X-Google-Original-From: Matthias Boehm Subject: Re: Table To: dev@systemml.incubator.apache.org References: Message-ID: Date: Fri, 21 Apr 2017 11:47:23 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit archived-at: Fri, 21 Apr 2017 18:47:30 -0000 The input vectors to table are interpreted as row indexes and column indexes, respectively. Without weights, we add 1, otherwise the corresponding weight value to the output cells. So in your example you have constant row indexes of 1 but a seq(1,10) for column indexes and hence you get a 1x10 output matrix. Regards, Matthias On 4/21/2017 4:00 AM, arijit chakraborty wrote: > Hi, > > > I was trying to understand what the "table" function does. In the documents, it says: > > > "Returns the contingency table of two vectors A and B. The resulting table F consists of max(A) rows and max(B) columns." > > > Suppose I've 2 matrix A and B of this form: > > > A = matrix(1, 1, 10) > B = matrix(seq(10,1, -1), 10, 1) > > > I should have a matrix of form > > C = matrix(1, 10, 1). > > > But I'm getting > > C = matrix(1, 1, 10). > > > Also, what is the difference between "Group form" and "Scalar form"? > > > Thank you! > > Arijit >