Algorithm-AM

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

    changed back C99 datatypes until further testing
2.37      2014-02-07 18:52:07 America/Los_Angeles
    removed non-existent dependency that prevented installation
2.36      2014-02-07 16:24:26 America/Los_Angeles
    remove given/when (which trigger 'experimental' warnings)
    better handling of project files
    line directives added to ginormous eval statement
    add methods to Project for adding data and test items
    use C99 datatypes in AM.xs to ensure correct bit sizes
2.35      2013-12-05 19:50:27 America/Los_Angeles
    created Algorithm::AM::Project to handle all data file processing
        - also checks size of data vectors!
        - has lots of accessors and new error checking, including problems with number of variables!
    caller's autoflush setting is no longer clobbered
    lots more refactoring
    removed use of 'given' and 'when', which are experimental and caused warnings and therefore failed tests
2.34      2013-09-03 22:39:22 America/Los_Angeles
    Considerable refactoring of how arguments and variables are handled
        - use object or data hash instead of automatic importing
        - most of them renamed, and possible values have changed
    - new tests for errors and warnings

DEVELOPING.md  view on Meta::CPAN

    make

To run tests:

    make test

If you are on Windows, I recommend using Strawberry Perl, in which case `make` above should be replaced with `gmake`.

# Releasing

The release process and a ton of authoring tests are managed using dzil. To install author dependencies:

    dzil authordeps --missing | cpanm --notest
    dzil listdeps --author --missing | cpanm --notest

Then, to run the author tests:

    dzil test --author --release

To release the module:

INSTALL  view on Meta::CPAN

    % make install

On Windows platforms, you should use `dmake` or `nmake`, instead of `make`.

If your perl is system-managed, you can create a local::lib in your home
directory to install modules to. For details, see the local::lib documentation:
https://metacpan.org/pod/local::lib

The prerequisites of this distribution will also have to be installed manually. The
prerequisites are listed in one of the files: `MYMETA.yml` or `MYMETA.json` generated
by running the manual build process described above.

## Configure Prerequisites

This distribution requires other modules to be installed before this
distribution's installer can be run.  They can be found under the
"configure_requires" key of META.yml or the
"{prereqs}{configure}{requires}" key of META.json.

## Other Prerequisites

lib/Algorithm/AM.pm  view on Meta::CPAN


    unless ($self->{pointers}->{'grand_total'}) {
        #TODO: is this tested yet?
        if($log->is_warn){
            $log->warn('No training items considered. ' .
                'No prediction possible.');
        }
        return;
    }

    $result->_process_stats(
        # TODO: after refactoring to a "guts" object,
        # just pass that in
        $self->{sum},
        $self->{pointers},
        $self->{itemcontextchainhead},
        $self->{itemcontextchain},
        $self->{context_to_class},
        $self->{raw_gang},
        $lattice_sizes,
        $self->{context_size}

lib/Algorithm/AM/Result.pm  view on Meta::CPAN

    return \$info;
}

# input several variables from AM's guts (sum, pointers,
# itemcontextchainhead and itemcontextchain). Calculate the
# prediction statistics, and
# store information needed for computing analogical sets.
# Set result to tie/correct/incorrect and also is_tie if
# expected class is provided, and high_score, scores, winners, and
# total_points.
sub _process_stats {
    my ($self, $sum, $pointers,
        $itemcontextchainhead, $itemcontextchain, $context_to_class,
        $raw_gang, $active_feats, $context_size) = @_;
    my $total_points = $pointers->{grand_total};
    my $max = '';
    my @winners;
    my %scores;

    # iterate all possible classes and store the ones that have a
    # non-zero score. Store the high-scorers, as well.

ppport.h  view on Meta::CPAN

PL_eval_root|5.005000||Viu
PL_evalseq|5.005000||Viu
PL_eval_start|5.005000||Viu
PL_exit_flags|5.006000|5.006000|
PL_exitlist|5.005000||Viu
PL_exitlistlen|5.005000||Viu
PL_expect||5.003007|ponu
PL_fdpid|5.005000||Viu
PL_filemode|5.005000||Viu
PL_firstgv|5.005000||Viu
PL_forkprocess|5.005000||Viu
PL_formtarget|5.005000||Viu
PL_GCB_invlist|5.021009||Viu
PL_generation|5.005000||Viu
PL_gensym|5.005000||Viu
PL_globalstash|5.005000||Viu
PL_globhook|5.015005||Viu
PL_hash_rand_bits|5.017010||Viu
PL_HASH_RAND_BITS_ENABLED|5.018000||Viu
PL_hash_rand_bits_enabled|5.018000||Viu
PL_HasMultiCharFold|5.017005||Viu

ppport.h  view on Meta::CPAN

PREV_RANGE_MATCHES_INVLIST|5.023002||Viu
printbuf|5.009004||Viu
print_bytes_for_locale|5.027002||Viu
print_collxfrm_input_and_return|5.025004||Viu
printf|5.003007||Viu
PRINTF_FORMAT_NULL_OK|5.009005|5.009005|Vn
printf_nocontext|5.007001|5.007001|vdnu
PRIVLIB|5.003007|5.003007|Vn
PRIVLIB_EXP|5.003007|5.003007|Vn
PRIVSHIFT|5.003007||Viu
process_special_blocks|5.009005||Viu
PROCSELFEXE_PATH|5.007003|5.007003|Vn
PRUNE|5.009005||Viu
PSEUDO|5.009004||Viu
pthread_addr_t|5.005000||Viu
PTHREAD_ATFORK|5.007002||Viu
pthread_attr_init|5.006000||Viu
PTHREAD_ATTR_SETDETACHSTATE|5.006000||Viu
pthread_condattr_default|5.005000||Viu
PTHREAD_CREATE|5.006000||Viu
pthread_create|5.008001||Viu

ppport.h  view on Meta::CPAN

  grep { exists $API{$_} } $code =~ /(\w+)/mg;
}

while (<DATA>) {
  if ($hint) {

    # Here, we are in the middle of accumulating a hint or warning.
    my $end_of_hint = 0;

    # A line containing a comment end marker closes the hint.  Remove that
    # marker for processing below.
    if (s/\s*$rcce(.*?)\s*$//) {
        die "Nothing can follow the end of comment in '$_'\n" if length $1 > 0;
        $end_of_hint = 1;
    }

    # Set $h to the hash of which type.
    my $h = $hint->[0] eq 'Hint' ? \%hints : \%warnings;

    # Ignore any leading and trailing white space, and an optional star comment
    # continuation marker, then place the meat of the line into $1



( run in 0.271 second using v1.01-cache-2.11-cpan-8d75d55dd25 )