Skip to content
Snippets Groups Projects
Commit 8a1de7a7 authored by Caron Olivier's avatar Caron Olivier
Browse files

integration tests improvements

parent 1097b1f8
No related branches found
No related tags found
No related merge requests found
# -*- coding: utf-8 -*-
# copyright: mary-morstan developers (see Authors.txt file), GPL v3 License (see LICENSE file)
from sktime.datasets import load_longley
from marymorstan.preprocessing.dataset_preprocessing import DatasetPreprocessing
class MyDataSetPreprocessing(DatasetPreprocessing):
"""This class allow to download the longley dataset from sktime library"""
def load_dataset(self, dataset_location):
""" specific to the dataset origin, retrieve and return the dataset as a panda Dataframe"""
y, X = load_longley()
dataset = X
# Add the target variable to the DataFrame
dataset['target'] = y
return dataset
......@@ -63,15 +63,10 @@ handle_exit "$?"
#****** Time series : work in progress ***********
echo "Try a univariate time series classification problem without preprocessing"
echo "Try an univariate time series classification problem without preprocessing"
./misc/integration-tests/timeseries-classification.sh
handle_exit "$?"
# echo "Try a multivariate timeserie forcasting problem without preprocessing"
#results=$(mary-morstan --dataset-mapper-file './misc/dataset_mapper_file/timeseries.yaml' --dataset 'longley' \
#--search-space './misc/search_spaces/time_series_forecasting_space.yml' \
#--objectives 'mae' 'rmse' --pipeline-size=1 \
#--evaluation-strategy='time_series_k_split' \
#--generations 2 --population-size 10 --seed 42 --log-level=DEBUG 2>&1 || exit 700)
#
#handle_exit "$?"
echo "Try an multivariate time series forecasting problem without preprocessing"
./misc/integration-tests/multivariate-timeseries.sh
handle_exit "$?"
......@@ -3,7 +3,7 @@
results=$(mary-morstan --generations 0 --population-size 5 --seed 2021236247 \
--log-level=DEBUG --objectives 'balanced_accuracy' 'min_pipeline_size' \
--evolutionary-algorithms-space './misc/evolutionary_algorithms_spaces/ea_space_tpot.yml' \
--dataset-mapper-file ./misc/dataset_mapper_file/tpot.yaml --dataset car_evaluation --test-size-ratio .25 \
--dataset car_evaluation --dataset-preprocessing 'datasets.ics_uci_dataset_preprocessing' --test-size-ratio .25 \
--dataset-fill-nan 0 --number-of-pipeline-failed-allowed 100 --evaluation-strategy 'stratified_shuffle_split' \
--search-space './misc/search_spaces/tests/search_space_tpot_failing.yml' \
--evolutionary-algorithms-parameters '{"initialization": "marymorstan.initialization.RandomInitialization(min_size=3, max_size=3)"}' 2>&1 || exit 120)
......
#!/bin/bash
results=$(mary-morstan --dataset-preprocessing "datasets.longley_dataset_preprocessing" --dataset 'longley' \
--search-space './misc/search_spaces/time_series_forecasting_space.yml' \
--objectives 'mae' 'rmse' --init-pipeline-size-min=1 --init-pipeline-size-max=1 \
--evaluation-strategy='time_series_k_split' \
--generations 2 --population-size 10 --seed 42 --log-level=DEBUG 2>&1 || exit 150)
exit_code="$?"
if [ "${exit_code}" != "0" ]
then
echo "${results}"
exit ${exit_code}
fi
#!/bin/bash
results=$(mary-morstan --dataset 'GunPoint' --dataset-preprocessing "datasets.ucr_dataset_preprocessing" \
--dataset-mapper-file './misc/dataset_mapper_file/timeseries.yaml' --problem-type 'timeseries_classification' \
--problem-type 'timeseries_classification' \
--wall-time-in-seconds 60 --number-of-pipeline-failed-allowed 50 \
--search-space './misc/search_spaces/time_series_classification_space.yml' \
--evolutionary-algorithms-space './misc/evolutionary_algorithms_spaces/ea_space_tsc.yml' \
......
version: 1
version: 2
estimators:
include_estimators_in_preprocessors: False # Synthetic features
groups:
estimators: ['RandomForestRegressor']
preprocessors: ["Tabulariser"]
algorithms:
# ARIMAForecaster:
# backend: "sktime"
# class_identifier: "forecasters.ARIMAForecaster"
......@@ -16,7 +22,6 @@ estimators:
type: "categorical"
choices: [100]
preprocessors:
# RandomIntervalSegmenter:
# backend: "sktime"
# class_identifier: "transformers.segment.RandomIntervalSegmenter"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment