Re: [Jprogramming] Partitions

2017-10-27 Thread Erling Hellenäs
Hi all ! I wanted to make sure the algorithms worked and gave correct results, so I made a comparison. See below. Cheers, Erling Hellenäs -Project--- ts=: 6!:2 , 7!:2@]   NB. Time and space normalize=: 3 :0 NB. The idea here is to normalize the representation so that NB. the

Re: [Jprogramming] Partitions

2017-10-27 Thread Erling Hellenäs
PS. I took away the "removal of duplicates" in my normalize. Result was the same. DS. /Erling Den 2017-10-27 kl. 10:08, skrev Erling Hellenäs: Hi all ! I wanted to make sure the algorithms worked and gave correct results, so I made a comparison. See below. Cheers, Erling Hellenäs

Re: [Jprogramming] JHS Home Server

2017-10-27 Thread Brian Schott
Bill, Perhaps the following thread will help. http://www.jsoftware.com/pipermail/general/2017-September/037270.html On Fri, Oct 27, 2017 at 1:34 AM, William Szuch wrote: > I have setup a JHS server on a home computer (to learn some JHS/HTMl etc). > > I would like to

Re: [Jprogramming] JHS Home Server

2017-10-27 Thread Eric Iverson
Assuming you can set up ssh between the machines, then an ssh tunnel connecting the client machine to the server through a tunnel to localhost on the server is your best best. It is more complicated to set up, but is convenient and secure once you have it. On Fri, Oct 27, 2017 at 1:34 AM, William

Re: [Jprogramming] Partitions

2017-10-27 Thread 'Mike Day' via Programming
Sorry, I haven’t got a useful direct response for Raul’s comment on this. BUT, here are a couple of amendments which seem to greatly improve on Lippu Esa’s par2. The main improvement hangs on the observation that rows in a such as 000102 and 000201 (spaces removed) are essentially the same.

[Jprogramming] loading jforc.ijs

2017-10-27 Thread Tomas Celaya
Hello! I've been getting started with J recently and came across J for C Programmers. Noticing the mention of jforc.ijs led me to this file which is linked to from a few pages on the wiki. Unfortunately I can't seem to load the file with neither jqt on macOS (v 806) nor jconsole on a

Re: [Jprogramming] loading jforc.ijs

2017-10-27 Thread robert therriault
Hi Tomas, If the issues is only the x. y. u. v. variables there is a foreign conjunction pair (9!:48 9!:49) that can be set to allow the use of that old style. http://www.jsoftware.com/help/dictionary/dx009.htm 9!:48 ''NB. dot names off 0 9!:49 [ 1 NB. set dot names to 1 9!:48

Re: [Jprogramming] Euclidean Distance

2017-10-27 Thread 'Skip Cave' via Programming
As part of my NLP project, I need a way to plot 2D & 3D point cluster plots. Let's take the example in my previous email: (0 0, 2 _3 ,: _1 2) dis 1 1,_1 _2,:3 4 1.41421 3.16228 4.47214 In that distance calculation, their are 6 coordinate pairs, representing 6 points in x & y. The six

Re: [Jprogramming] Euclidean Distance

2017-10-27 Thread 'Skip Cave' via Programming
Raul, Yes, rank was the problem. It hit me while I was eating dinner but your solution was different than what I expected (they usually are): Raul: dis =.4 :'%:+/*:x-y' "1 (0 0, 2 _3 ,: _1 2) dis 1 1,_1 _2,:3 4 1.41421 3.16228 4.47214 0 0 dis 1 1,_1 _2,:3 4 1.41421 2.23607

Re: [Jprogramming] Euclidean Distance

2017-10-27 Thread Raul Miller
The items that dis is expecting are rank 1 vectors. So it might make sense to include a rank 1 specification in its definition: dis =: 4 :'%:+/*:x-y'"1 Does that work for this example? 0 0 dis 1 1,_1 _2,:3 4 1.41421 2.23607 5 ... seems so ... Thanks, -- Raul On Fri, Oct 27, 2017 at

Re: [Jprogramming] Euclidean Distance

2017-10-27 Thread Gilles Kirouac
   a=:(0 0, 2 _3 ,: _1 2)    a  0  0  2 _3 _1  2    ]b=:1 1,_1 _2,:3 4  1  1 _1 _2  3  4    a(4 :'+/ &.: *:x-y' "1)b    NB. Under since Square Root is obverse (inverse) of Square 1.41421 3.16228 4.47214    a((+/ &.: *:)@: -) "1 b NB. in a tacit way 1.41421 3.16228 4.47214    a([: (+/ &.: *:)

Re: [Jprogramming] Partitions

2017-10-27 Thread Lippu Esa
Hi Mike, Thank you for the improvements. And thanks to Erling for comments and analysis. Esa -Original Message- From: Programming [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of 'Mike Day' via Programming Sent: Friday, October 27, 2017 2:26 PM To:

Re: [Jprogramming] Euclidean Distance

2017-10-27 Thread Lippu Esa
This is nice! You can easily make a distance table: (0 0, 2 _3 ,: _1 2) dis/ 1 1,_1 _2,:3 4 1.41421 2.23607 5 4.12311 3.16228 7.07107 2.23607 4 4.47214 and reflex: dis/~ 1 1,_1 _2,:3 4 0 3.60555 3.60555 3.60555 0 7.2111 3.60555 7.2111 0 The tacit

Re: [Jprogramming] Euclidean Distance

2017-10-27 Thread Lippu Esa
Hi Gilles! Thank you for a thorough post. Sorry about my redundant message. I should have known better to read the thread completely before responding. This forum works so fast, thanks to all! Anyways, a good exercise for me. Esa -Original Message- From: Programming

[Jprogramming] Euclidean Distance

2017-10-27 Thread 'Skip Cave' via Programming
In the 2014-11-11 NYCJUG meeting there was a discussion on Euclidean Distance. The verb 'dis' was used to demonstrate how to to calculate the Euclidean distance between two vectors. 0 0 dis 1 1 NB. Euclidean distance 1.41421 1 1,_1 _2,:3 4 NB.