Skip to content

ADVI can write 1.#INF on Windows, which cannot be read #2283

@bgoodri

Description

@bgoodri

Summary:

It is possible for ADVI to obtain a realization that is infinite, and if it writes that to a CSV file, reading the CSV file breaks. We should coerce this to the nearest floating point number before writing.

Description:

CSV files should only have finite numerical values below the headings

Reproducible Steps:

In R 3.2.x for Windows, load rstanarm 2.15.x and do

fit <- stan_glm(mpg ~ ., data = mtcars, prior = hs_plus(4, 1, 2, 0.5), 
                       seed = 12345 algorithm = "meanfield", QR = TRUE)

Current Output:

scan() expected 'a real', got '1.#INF'

Expected Output:

Finite estimates

Additional Information:

Provide any additional information here.

Current Version:

v2.15.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions