about summary refs log tree commit diff
path: root/sourcecodes/parameter_learning/code_backup
diff options
context:
space:
mode:
authorPjotr <wrk@bosa.lan>2026-10-03 10:26:34 +0000
committerPjotr <wrk@bosa.lan>2026-10-03 10:26:44 +0000
commit605900ddc699017695f9c93ab5a58a8100a4bf30 (patch)
tree1646d8a01a273c4768e718cc4c1467978fd7bfe9 /sourcecodes/parameter_learning/code_backup
parent4e83398e9ec6ef4e9aaf778a2311b2214ae56397 (diff)
downloadgn-bnw-605900ddc699017695f9c93ab5a58a8100a4bf30.tar.gz
bn_genenet: sanitize GN2 trait names containing spaces
GN2 trait display names often contain spaces ("Age at death"), but
BNW's file format does not allow them: the octave parsers split on
WHITESPACE (strtok), so a spaced name corrupts the header -- the
variable count no longer matches the labels and structure learning
dies with "A(0,_): subscripts must be either integers 1 to (2^63)-1
or logicals" in mk_adj_mat (observed on production with a real GN2
dataset).

bn_genenet.php now sanitizes the NAME ROW of the GN2 payload (content
before the first semicolon, i.e. before the comma->tab conversion):
whitespace inside a name becomes an underscore.  A wrong first
attempt applied the sanitization after the conversion and collapsed
the tabs as well, merging all names into one variable.

New test t21 posts spaced trait names and runs structure learning
through to the rendered SVG.  Suite: 27/27 (BNW_LOCAL_SOURCE build).
Diffstat (limited to 'sourcecodes/parameter_learning/code_backup')
0 files changed, 0 insertions, 0 deletions