Algorithm-Classifier-IsolationForest
view release on metacpan or search on metacpan
lib/Algorithm/Classifier/IsolationForest.pm view on Meta::CPAN
} ## end sub _subsample
#-------------------------------------------------------------------------------
# Recursively build one isolation tree.
#
# A node is one of:
# leaf { leaf => 1, size => N }
# axis { attr => A, split => S, left => ..., right => ... }
# oblique { idx => [..], coef => [..], b => B, left => ..., right => ... }
#
# In both split styles the choice is restricted to features that actually vary
# across the points reaching the node: this avoids wasted levels on constant
# columns and lets a node leaf out exactly when its points are indistinguishable.
#-------------------------------------------------------------------------------
sub _build_tree {
my ( $self, $X, $depth, $limit ) = @_;
my $size = scalar @$X;
return { leaf => 1, size => $size }
if $depth >= $limit || $size <= 1;
t/pod-coverage.t view on Meta::CPAN
plan( skip_all => "Author tests not required for installation" );
}
# Ensure a recent version of Test::Pod::Coverage
my $min_tpc = 1.08;
eval "use Test::Pod::Coverage $min_tpc";
plan skip_all => "Test::Pod::Coverage $min_tpc required for testing POD coverage"
if $@;
# Test::Pod::Coverage doesn't require a minimum Pod::Coverage version,
# but older versions don't recognize some common documentation styles
my $min_pc = 0.18;
eval "use Pod::Coverage $min_pc";
plan skip_all => "Pod::Coverage $min_pc required for testing POD coverage"
if $@;
all_pod_coverage_ok();
( run in 0.510 second using v1.01-cache-2.11-cpan-e1769b4cff6 )