-
Notifications
You must be signed in to change notification settings - Fork 7
1. Quick start
Vadim A. Potemkin edited this page Jun 4, 2024
·
1 revision
Before you get started with FEDOT.Industrial, it is must be installed (refer to the installation instructions).
FEDOT.Industrial provides a simple API for various tasks, including classification, regression, time series forecasting, and anomaly detection.
Steps:
- Import the FedotIndustrial class:
from fedot_ind.api.main import FedotIndustrial
- Initialize the FedotIndustrial object: Specify the type of modeling task you want to perform. The object provides methods for fitting a model, making predictions, and evaluating performance.
-
fit()
: This method performs feature extraction, optimization, and returns the resulting model pipeline. -
predict()
: Use this method to predict target values for new data using the fitted model. -
get_metrics()
: This method estimates the quality of predictions using chosen metrics.
Both NumPy arrays and Pandas DataFrames can be used for input data. In the following example, x_train
, y_train
, and x_test
are NumPy arrays:
model = FedotIndustrial(problem='classification',
metric='f1',
timeout=5)
model.fit((x_train, y_train))
prediction = model.predict((x_test, y_test))
metrics = model.get_metrics(target=y_test,
metric_names=['f1', 'accuracy'],
rounding_order=3)
For time series classification tasks, you can utilize the DataLoader class to download data from the UCR/UEA archive:
from fedot_ind.tools.loader import DataLoader
loader = DataLoader(dataset_name='ECG200')
train_data, test_data = loader.load_data()
If you have your own data in .ts, .tsv, or .arff format, specify the folder path when initializing the DataLoader:
loader = DataLoader(dataset_name='YourDatasetName', folder_path='path/to/folder')
train_data, test_data = loader.load_data()