Menu

Problem with full covariance matrix

Help
2015-10-31
2015-11-02
  • Marcin Plonkowski

    In file gauden.c is function:

    gauden_invert_variance_full(gauden_t *g)
    {
        uint32 i, j, k;
    
        for (i = 0; i < g->n_mgau; i++) {
        for (j = 0; j < g->n_feat; j++) {
            for (k = 0; k < g->n_density; k++) {
            /* Yes, this works in-place (we hope) */
            if (invert(g->fullvar[i][j][k], g->fullvar[i][j][k],
                   g->veclen[j]) != S3_SUCCESS) {
     ~~~~~~~~~~
    
     where method invert has 2 the same parameters g->fullvar[i][j][k].
    
     And in file matrix.c is function:
    

    invert(float32 ** ainv, float32 ** a, int32 n)
    {
    char uplo;
    float32 **tmp_a;
    int32 info, nrhs, i;

    /* Construct an identity matrix. */
    memset(ainv[0], 0, sizeof(float32) * n * n);
        for (i = 0; i < n; i++)
        ainv[i][i] = 1.0;
    

    ~~~~~~~~~~

    This causes, that method invert calculate inversion of identity matrix, instead of inversion of g->fullvar[i][j][k].

    Has anyone seen this error?

     

    Last edit: Nickolay V. Shmyrev 2015-11-01
    • Nickolay V. Shmyrev

      This is a bug indeed which appeared during sphinxtrain refactoring when invert funciton from sphinxtrain was replaced by sphinxbase. I fixed it in trunk, thank you very much for report!

       
  • Marcin Plonkowski

    Thank you.

    I have yet to find one small mistake.
    In file s3acc_io.c (sphinxtrain-5prealpha-win32), in function rdacc_den_full, should be exclamation mark before ck_readable method:

    int
    rdacc_den_full(...)
    {
    ...
    sprintf(fn, "%s/gauden_counts", dir);

    if (!ck_readable(fn)) {
      //^
        E_ERROR("Unable to access %s\n", fn);
        return S3_ERROR;
    }
    
     

    Last edit: Marcin Plonkowski 2015-11-02
    • Nickolay V. Shmyrev

      Thanks, we fixed this in sources quite some time ago, I probably need to update win32 package, it is slightly outdated.

       

Log in to post a comment.