ccs_writeldac
Write a 2d PDL::CCS::Nd (Document x Term) matrix as an LDA-C text file. If the "transpose" option is
specified and true, the input matrix $ccs is treated as as a (Term x Document) matrix, and output lines
correspond to logical dimension 1 of $ccs. Otherwise, output lines correspond to logical dimension 0 of
$ccs, which is expected to be a (Document x Term) matrix.
ccs_writeldac($ccs,$filename_or_fh)
ccs_writeldac($ccs,$filename_or_fh,\%opts)
Options %opts:
header => $bool, ##-- do/don't write a header to the output file (default=do)
transpose => $bool, ##-- treat input $ccs as (Term x Document) matrix (default=don't)
ccs_readldac
Read a 2d (Document x Term) matrix from an LDA-C text file as a PDL::CCS::Nd object. If the "transpose"
option is specified and true, the output matrix $ccs will be a (Term x Document) matrix, and input lines
correspond to logical dimension 1 of $ccs. Otherwise, input lines correspond to logical dimension 0 of
$ccs, which will be returned as a (Document x Term) matrix.
$ccs = ccs_readldac($filename_or_fh)
$ccs = ccs_readldac($filename_or_fh,\%opts)
Options %opts:
header => $bool, ##-- do/don't try to read header data from the output file (default=do)
type => $type, ##-- value datatype (default: from header or $PDL::IO::Misc::deftype)
transpose => $bool, ##-- generate a (Term x Document) matrix (default=don't)
sorted => $bool, ##-- assume input is lexicographically sorted (only if not transposed; default=don't)