Skip to content

Commit eafe1e2

Browse files
committed
[MINOR] Add ses Python autogenerated builtin
1 parent 92aa65a commit eafe1e2

File tree

2 files changed

+50
-0
lines changed

2 files changed

+50
-0
lines changed

src/main/python/systemds/operator/algorithm/__init__.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,7 @@
162162
from .builtin.scaleApply import scaleApply
163163
from .builtin.scaleMinMax import scaleMinMax
164164
from .builtin.selectByVarThresh import selectByVarThresh
165+
from .builtin.ses import ses
165166
from .builtin.setdiff import setdiff
166167
from .builtin.sherlock import sherlock
167168
from .builtin.sherlockPredict import sherlockPredict
@@ -340,6 +341,7 @@
340341
'scaleApply',
341342
'scaleMinMax',
342343
'selectByVarThresh',
344+
'ses',
343345
'setdiff',
344346
'sherlock',
345347
'sherlockPredict',
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# -------------------------------------------------------------
2+
#
3+
# Licensed to the Apache Software Foundation (ASF) under one
4+
# or more contributor license agreements. See the NOTICE file
5+
# distributed with this work for additional information
6+
# regarding copyright ownership. The ASF licenses this file
7+
# to you under the Apache License, Version 2.0 (the
8+
# "License"); you may not use this file except in compliance
9+
# with the License. You may obtain a copy of the License at
10+
#
11+
# http://www.apache.org/licenses/LICENSE-2.0
12+
#
13+
# Unless required by applicable law or agreed to in writing,
14+
# software distributed under the License is distributed on an
15+
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
# KIND, either express or implied. See the License for the
17+
# specific language governing permissions and limitations
18+
# under the License.
19+
#
20+
# -------------------------------------------------------------
21+
22+
# Autogenerated By : src/main/python/generator/generator.py
23+
# Autogenerated From : scripts/builtin/ses.dml
24+
25+
from typing import Dict, Iterable
26+
27+
from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
28+
from systemds.utils.consts import VALID_INPUT_TYPES
29+
30+
31+
def ses(x: Matrix,
32+
**kwargs: Dict[str, VALID_INPUT_TYPES]):
33+
"""
34+
Builtin function for simple exponential smoothing (SES).
35+
36+
37+
38+
:param x: Time series vector [shape: n-by-1]
39+
:param h: Forecasting horizon
40+
:param alpha: Smoothing parameter yhat_t = alpha * x_y + (1-alpha) * yhat_t-1
41+
:return: Forecasts [shape: h-by-1]
42+
"""
43+
44+
params_dict = {'x': x}
45+
params_dict.update(kwargs)
46+
return Matrix(x.sds_context,
47+
'ses',
48+
named_input_nodes=params_dict)

0 commit comments

Comments
 (0)