Skip to content

Commit 44bff07

Browse files
committed
[MINOR] Update Python API
1 parent 7ebf913 commit 44bff07

File tree

3 files changed

+47
-1
lines changed

3 files changed

+47
-1
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
from .builtin.alsDS import alsDS
3131
from .builtin.alsPredict import alsPredict
3232
from .builtin.alsTopkPredict import alsTopkPredict
33+
from .builtin.ampute import ampute
3334
from .builtin.arima import arima
3435
from .builtin.auc import auc
3536
from .builtin.autoencoder_2layer import autoencoder_2layer
@@ -209,6 +210,7 @@
209210
'alsDS',
210211
'alsPredict',
211212
'alsTopkPredict',
213+
'ampute',
212214
'arima',
213215
'auc',
214216
'autoencoder_2layer',
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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/ampute.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 ampute(X: Matrix,
32+
**kwargs: Dict[str, VALID_INPUT_TYPES]):
33+
"""
34+
This function injects missing values into a multivariate a given dataset, similarly to the ampute() method in R's MICE package.
35+
36+
"""
37+
38+
params_dict = {'X': X}
39+
params_dict.update(kwargs)
40+
return Matrix(X.sds_context,
41+
'ampute',
42+
named_input_nodes=params_dict)

src/main/python/systemds/operator/algorithm/builtin/sliceLineExtract.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,11 +53,13 @@ def sliceLineExtract(X: Matrix,
5353

5454
vX_0 = Matrix(X.sds_context, '')
5555
vX_1 = Matrix(X.sds_context, '')
56-
output_nodes = [vX_0, vX_1, ]
56+
vX_2 = Matrix(X.sds_context, '')
57+
output_nodes = [vX_0, vX_1, vX_2, ]
5758

5859
op = MultiReturn(X.sds_context, 'sliceLineExtract', output_nodes, named_input_nodes=params_dict)
5960

6061
vX_0._unnamed_input_nodes = [op]
6162
vX_1._unnamed_input_nodes = [op]
63+
vX_2._unnamed_input_nodes = [op]
6264

6365
return op

0 commit comments

Comments
 (0)