Skip to content

LogisticRegression.score returns an empty dask array #971

Open
@sj-ucsd

Description

@sj-ucsd

Describe the issue:
Unable to print logistic regression score as a float instead get an empty array:

ArrayChunkBytes8 B8 BShape()()Dask graph1 chunks in 32 graph layersData typefloat64 numpy.ndarray | Array | Chunk | Bytes | 8 B | 8 B | Shape | () | () | Dask graph | 1 chunks in 32 graph layers | Data type | float64 numpy.ndarray

8 B | 8 B
() | ()
1 chunks in 32 graph layers
float64 numpy.ndarray


Minimal Complete Verifiable Example:

# Put your MCVE code here
```from dask_ml.linear_model import LogisticRegression
from dask_glm.datasets import make_classification
X, y = make_classification()
lr = LogisticRegression()
lr.fit(X, y)
lr.score(X, y)

**Anything else we need to know?**:

**Environment**:

- Dask version:'2023.4.1'
- Python version:3.9
- Operating System:Mac OS
- Install method (conda, pip, source): Conda

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