Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Checks on the data sets array dimensions #82

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Jul 3, 2023

  1. Checks on the data sets array dimensions

    Added a few lines of code to the Sklearn.py and regression.py files both found within the task subfolder. I had noticed some weird and unexpected behavior while using the sklearn interface for the dso library when the function argument y for the fit function was not a one dimensional numpy array (See the recently closed issue made by myself tilted Different Learning Equations with Different Numpy Array shape). So fix this issue, within the sklearn.py file I have added a few lines of code to check that the function arguments (X,y) to the fit are first numpy ndarray class objects then if X and y have exactly 2 and 1 array dimensional respectively. A type error is through when the arguments are not numpy arrays and a value error is raised when the number of array dimensions for X or y is incorrect. Additionally, within the regression.py file of the dso library I have added similar error checking within the initialization method of the RegressionTask class but only for the y_train and y_test arrays of the RegressionTask (that they are single dimensional arrays) only after the have been created through either of 4 possible supported use cases.
    E-Urzua committed Jul 3, 2023
    Configuration menu
    Copy the full SHA
    bc0212e View commit details
    Browse the repository at this point in the history