| Algorithm-DimReduction documentation | Contained in the Algorithm-DimReduction distribution. |
Algorithm::DimReduction::Result - Result object of analyze method
# you can check contribution_rate
my $result = $reductor->analyze( $matrix );
print Dumper $result->contribution_rate;
# save and load
$reductor->save_analyzed($result);
my $result = $reductor->load_analyzed('save_dir');
# it will be used as argument of reduce()
$reductor->reduce( $result, $reduce_to);
Algorithm::DimReduction::Result is result of analyze method.
It will be used as argument of reduce method.
Takeshi Miki <t.miki@nttr.co.jp>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
| Algorithm-DimReduction documentation | Contained in the Algorithm-DimReduction distribution. |
package Algorithm::DimReduction::Result; use strict; use warnings; sub new { my $class = shift; my %args = @_; return bless { %args }, $class; } sub contribution_rate { my $self = shift; my $eigens = $self->{eigens}; my @rate; for my $i( 1 .. @$eigens){ push @rate, {reduct_to => $i, rate => $eigens->[$i-1] }; } return \@rate; } 1; __END__