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

add topo to extra #1261

Merged
merged 6 commits into from
Mar 4, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/unit-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ jobs:
python -m pip install --upgrade pip
pip install pytest
pip install .
pip install .[extra]
pip install pytest-cov
- name: Test with pytest
run: |
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ FEDOT supports bunch of dimensionality preprocessing operations that can be be a
`label_encoding`,Label Encoder, Feature encoding
`resample`,Imbalanced binary class transformation in classification, Data transformation
`topological_features`,Calculation of topological features,Time series transformation
`fast_topological_features`,Fast calculation of part of topological features,Time series transformation


.. csv-table:: Feature transformation operations implementations
Expand Down
9 changes: 3 additions & 6 deletions fedot/core/operations/evaluation/common_preprocessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,9 @@
from fedot.core.operations.evaluation.operation_implementations.data_operations.sklearn_transformations import \
ImputationImplementation, KernelPCAImplementation, NormalizationImplementation, PCAImplementation, \
PolyFeaturesImplementation, ScalingImplementation, FastICAImplementation
from fedot.core.operations.evaluation.operation_implementations.\
from fedot.core.operations.evaluation.operation_implementations. \
data_operations.topological.fast_topological_extractor import \
FastTopologicalFeaturesImplementation
from fedot.core.operations.evaluation.operation_implementations.data_operations.topological. \
topological_extractor import TopologicalFeaturesImplementation
TopologicalFeaturesImplementation
from fedot.core.operations.operation_parameters import OperationParameters
from fedot.utilities.random import ImplementationRandomStateHandler

Expand Down Expand Up @@ -50,8 +48,7 @@ class FedotPreprocessingStrategy(EvaluationStrategy):
'one_hot_encoding': OneHotEncodingImplementation,
'label_encoding': LabelEncodingImplementation,
'fast_ica': FastICAImplementation,
'topological_features': TopologicalFeaturesImplementation,
'fast_topological_features': FastTopologicalFeaturesImplementation,
'topological_features': TopologicalFeaturesImplementation
}

def __init__(self, operation_type: str, params: Optional[OperationParameters] = None):
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,16 @@
import logging
from itertools import chain
from typing import Optional

import numpy as np
from gph import ripser_parallel as ripser

try:
from gph import ripser_parallel as ripser
except ModuleNotFoundError:
logging.log(100,
"Topological features operation requires extra dependencies for time series forecasting, which are not"
" installed. It can infuence the performance. Please install it by 'pip install fedot[extra]'")

from joblib import Parallel, delayed

from fedot.core.data.data import InputData, OutputData
Expand All @@ -11,7 +19,7 @@
from fedot.core.operations.operation_parameters import OperationParameters


class FastTopologicalFeaturesImplementation(DataOperationImplementation):
class TopologicalFeaturesImplementation(DataOperationImplementation):
def __init__(self, params: Optional[OperationParameters] = None):
super().__init__(params)
self.window_size_as_share = params.get('window_size_as_share')
Expand Down

This file was deleted.

This file was deleted.

Loading
Loading