Skip to content

QDA may meet broken 2d array #4006

Closed
@MidoriYakumo

Description

@MidoriYakumo
>>> sklearn.__version__
'0.16-git'

For my dataset it gives:

  File "/usr/lib64/python3.4/site-packages/sklearn/qda.py", line 148, in _decision_function
    return (-0.5 * (norm2 + np.sum(np.log(self.scalings_), 1))
AttributeError: 'numpy.ndarray' object has no attribute 'log'

When

qda.py:134:         self.scalings_ = np.asarray(scalings)

It shows that scalings is a 2d array in shape of (0..23, 0..23, 0..23, 0..6)

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