38. Perl Data Language
standard Perl the ability to compactly store and
speedily manipulate the large N-dimensional
data arrays which are the bread and butter of
scientific computing.
PDL turns Perl into a free, array-oriented,
numerical language similar to (but, we believe,
better than) such commercial packages as IDL
and MatLab. One can write simple perl
3813年9月21日土曜日
39. Perl Data Language
standard Perl the ability to compactly store and
speedily manipulate the large N-dimensional
data arrays which are the bread and butter of
scientific computing.
PDL turns Perl into a free, array-oriented,
numerical language similar to (but, we believe,
better than) such commercial packages as IDL
and MatLab. One can write simple perl
3913年9月21日土曜日
40. Perl Data Language
standard Perl the ability to compactly store and
speedily manipulate the large N-dimensional
data arrays which are the bread and butter of
scientific computing.
PDL turns Perl into a free, array-oriented,
numerical language similar to (but, we believe,
better than) such commercial packages as IDL
and MatLab. One can write simple perl
We want
Hash Object
4013年9月21日土曜日
41. #!/usr/bin/env perl
use strict;
use warnings;
use Data::Dumper;
use PDL;
my $obj;
$obj = pdl([[1,2,3],[4,5,6]]);
print $obj;
# [
# [1 2 3]
# [4 5 6]
# ]
$obj = pdl([{a => 1, b => 2, c => 3}, {a => 4, b => 5, c => 6}]);
# Hash given as a pdl - but not {PDL} key! at Basic/Core/
Core.pm.PL (i.e. PDL::Core.pm) line 1292.
# 工エェ(´Д`)ェエ工
4113年9月21日土曜日
50. Data::Cube 1. Data
Date Country SalesPerson Product Units Unit_Cost Total
3/15/2005 US Sorvino Pencil 56 2.99 167.44
3/7/2006 US Sorvino Binder 7 19.99 139.93
8/24/2006 US Sorvino Desk 3 275.00 825.00
9/27/2006 US Sorvino Pen 76 1.99 151.24
5/22/2005 US Thompson Pencil 32 1.99 63.68
10/14/2006 US Thompson Binder 57 19.99 1139.43
4/18/2005 US Andrews Pencil 75 1.99 149.25
4/10/2006 US Andrews Pencil 66 1.99 131.34
10/31/2006 US Andrews Pencil 114 1.29 147.06
5013年9月21日土曜日
51. Data::Cube 2. Usage
my $file = shift;
my $data = Text::CSV::Slurp->load(file => $file);
my $cube;
say "============================================================";
say "raw data size: ".(scalar @$data)."n";
say "n============================================================";
$cube = new Data::Cube("experience");
$cube->put($data);
say Dumper $cube->rollup(noValues => 1);
say "n============================================================";
$cube->add_dimension("skill");
say Dumper $cube->rollup(noValues => 1);
5113年9月21日土曜日
52. Data::Cube 2. Usage
my $file = shift;
my $data = Text::CSV::Slurp->load(file => $file);
my $cube;
say "============================================================";
say "raw data size: ".(scalar @$data)."n";
say "n============================================================";
$cube = new Data::Cube("experience");
$cube->put($data);
say Dumper $cube->rollup(noValues => 1);
say "n============================================================";
$cube->add_dimension("skill");
say Dumper $cube->rollup(noValues => 1);
たったのこれだけ
5213年9月21日土曜日
64. Summary: Example
Time Series
sales, repeat rate, DAU, system info, activities
Effects of trial / campaign
attribution, condition, cost, cash back, etc.
6413年9月21日土曜日