Skip to content

setting an array element with a sequence #110

Open
@LeiYangGH

Description

@LeiYangGH

PS C:\G\ML-From-Scratch> python mlfromscratch/examples/polynomial_regression.py
Finding regularization constant using cross validation:
Traceback (most recent call last):
File "C:\G\ML-From-Scratch\mlfromscratch\examples\polynomial_regression.py", line 81, in
main()
File "C:\G\ML-From-Scratch\mlfromscratch\examples\polynomial_regression.py", line 32, in main
cross_validation_sets = k_fold_cross_validation_sets(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\user.conda\envs\tor\Lib\site-packages\mlfromscratch-0.0.4-py3.12.egg\mlfromscratch\utils\data_manipulation.py", line 145, in k_fold_cross_validation_sets
ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (10, 4) + inhomogeneous part.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions