diff options
| author | Pjotr <wrk@bosa.lan> | 2026-09-28 14:48:57 +0000 |
|---|---|---|
| committer | Pjotr <wrk@bosa.lan> | 2026-09-28 14:51:45 +0000 |
| commit | 7f460113cc9c7eca91935549c25d78a9393e0977 (patch) | |
| tree | e9a05e98fdaf571cd15975c6a1e3e73727b84bf2 /sourcecodes/parameter_learning/drawFigure.m | |
| parent | 8380798b1c60c9844b9952921a8a7361e2fb28cd (diff) | |
| download | gn-bnw-7f460113cc9c7eca91935549c25d78a9393e0977.tar.gz | |
container: deployment fixes for the Guix container/VM
Changes previously carried as bnw-container-paths.patch in guix-bioinformatics, now applied to the source directly: * unify data directories on /var/lib/genenet/bnw (was /tmp/bnw and ./data/ mixed) * make the shell_exec paths __DIR__-relative and the example/octave helper scripts location-independent, so php-fpm can run them from any working directory * use core-octave randn/exp instead of the statistics-package normrnd/normpdf (not available in the container's octave) * nnodes: strtrim before strfind so the node count parses with the container's octave output * python3 instead of a hardcoded /home/jziebart path * add diag.php, a debug page showing the request and data state * bn_genenet.php: serve the GeneNetwork (GN2) handshake server-side; the My_Gennenet POST is converted (commas -> tabs, semicolons -> newlines) in PHP and the prepared-data page is returned in ONE request. This removes the raw-echo of into a JavaScript string (an XSS hole on public deployments) and is backward compatible for GN2 (same POST, better response).
Diffstat (limited to 'sourcecodes/parameter_learning/drawFigure.m')
| -rw-r--r-- | sourcecodes/parameter_learning/drawFigure.m | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sourcecodes/parameter_learning/drawFigure.m b/sourcecodes/parameter_learning/drawFigure.m index 8255f6b9..ea752556 100644 --- a/sourcecodes/parameter_learning/drawFigure.m +++ b/sourcecodes/parameter_learning/drawFigure.m @@ -161,7 +161,7 @@ for i = 1:nnodes, for j=1:no_gaussians normrnd_count = int16(1000*weights(j)); if normrnd_count > 0 - violin_data = normrnd(s.mean(j),sqrt(s.cov(j)),normrnd_count,1); + violin_data = s.mean(j) + sqrt(s.cov(j))*randn(normrnd_count,1); %violin_data = normrnd(s.mean(j),sqrt(s.cov(j)),1000,1); for k = 1:size(violin_data) fprintf(vfile,'%6.4f\n',violin_data(k)); @@ -267,7 +267,7 @@ for i = 1:100, end for i = 1:101, - y_vals(i,1) = normpdf(x_vals(i,1),mu,Sigma); + y_vals(i,1) = exp(-((x_vals(i,1)-mu)^2)/(2*Sigma))/(sqrt(2*pi)*Sigma); end end |
