You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@systemml.apache.org by Janardhan Pulivarthi <ja...@gmail.com> on 2017/09/05 16:31:23 UTC

[QUESTION] about initialization of outputs , depends on if-else execution. Thanks.

Hi,

1. *Parser Error:*This is one problem encountered during testing of GLM
scripts. I have fixed this problem by initializing before the script, but
can we do it the other way?

@
https://github.com/apache/systemml/blob/1cbfdef3fad5235b692c372ec94bcade7f1b9ff9/scripts/algorithms/GLM-predict.dml#L329

*dml script:*
```
if (fileO != " ") {
write (str, fileO);
} else {
print (str);
}
```
*Test script with MLContext*:
```
glmp.in("X", X).in("Y", Y).in("B", B)......out("means").out("*str*");  ml.
execute(glmp);
```
*Error thrown:*
*```*
WARN parser.StatementBlock: WARNING: [line 329:8] -> *str* --
Initialization of *str* depends on *if-else* execution

```

2. *Test matrix:* When I have tested the `*GLM.dml*` script with
matrix *10x3*, the solution did not converge,
So, I have opted for the *2468x1007* matrix, but what is probably the
best matrix size for testing with MLContext.


Thank you,
Janardhan

Re: [QUESTION] about initialization of outputs , depends on if-else execution. Thanks.

Posted by Janardhan Pulivarthi <ja...@gmail.com>.
Hi Niketan,

1. Please correct me here, -> https://github.com/apache/
systemml/pull/651/files#diff-ef5e4f92ced39a334cdce976800ace26R139

2. please refer this comment ->  https://github.com/apache/
systemml/pull/651#issuecomment-326902771

Thank you,
Janardhan

Re: [QUESTION] about initialization of outputs , depends on if-else execution. Thanks.

Posted by Janardhan Pulivarthi <ja...@gmail.com>.
Hi Niketan,

1. +1

2. these are the datasets and their corresponding results.


   1. Test with getRandomMatrix(2468, 1007, 0, 1,
   sparse?sparsity2:sparsity1, -1);

23:45:04 Running
org.apache.sysml.test.integration.mlcontext.algorithms.MLContextGLMTest
23:45:04 Tests run: 6, Failures: 0, Errors: 0, Skipped: 0, Time
elapsed: 7.43 sec - in
org.apache.sysml.test.integration.mlcontext.algorithms.MLContextGLMTest


   1. Test with getRandomMatrix(10, 3, 0, 1, sparse?sparsity2:sparsity1,
   -1);

failure at org.apache.sysml.test.integration.mlcontext.algorithms.MLContextGLMTest.testGLMPoissonSparse(MLContextGLMTest.java:49)

BEGIN GLM SCRIPT
Reading X...
Reading Y...
BEGIN IRLS ITERATIONS...
Iter #1 completed, ||z|| = 0.0E0, trust_delta = 1.1006E0, reached = 0,
||g|| = 0.0E0, new_log_l = -InfinityE0, log_l_change = -InfinityE0,
rho = 0.0E0
Iter #2 completed, ||z|| = 0.0E0, trust_delta = 2.7515E-1, reached =
0, ||g|| = 0.0E0, new_log_l = -InfinityE0, log_l_change = -InfinityE0,
rho = 0.0E0
Iter #3 completed, ||z|| = 0.0E0, trust_delta = 6.8787E-2, reached =
0, ||g|| = 0.0E0, new_log_l = -InfinityE0, log_l_change = -InfinityE0,
rho = 0.0E0
Iter #4 completed, ||z|| = 0.0E0, trust_delta = 1.7197E-2, reached =
0, ||g|| = 0.0E0, new_log_l = -InfinityE0, log_l_change = -InfinityE0,
rho = 0.0E0
Iter #5 completed, ||z|| = 0.0E0, trust_delta = 4.2992E-3, reached =
0, ||g|| = 0.0E0, new_log_l = -InfinityE0, log_l_change = -InfinityE0,
rho = 0.0E0
Did not converge.
Duration: 644ms




On Thu, Sep 7, 2017 at 11:49 PM, Niketan Pansare <np...@us.ibm.com> wrote:

>
>
> Hi Janardhan,
>
> 1. You can ignore the message as it is warning not an error, especially if
> 'Initialization of *str* depends on *if-else* execution' is intentional.
>
> 2. What dataset are you using?
>
> Thanks
>
> Niketan
>
> > On Sep 5, 2017, at 9:32 AM, Janardhan Pulivarthi
> <ja...@gmail.com> wrote:
> >
> > Hi,
> >
> > 1. *Parser Error:*This is one problem encountered during testing of GLM
> > scripts. I have fixed this problem by initializing before the script, but
> > can we do it the other way?
> >
> > @
> >
> https://urldefense.proofpoint.com/v2/url?u=https-3A__github.
> com_apache_systemml_blob_1cbfdef3fad5235b692c372ec94bca
> de7f1b9ff9_scripts_algorithms_GLM-2Dpredict.dml-23L329&d=
> DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=HzVC6v79boGYQrpc383_
> Kao_6a6SaOkZrfiSrYZVby0&m=Jy-epXDFgeWR8lxdj1kBB3n-
> Pquo82XGVOyIcKWXqNU&s=dp_ZZRT1E3CgaQyythr7IBqBJC1Ezk9ZeopnRM_U0ik&e=
>
> >
> > *dml script:*
> > ```
> > if (fileO != " ") {
> > write (str, fileO);
> > } else {
> > print (str);
> > }
> > ```
> > *Test script with MLContext*:
> > ```
> > glmp.in("X", X).in("Y", Y).in("B", B)......out("means").out("*str*");
> ml.
> > execute(glmp);
> > ```
> > *Error thrown:*
> > *```*
> > WARN parser.StatementBlock: WARNING: [line 329:8] -> *str* --
> > Initialization of *str* depends on *if-else* execution
> >
> > ```
> >
> > 2. *Test matrix:* When I have tested the `*GLM.dml*` script with
> > matrix *10x3*, the solution did not converge,
> > So, I have opted for the *2468x1007* matrix, but what is probably the
> > best matrix size for testing with MLContext.
> >
> >
> > Thank you,
> > Janardhan
>

Re: [QUESTION] about initialization of outputs , depends on if-else execution. Thanks.

Posted by Niketan Pansare <np...@us.ibm.com>.

Hi Janardhan,

1. You can ignore the message as it is warning not an error, especially if
'Initialization of *str* depends on *if-else* execution' is intentional.

2. What dataset are you using?

Thanks

Niketan

> On Sep 5, 2017, at 9:32 AM, Janardhan Pulivarthi
<ja...@gmail.com> wrote:
>
> Hi,
>
> 1. *Parser Error:*This is one problem encountered during testing of GLM
> scripts. I have fixed this problem by initializing before the script, but
> can we do it the other way?
>
> @
>
https://urldefense.proofpoint.com/v2/url?u=https-3A__github.com_apache_systemml_blob_1cbfdef3fad5235b692c372ec94bcade7f1b9ff9_scripts_algorithms_GLM-2Dpredict.dml-23L329&d=DwIBaQ&c=jf_iaSHvJObTbx-siA1ZOg&r=HzVC6v79boGYQrpc383_Kao_6a6SaOkZrfiSrYZVby0&m=Jy-epXDFgeWR8lxdj1kBB3n-Pquo82XGVOyIcKWXqNU&s=dp_ZZRT1E3CgaQyythr7IBqBJC1Ezk9ZeopnRM_U0ik&e=

>
> *dml script:*
> ```
> if (fileO != " ") {
> write (str, fileO);
> } else {
> print (str);
> }
> ```
> *Test script with MLContext*:
> ```
> glmp.in("X", X).in("Y", Y).in("B", B)......out("means").out("*str*");
ml.
> execute(glmp);
> ```
> *Error thrown:*
> *```*
> WARN parser.StatementBlock: WARNING: [line 329:8] -> *str* --
> Initialization of *str* depends on *if-else* execution
>
> ```
>
> 2. *Test matrix:* When I have tested the `*GLM.dml*` script with
> matrix *10x3*, the solution did not converge,
> So, I have opted for the *2468x1007* matrix, but what is probably the
> best matrix size for testing with MLContext.
>
>
> Thank you,
> Janardhan