Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
.. -------------------------------------------------------------
..
.. Licensed to the Apache Software Foundation (ASF) under one
.. or more contributor license agreements. See the NOTICE file
.. distributed with this work for additional information
.. regarding copyright ownership. The ASF licenses this file
.. to you under the Apache License, Version 2.0 (the
.. "License"); you may not use this file except in compliance
.. with the License. You may obtain a copy of the License at
..
.. http://www.apache.org/licenses/LICENSE-2.0
..
.. Unless required by applicable law or agreed to in writing,
.. software distributed under the License is distributed on an
.. "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
.. KIND, either express or implied. See the License for the
.. specific language governing permissions and limitations
.. under the License.
..
.. ------------------------------------------------------------

scaleRobustApply
================

.. autofunction:: systemds.operator.algorithm.scaleRobustApply
2 changes: 2 additions & 0 deletions src/main/python/systemds/operator/algorithm/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,7 @@
from .builtin.scale import scale
from .builtin.scaleApply import scaleApply
from .builtin.scaleMinMax import scaleMinMax
from .builtin.scaleRobustApply import scaleRobustApply
from .builtin.selectByVarThresh import selectByVarThresh
from .builtin.ses import ses
from .builtin.setdiff import setdiff
Expand Down Expand Up @@ -377,6 +378,7 @@
'scale',
'scaleApply',
'scaleMinMax',
'scaleRobustApply',
'selectByVarThresh',
'ses',
'setdiff',
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
# -------------------------------------------------------------
#
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied. See the License for the
# specific language governing permissions and limitations
# under the License.
#
# -------------------------------------------------------------

# Autogenerated By : src/main/python/generator/generator.py
# Autogenerated From : scripts/builtin/scaleRobustApply.dml

from typing import Dict, Iterable

from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
from systemds.utils.consts import VALID_INPUT_TYPES


def scaleRobustApply(X: Matrix,
med: Matrix,
q1: Matrix,
q3: Matrix):
"""
Apply robust scaling using precomputed medians and IQRs



:param X: Input feature matrix of shape n-by-m
:param med: Column medians (Q2) of shape 1-by-m
:param q1: Column first quantiles (Q1) of shape 1-by-m
:param q3: Column first quantiles (Q3) of shape 1-by-m
:return: Scaled output matrix of shape n-by-m
"""

params_dict = {'X': X, 'med': med, 'q1': q1, 'q3': q3}
return Matrix(X.sds_context,
'scaleRobustApply',
named_input_nodes=params_dict)
Loading