0

I guess first up is the Question " is perl data language dead ?" I'm not finding any active discussions or user q&a

sorry for not tagging this better I dont have the rep'

my problem area is to analyse electrical power switching events and tie back readings of reactive and resistive loads aiming to point back at specific items of plant hardware.

So I thought cluster analysis and got a steer towards PDL

In a perl script I write

use PDL::Stats::KMeans;
my $sql = "select resistv_chg,reactv_chg from metered_events where matched_event_id is not null";
my $pdl = rdbi2D( $dbh, $sql );  # pdl info tells me that i have a 2D array of 1400 x 2
my $k = $pdl->kmeans( {} );

in perldebug executing that call to kmeans() kicks off a flurry of output all of which means nada to me I should expect about 10 to 15 distinct clusters given my installation Has anyone any ideas about PDL these days ? Is there a better choice of tool

1 Answer 1

0

As you'll see from the documentation, the default finds 3 clusters. If you're looking for 10 clusters, you'll need

my $k = $pdl->kmeans( {NCLUS => 10} );

There's a short series of blog posts using PDL for k-means starting here.

Perl is very much alive and new versions of PDL are released monthly, but there's more traffic over on stackoverflow, irc and the mailing lists.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .