Author image Takeshi Miki
and 1 contributors

NAME

Algorithm::DimReduction - Dimension Reduction tool that relies on 'Octave'

SYNOPSIS

  use Algorithm::DimReduction;

  my $matrix = [
    [ 1, 2, 3, 4, 5],
    [ 6, 7, 8, 9,10],
    [11,12,13,14,15],
  ];

  my $reductor = Algorithm::DimReduction->new;

  # matrix has been analyzed beforehand
  my $result   = $reductor->analyze( $matrix );
  print Dumper $result->contribution_rate;

  # save and load
  $reductor->save_analyzed($result);
  my $result = $reductor->load_analyzed('save_dir');

  # reduce it
  my $reduce_to = 3;
  my $reduced_matrix = $reductor->reduce( $result, $reduce_to );

DESCRIPTION

Algorithm::DimReduction does Dimension Reduction with Singular value decomposition (SVD).

It relies on svd command of 'Octave'.

METHODS

analyze( $matrix )

reduce( $result_of_analyze, $reduce_to )

save_analyzed( $result_of_analyze, $save_dir )

load_analyzed( $save_dir )

AUTHOR

Takeshi Miki <t.miki@nttr.co.jp>

LICENSE

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

SEE ALSO