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

[Bug]: Invalid fitness after objective evaluation. Skipping the graph: (/n_scaling;)/n_rf_{'n_jobs':32} #1273

Open
DRMPN opened this issue Mar 13, 2024 · 1 comment · May be fixed by #1274
Assignees
Labels
bug Something isn't working core Core logic related to graph optimisation

Comments

@DRMPN
Copy link
Collaborator

DRMPN commented Mar 13, 2024

Expected Behavior

The method calculates the Roc Auc score for a target column of type bool in a tabular data classification problem.

Current Behavior

For some reason get_metrics() method fails after successfully fitting the data.
image

There seems to be a problem with the tabular data preprocessing in the target, surprisingly it's an empty array.
image

This is likely just the tip of the iceberg, as the `num_classes' method is already parameterized with an empty array:
image

Possible Solution

  • Use debugging to find the place in the source code where this transformation does not take place.
  • Make appropriate changes to the code and check that the proposed solution works correctly.
  • Prepare unit tests.

Steps to Reproduce

  1. Download the data from https://www.kaggle.com/competitions/spaceship-titanic
  2. Create and run Jupyter Notebook using the following snippet (imports and paths are omitted for simplicity):
train = pd.read_csv("train.csv")
test = pd.read_csv("test.csv")
model = Fedot(problem='classification', metric='roc_auc', preset="best_quality")
best_pipeline = model.fit(features=train, target='Transported')
prediction = model.predict(features=test)
model.plot_prediction()
model.get_metrics()

Context [OPTIONAL]

The target column is loaded as a bool type.
image

Documentation References:
https://fedot.readthedocs.io/en/latest/introduction/fedot_features/main_features.html
https://fedot.readthedocs.io/en/latest/advanced/data_preprocessing.html

@DRMPN DRMPN added bug Something isn't working core Core logic related to graph optimisation labels Mar 13, 2024
@DRMPN DRMPN self-assigned this Mar 13, 2024
@nicl-nno
Copy link
Collaborator

Related problem: #1274

@DRMPN DRMPN changed the title [Bug]: Target column of type bool is not correctly preprocessed [Bug]: Invalid fitness after objective evaluation. Skipping the graph: (/n_scaling;)/n_rf_{'n_jobs':32} Mar 27, 2024
@DRMPN DRMPN linked a pull request Apr 1, 2024 that will close this issue
@Lopa10ko Lopa10ko linked a pull request Apr 2, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working core Core logic related to graph optimisation
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants