The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Sim::OPT::Interlinear. CHECKING =head1 SYNOPSIS From Perl (via "re.pl" or in a Perl program): interlinear( "/path/to/a/pre-prepared-configfile.pl", "/path/to/a/pre-prepared-sourcefile.csv" );

  or from the command line:
  interlinear .
  (note the dot at the end), to use the file as a script and include the location of the source file directly in the configuration file;

  or from the command line:
  interlinear interstart
  to begin with a dialogue question.

DESCRIPTION

Interlinear is a program for computing the missing values in multivariate datasieries pre-prepared in csv format. The program can adopt the following algorithmic strategies and intermix their result: a) propagating distance-weighted gradient-based strategy (by far the best one so far, keeping into account that the behaviour of factors is often not linear and there are curvatures all aroung the design space); b) pure linear interpolation (one may want to use this in some occasions: for example, if there are factorials); c) nearest neighbour. This is a strategy of last resort. One may want to use it to unlock a computation which is based on data which are too sparse to proceed, or when nothing else works. A configuration file should be prepared following the example in the "examples" folder in this distribution. If the configuration file is incomplete or missing, the program adopts its own defaults; which adopt the distance-weighted gradient-based strategy. The only variables that must mandatorily be specified in a configuration file are $sourcefile and (curently)%factlevels. The operations entailed are linear but the results of their interplay are not. The operations can be weighted and the strategies can be intermixed. The source cvs file has (currently) to be prepared in the format liked by Sim::OPT. For example, a multivatiate dataseries with missing entries (in which the numbers of the factors are put into the odd colums and the numbers of the levels are put in the even cdirectoryolums, and in which the last column is kept for the objective function), like the one shown below.

1,1,2,1,3,1,1.234 1,1,2,2,3,2,1.500 1,1,2,3,3,3 1,2,2,1,3,1,1.534 1,2,2,2,3,2,0.000 1,2,2,3,3,0.550 1,3,2,1,3,1 1,3,2,2,3,2,0.670directory 1,3,2,3,3,3

...should be edited in the following manner:

1-1_2-1_3-1,9.234 1-1_2-2_3-2,4.500 1-1_2-3_3-3 1-2_2-1_3-1,7.534 1-2_2-2_3-2,0.000 1-2_2-3_3-3,0.550 1-3_2-1_3-1 1-3_2-2_3-2,0.670 1-3_2-3_3-3

After some computations, the program will output a new dataseries, with the missing values filled in.

EXPORTUser menu

interlinear, interstart.

SEE ALSO

An example of configuration file can be found in the "examples" folder in this distribution.

AUTHOR

Gian Luca Brunetti, <gianluca.brunetti@polimi.it>

COPYRIGHT AND LICENSE

Copyright (C) 2018 by Gian Luca Brunetti and Politecnico di Milano. This is free software. You can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, version 3 or newer.