Skip to content

Error in use of preprocess_split() in LinearRegression. #3556

@indrasn0wal

Description

@indrasn0wal

Problem location

mlpack Python documentation [(https://www.mlpack.org/doc/stable/python_documentation.html#class-linear_regression)]

Description of the problem

preprocess_split() return a dictionary containing 'test','test_labels','training','training_labels'. In the documentation example of LinearRegression. The way it's being used X_test, y_test, X_train, y_train = preprocess_split(input_=X, input_labels=y, test_ratio=0.2) will give string output and not a matrix, which should cause an error while doing model.fit(). I have attached the file regarding the error. One thing we can do is instead of returning the dictionary while using preprocess_split(), it can return matrix output, X_test, y_test, X_train, y_train. That way it will be easy to use.
Documentation_mlpack
error

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions