aimclub / aimclub/FEDOT

[Bug]: Incorrect `residual_threshold` parameter in RANSAC Implementation

Open
#1,363 0 comments 0 reactions 0 assignees View on GitHub
bug
Dominant language
Python
Stars
712
Forks
96
Avg merge
3d 1h
Merged PRs (30d)
10

Description

## Expected Behavior
The RANSAC implementation should function correctly, with parameters synchronized with the `descriptive_id`. The algorithm should produce the expected number of output features based on the provided parameters.

## Current Behavior
The current RANSAC algorithm contains an error in the `residual_threshold` parameter. The parameter values do not match the actual values, which affects the number of output features.

### Example Error Messages:
1. **Error Message:**
```
MetricsObjective - Objective evaluation error for graph {'depth': 6, 'length': 7, 'nodes': [linear, sgdr, ridge, scaling, pca, ransac_non_lin_reg, ransac_non_lin_reg]} on metric rmse: Metric can not be evaluated because of: index 3 is out of bounds for axis 1 with size 3
```

2. **Error Message:**
```
MetricsObjective - Objective evaluation error for graph {'depth': 6, 'length': 6, 'nodes': [linear, fast_ica, pca, resample, catboostreg, ransac_non_lin_reg]} on metric rmse: Metric can not be evaluated because of: X has 19 features, but FastICA is expecting 17 features as input.
```

## Possible Solution
Revisit and test the RANSAC algorithm implementation, specifically focusing on the `residual_threshold` parameter on line 69 in `FEDOT/fedot/core/operations/evaluation/operation_implementations/data_operations/sklearn_filters.py`.

## Steps to Reproduce
n/a

## Context [OPTIONAL]
This bug was identified in PR #1334. The issue seems to stem from incorrect parameter handling in the RANSAC implementation, leading to discrepancies in the expected and actual feature counts.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.