NAME
DiaColloDB::Profile::MultiDiff - diachronic collocation db, (co-)frequency profile diffs, by date
ALIASES
SYNOPSIS
##========================================================================
## PRELIMINARIES
use DiaColloDB::Profile::MultiDiff;
##========================================================================
## Constructors etc.
$mpd = CLASS_OR_OBJECT->new(%args);
##========================================================================
## I/O: JSON
$obj = $CLASS_OR_OBJECT->loadJsonData( $data,%opts);
##========================================================================
## I/O: Text
undef = $CLASS_OR_OBJECT->saveTextHeader($fh, hlabel=>$hlabel, titles=>\@titles);
##========================================================================
## I/O: HTML
$bool = $mp->saveHtmlFile($filename_or_handle, %opts);
##========================================================================
## Compilation
@ppairs = $CLASS_OR_OBJECT->align($mp1,$mp2);
$mpd = $mpd->populate($mp1,$mp2);
$class = $CLASS_OR_OBJECT->pclass();
$mp_or_undef = $CLASS_OR_OBJECT->trimPairs(\@pairs, %opts);
DESCRIPTION
DiaColloDB::Profile::MultiDiff is the top-level class for representing diachronic collocate frequency comparison-profile data over multiple date-slices as arising from the comparison of two DiaColloDB::Profile::Multi objects. The API closely mirrors that of the DiaColloDB::Profile::Diff class used to represent slice-wise sub-profiles.
Globals & Constants
- Variable: @ISA
-
DiaColloDB::Profile::MultiDiff inherits from DiaColloDB::Profile::Multi.
Constructors etc.
- new
-
$mpd = CLASS_OR_OBJECT->new(%args); $mpd = CLASS_OR_OBJECT->new($mp1,$mp2,%args);
%args, object structure:
profiles => \@profiles, ##-- ($profile, ...) : sub-diffs, with {label} key titles => \@titles, ##-- item group titles (default:undef: unknown) qinfo => \%qinfo, ##-- query info (optional; keys prefixed with 'a' or 'b'): see DiaColloDB::Profile::Multi populate => $bool, ##-- auto-populate() if $mp1 and $mp2 are specified? (default=1)
I/O: JSON
- loadJsonData
-
$obj = $CLASS_OR_OBJECT->loadJsonData( $data,%opts);
guts for loadJsonString(), loadJsonFile()
I/O: Text
- saveTextHeader
-
undef = $CLASS_OR_OBJECT->saveTextHeader($fh, hlabel=>$hlabel, titles=>\@titles);
print column title header for text output.
I/O: HTML
- saveHtmlFile
-
$bool = $mp->saveHtmlFile($filename_or_handle, %opts);
Save flat HTML table data with rows of the form
SCOREa SCOREb DIFF LABEL ITEM2... table => $bool, ##-- include <table>..</table> ? (default=1) body => $bool, ##-- include <html><body>..</html></body> ? (default=1) qinfo => $varname, ##-- include <script> for qinfo data? (default='qinfo') header => $bool, ##-- include header-row? (default=1) format => $fmt, ##-- printf score formatting (default="%.2f")
Compilation
- align
-
@ppairs = $CLASS_OR_OBJECT->align($mp1,$mp2); \@ppairs = $CLASS_OR_OBJECT->align($mp1,$mp2);
aligns subprofile-pairs from $mp1 and $mp2
$mp1, $mp2 are either:
subprofiles are aligned in stored order
arguments must be EITHER singletons (1 subprofile) OR of same size; this lets you compare e.g. a global profile with a sliced one by something like PDL's "implicit threading".
- populate
-
$mpd = $mpd->populate($mp1,$mp2);
populates multi-diff by subtracting $mp2 sub-profile scores from $mp1; uses $mpd->align() to align sub-profiles.
- pclass
-
$class = $CLASS_OR_OBJECT->pclass();
subprofile class for psum().
- trimPairs
-
$mp_or_undef = $CLASS_OR_OBJECT->trimPairs(\@pairs, %opts);
%opts: as for DiaColloDB::Profile::Multi::trim(), including 'global' option
AUTHOR
Bryan Jurish <moocow@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2015-2016 by Bryan Jurish
This package is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.14.2 or, at your option, any later version of Perl 5 you may have available.
SEE ALSO
dcdb-create.per(1), dcdb-query.perl(1), dcdb-info.perl(1), dcdb-export.perl(1), dcdb-dump.perl(1), DiaColloDB(3pm), perl(1), ...