Skip to content

index out of bounds error using logistic_regression #256

Open
@EdmundsEcho

Description

@EdmundsEcho

I'm submitting a

  • [ x] bug report.
  • improvement.
  • feature request.

Current Behaviour:

When I call

 let lr = LogisticRegression::fit(x, y, Default::default())?;

I get an index out of bounds error.

thread 'main' panicked at 'index out of bounds: the len is 4852833 but the index is 4852833'

Expected Behaviour:

It should compute the linear regression without throwing an error.

Steps to reproduce:

These are the input shapes

y vec height: 52181  // Vec<u32>
x matrix shape: (52181, 94) // DenseMatrix<f64>

Snapshot:

Environment:

  • rustc version: rustc 1.68.2 (9eb3afe9e 2023-03-27)
  • cargo version: cargo 1.68.2 (6feb7c9cf 2023-03-26)
  • OS details: MacOS 13.3 M1

Do you want to work on this issue?

yes. I'm trying to debug it now. This said, I'm new to this lib and so want to make sure I'm not missing something.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions