LogisticRegression.score returns an empty dask array
- Dominant language
- Python
- Stars
- 951
- Forks
- 262
- PR merge metrics
- No merged PRs in 30d
Description
**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**:
```python
# 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
Contributor guide
Research direction
Start by running the pasted LogisticRegression example and inspecting the score method on dask_ml.linear_model.LogisticRegression. Confirm why lr.score(X, y) produces an empty lazy Dask array instead of a printable float, then add or update the relevant regression test so the score returns the expected scalar result.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 38/100