Skip to content

Commit

Permalink
Folder structure and stub for the graphpipeline.
Browse files Browse the repository at this point in the history
  • Loading branch information
benHeid committed May 26, 2023
1 parent 6489d3d commit 2642bba
Show file tree
Hide file tree
Showing 7 changed files with 84 additions and 0 deletions.
43 changes: 43 additions & 0 deletions sktime/pipeline/pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
from sktime.base import BaseEstimator


class Pipeline(BaseEstimator):

def __init__(self, steps=None):
super().__init__()
# Initialise the method
self.steps = [] if steps is None else steps

@staticmethod
def _check_validity(step, method_name, **kwargs):
# Checks if the method_name is allowed to call on the pipeline.
# Thus, it uses ducktyping
# Returns the all kwargs that are provided to the pipeline and needed by method_name.
pass

def add_step(self, skobject, name, edges, **kwargs):
# Adds a step to the pipeline and store the step informations
pass

def fit(self, **kwargs):
# Fits the pipeline
pass

def transform(self, *args, **kwargs):
# Implementation of transform, such methods also are required for predict, ...
pass

def predict(self, *args, **kwargs):
# Implementation of transform, such methods also are required for predict, ...
pass

def predict_quantiles(self, *args, **kwargs):
# Implementation of transform, such methods also are required for predict, ...
pass

def predict_proba(self, *args, **kwargs):
# Implementation of transform, such methods also are required for predict, ...
pass

# TODO Weitere Methoden
...
Empty file.
Empty file added sktime/pipeline/step.py
Empty file.
Empty file.
Empty file.
41 changes: 41 additions & 0 deletions sktime/pipeline/tests/test_pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
import pytest
from unittest import TestCase
from sktime.pipeline.pipeline import Pipeline


@pytest.mark.parametrize("steps", [
[{}],
[{}],
])
def test_add_steps(steps):
pipeline = Pipeline()
for step in steps:
pipeline.add_step(**step)
TestCase().assertListEqual(steps, pipeline.steps)


def test_transform():
pass

def test_transform_not_available():
pass

def test_predict():
pass

def test_predict_not_available():
pass

def test_predict_proba():
pass

def test_predict_proba_not_available():
pass

def test_predict_quantile():
pass

def test_predict_quantile_not_available():
pass


Empty file.

0 comments on commit 2642bba

Please sign in to comment.