You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@systemds.apache.org by ba...@apache.org on 2025/09/25 22:31:40 UTC
(systemds) 01/02: [SYSTEMDS-3330] Documentation of builtin functions (main)
This is an automated email from the ASF dual-hosted git repository.
baunsgaard pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/systemds.git
commit 978412445dd7ed2a72fce7f3428dc9bcdede987d
Author: anuunchin <88...@users.noreply.github.com>
AuthorDate: Fri Sep 26 00:27:06 2025 +0200
[SYSTEMDS-3330] Documentation of builtin functions (main)
This commit adds new automatic generation of separated doc files for all
builtin functions, and automatic generation of tests for builtin functions.
All based on the original documentation in individual builtin scripts.
This change will simplify the development of builtin functions and help new
users across both the Python api and internal DML testing.
An example of documented code is:
.. code-block:: python
>>> import numpy as np
>>> from systemds.context import SystemDSContext
>>> from systemds.operator.algorithm import dist
>>>
>>> with SystemDSContext() as sds:
... X = sds.from_numpy(np.array([[0], [3], [4]]))
... out = dist(X).compute()
... print(out)
[[0. 3. 4.]
[3. 0. 1.]
[4. 1. 0.]]
Closes #2292
---
scripts/builtin/dist.dml | 15 +++++
scripts/builtin/img_brightness.dml | 19 +++++-
scripts/builtin/img_brightness_linearized.dml | 19 +++++-
scripts/builtin/img_crop.dml | 19 +++++-
scripts/builtin/img_crop_linearized.dml | 19 +++++-
scripts/builtin/img_cutout.dml | 20 ++++++
scripts/builtin/img_cutout_linearized.dml | 23 ++++++-
scripts/builtin/img_invert.dml | 21 +++++-
scripts/builtin/img_invert_linearized.dml | 21 +++++-
scripts/builtin/img_mirror.dml | 23 ++++++-
scripts/builtin/img_mirror_linearized.dml | 48 +++++++++++++-
scripts/builtin/img_posterize.dml | 23 ++++++-
scripts/builtin/img_posterize_linearized.dml | 23 ++++++-
scripts/builtin/img_rotate.dml | 19 ++++++
scripts/builtin/img_rotate_linearized.dml | 25 +++++++-
scripts/builtin/img_sample_pairing.dml | 28 +++++++-
scripts/builtin/img_sample_pairing_linearized.dml | 26 +++++++-
scripts/builtin/img_shear.dml | 19 ++++++
scripts/builtin/img_shear_linearized.dml | 23 ++++++-
scripts/builtin/img_transform.dml | 19 ++++++
scripts/builtin/img_transform_linearized.dml | 25 +++++++-
scripts/builtin/img_translate.dml | 19 ++++++
scripts/builtin/img_translate_linearized.dml | 22 ++++++-
scripts/builtin/lm.dml | 30 +++++++++
scripts/builtin/normalize.dml | 14 ++++
scripts/builtin/randomForest.dml | 41 ++++++++++++
scripts/builtin/randomForestPredict.dml | 43 +++++++++++++
scripts/builtin/toOneHot.dml | 16 +++++
.../python/docs/source/api/operator/algorithms.rst | 7 +-
.../docs/source/api/operator/algorithms/WoE.rst | 4 ++
.../source/api/operator/algorithms/WoEApply.rst | 4 ++
.../source/api/operator/algorithms/abstain.rst | 4 ++
.../docs/source/api/operator/algorithms/adasyn.rst | 4 ++
.../docs/source/api/operator/algorithms/als.rst | 4 ++
.../docs/source/api/operator/algorithms/alsCG.rst | 4 ++
.../docs/source/api/operator/algorithms/alsDS.rst | 4 ++
.../source/api/operator/algorithms/alsPredict.rst | 4 ++
.../api/operator/algorithms/alsTopkPredict.rst | 4 ++
.../docs/source/api/operator/algorithms/ampute.rst | 4 ++
.../api/operator/algorithms/apply_pipeline.rst | 4 ++
.../docs/source/api/operator/algorithms/arima.rst | 4 ++
.../docs/source/api/operator/algorithms/auc.rst | 4 ++
.../api/operator/algorithms/autoencoder_2layer.rst | 4 ++
.../docs/source/api/operator/algorithms/bandit.rst | 4 ++
.../docs/source/api/operator/algorithms/bivar.rst | 4 ++
.../source/api/operator/algorithms/components.rst | 4 ++
.../api/operator/algorithms/confusionMatrix.rst | 4 ++
.../api/operator/algorithms/cooccurrenceMatrix.rst | 4 ++
.../docs/source/api/operator/algorithms/cor.rst | 4 ++
.../api/operator/algorithms/correctTypos.rst | 4 ++
.../api/operator/algorithms/correctTyposApply.rst | 4 ++
.../docs/source/api/operator/algorithms/cox.rst | 4 ++
.../source/api/operator/algorithms/cspline.rst | 4 ++
.../source/api/operator/algorithms/csplineCG.rst | 4 ++
.../source/api/operator/algorithms/csplineDS.rst | 4 ++
.../docs/source/api/operator/algorithms/cvlm.rst | 4 ++
.../docs/source/api/operator/algorithms/dbscan.rst | 4 ++
.../source/api/operator/algorithms/dbscanApply.rst | 4 ++
.../api/operator/algorithms/decisionTree.rst | 4 ++
.../operator/algorithms/decisionTreePredict.rst | 4 ++
.../source/api/operator/algorithms/deepWalk.rst | 4 ++
.../api/operator/algorithms/denialConstraints.rst | 4 ++
.../operator/algorithms/differenceStatistics.rst | 4 ++
.../source/api/operator/algorithms/discoverFD.rst | 4 ++
.../docs/source/api/operator/algorithms/dist.rst | 4 ++
.../docs/source/api/operator/algorithms/dmv.rst | 4 ++
.../docs/source/api/operator/algorithms/ema.rst | 4 ++
.../api/operator/algorithms/executePipeline.rst | 4 ++
.../source/api/operator/algorithms/f1Score.rst | 4 ++
.../docs/source/api/operator/algorithms/fdr.rst | 4 ++
.../source/api/operator/algorithms/ffPredict.rst | 4 ++
.../source/api/operator/algorithms/ffTrain.rst | 4 ++
.../api/operator/algorithms/fit_pipeline.rst | 4 ++
.../api/operator/algorithms/fixInvalidLengths.rst | 4 ++
.../operator/algorithms/fixInvalidLengthsApply.rst | 4 ++
.../api/operator/algorithms/flattenQuantile.rst | 4 ++
.../source/api/operator/algorithms/frameSort.rst | 4 ++
.../api/operator/algorithms/frequencyEncode.rst | 4 ++
.../operator/algorithms/frequencyEncodeApply.rst | 4 ++
.../docs/source/api/operator/algorithms/garch.rst | 4 ++
.../api/operator/algorithms/gaussianClassifier.rst | 4 ++
.../source/api/operator/algorithms/getAccuracy.rst | 4 ++
.../docs/source/api/operator/algorithms/glm.rst | 4 ++
.../source/api/operator/algorithms/glmPredict.rst | 4 ++
.../docs/source/api/operator/algorithms/glove.rst | 4 ++
.../docs/source/api/operator/algorithms/gmm.rst | 4 ++
.../source/api/operator/algorithms/gmmPredict.rst | 4 ++
.../docs/source/api/operator/algorithms/gnmf.rst | 4 ++
.../source/api/operator/algorithms/gridSearch.rst | 4 ++
.../operator/algorithms/hospitalResidencyMatch.rst | 4 ++
.../source/api/operator/algorithms/hyperband.rst | 4 ++
.../api/operator/algorithms/img_brightness.rst | 4 ++
.../algorithms/img_brightness_linearized.rst | 4 ++
.../source/api/operator/algorithms/img_crop.rst | 4 ++
.../operator/algorithms/img_crop_linearized.rst | 4 ++
.../source/api/operator/algorithms/img_cutout.rst | 4 ++
.../operator/algorithms/img_cutout_linearized.rst | 4 ++
.../source/api/operator/algorithms/img_invert.rst | 4 ++
.../operator/algorithms/img_invert_linearized.rst | 4 ++
.../source/api/operator/algorithms/img_mirror.rst | 4 ++
.../operator/algorithms/img_mirror_linearized.rst | 4 ++
.../api/operator/algorithms/img_posterize.rst | 4 ++
.../algorithms/img_posterize_linearized.rst | 4 ++
.../source/api/operator/algorithms/img_rotate.rst | 4 ++
.../operator/algorithms/img_rotate_linearized.rst | 4 ++
.../api/operator/algorithms/img_sample_pairing.rst | 4 ++
.../algorithms/img_sample_pairing_linearized.rst | 4 ++
.../source/api/operator/algorithms/img_shear.rst | 4 ++
.../operator/algorithms/img_shear_linearized.rst | 4 ++
.../api/operator/algorithms/img_transform.rst | 4 ++
.../algorithms/img_transform_linearized.rst | 4 ++
.../api/operator/algorithms/img_translate.rst | 4 ++
.../algorithms/img_translate_linearized.rst | 4 ++
.../api/operator/algorithms/impurityMeasures.rst | 4 ++
.../source/api/operator/algorithms/imputeByFD.rst | 4 ++
.../api/operator/algorithms/imputeByFDApply.rst | 4 ++
.../source/api/operator/algorithms/imputeByKNN.rst | 4 ++
.../api/operator/algorithms/imputeByMean.rst | 4 ++
.../api/operator/algorithms/imputeByMeanApply.rst | 4 ++
.../api/operator/algorithms/imputeByMedian.rst | 4 ++
.../operator/algorithms/imputeByMedianApply.rst | 4 ++
.../api/operator/algorithms/imputeByMode.rst | 4 ++
.../api/operator/algorithms/imputeByModeApply.rst | 4 ++
.../api/operator/algorithms/incSliceLine.rst | 4 ++
.../source/api/operator/algorithms/intersect.rst | 4 ++
.../docs/source/api/operator/algorithms/km.rst | 4 ++
.../docs/source/api/operator/algorithms/kmeans.rst | 4 ++
.../api/operator/algorithms/kmeansPredict.rst | 4 ++
.../docs/source/api/operator/algorithms/knn.rst | 4 ++
.../source/api/operator/algorithms/knnGraph.rst | 4 ++
.../docs/source/api/operator/algorithms/knnbf.rst | 4 ++
.../docs/source/api/operator/algorithms/l2svm.rst | 4 ++
.../api/operator/algorithms/l2svmPredict.rst | 4 ++
.../docs/source/api/operator/algorithms/lasso.rst | 4 ++
.../api/operator/algorithms/lenetPredict.rst | 4 ++
.../source/api/operator/algorithms/lenetTrain.rst | 4 ++
.../docs/source/api/operator/algorithms/lm.rst | 4 ++
.../docs/source/api/operator/algorithms/lmCG.rst | 4 ++
.../docs/source/api/operator/algorithms/lmDS.rst | 4 ++
.../source/api/operator/algorithms/lmPredict.rst | 4 ++
.../api/operator/algorithms/lmPredictStats.rst | 4 ++
.../source/api/operator/algorithms/logSumExp.rst | 4 ++
.../docs/source/api/operator/algorithms/mae.rst | 4 ++
.../docs/source/api/operator/algorithms/mape.rst | 4 ++
.../api/operator/algorithms/matrixProfile.rst | 4 ++
.../docs/source/api/operator/algorithms/mcc.rst | 4 ++
.../docs/source/api/operator/algorithms/mdedup.rst | 4 ++
.../docs/source/api/operator/algorithms/mice.rst | 4 ++
.../source/api/operator/algorithms/miceApply.rst | 4 ++
.../docs/source/api/operator/algorithms/mse.rst | 4 ++
.../docs/source/api/operator/algorithms/msmape.rst | 4 ++
.../docs/source/api/operator/algorithms/msvm.rst | 4 ++
.../source/api/operator/algorithms/msvmPredict.rst | 4 ++
.../source/api/operator/algorithms/multiLogReg.rst | 4 ++
.../api/operator/algorithms/multiLogRegPredict.rst | 4 ++
.../source/api/operator/algorithms/na_locf.rst | 4 ++
.../source/api/operator/algorithms/naiveBayes.rst | 4 ++
.../api/operator/algorithms/naiveBayesPredict.rst | 4 ++
.../source/api/operator/algorithms/normalize.rst | 4 ++
.../api/operator/algorithms/normalizeApply.rst | 4 ++
.../docs/source/api/operator/algorithms/nrmse.rst | 4 ++
.../source/api/operator/algorithms/outlier.rst | 4 ++
.../api/operator/algorithms/outlierByArima.rst | 4 ++
.../api/operator/algorithms/outlierByIQR.rst | 4 ++
.../api/operator/algorithms/outlierByIQRApply.rst | 4 ++
.../source/api/operator/algorithms/outlierBySd.rst | 4 ++
.../api/operator/algorithms/outlierBySdApply.rst | 4 ++
.../source/api/operator/algorithms/pageRank.rst | 4 ++
.../docs/source/api/operator/algorithms/pca.rst | 4 ++
.../source/api/operator/algorithms/pcaInverse.rst | 4 ++
.../api/operator/algorithms/pcaTransform.rst | 4 ++
.../docs/source/api/operator/algorithms/pnmf.rst | 4 ++
.../docs/source/api/operator/algorithms/ppca.rst | 4 ++
.../docs/source/api/operator/algorithms/psnr.rst | 4 ++
.../api/operator/algorithms/quantizeByCluster.rst | 4 ++
.../source/api/operator/algorithms/raGroupby.rst | 4 ++
.../docs/source/api/operator/algorithms/raJoin.rst | 4 ++
.../source/api/operator/algorithms/raSelection.rst | 4 ++
.../api/operator/algorithms/randomForest.rst | 4 ++
.../operator/algorithms/randomForestPredict.rst | 4 ++
.../docs/source/api/operator/algorithms/rmse.rst | 4 ++
.../docs/source/api/operator/algorithms/scale.rst | 4 ++
.../source/api/operator/algorithms/scaleApply.rst | 4 ++
.../source/api/operator/algorithms/scaleMinMax.rst | 4 ++
.../api/operator/algorithms/selectByVarThresh.rst | 4 ++
.../docs/source/api/operator/algorithms/ses.rst | 4 ++
.../source/api/operator/algorithms/setdiff.rst | 4 ++
.../api/operator/algorithms/shapExplainer.rst | 4 ++
.../source/api/operator/algorithms/sherlock.rst | 4 ++
.../api/operator/algorithms/sherlockPredict.rst | 4 ++
.../api/operator/algorithms/shortestPath.rst | 4 ++
.../source/api/operator/algorithms/sigmoid.rst | 4 ++
.../source/api/operator/algorithms/skewness.rst | 4 ++
.../source/api/operator/algorithms/sliceLine.rst | 4 ++
.../api/operator/algorithms/sliceLineDebug.rst | 4 ++
.../api/operator/algorithms/sliceLineExtract.rst | 4 ++
.../source/api/operator/algorithms/slicefinder.rst | 4 ++
.../docs/source/api/operator/algorithms/smape.rst | 4 ++
.../docs/source/api/operator/algorithms/smote.rst | 4 ++
.../source/api/operator/algorithms/softmax.rst | 4 ++
.../docs/source/api/operator/algorithms/split.rst | 4 ++
.../api/operator/algorithms/splitBalanced.rst | 4 ++
.../source/api/operator/algorithms/sqrtMatrix.rst | 4 ++
.../api/operator/algorithms/stableMarriage.rst | 4 ++
.../source/api/operator/algorithms/statsNA.rst | 4 ++
.../docs/source/api/operator/algorithms/steplm.rst | 4 ++
.../source/api/operator/algorithms/stratstats.rst | 4 ++
.../operator/algorithms/symmetricDifference.rst | 4 ++
.../docs/source/api/operator/algorithms/tSNE.rst | 4 ++
.../source/api/operator/algorithms/toOneHot.rst | 4 ++
.../source/api/operator/algorithms/tomeklink.rst | 4 ++
.../api/operator/algorithms/topk_cleaning.rst | 4 ++
.../api/operator/algorithms/underSampling.rst | 4 ++
.../docs/source/api/operator/algorithms/union.rst | 4 ++
.../docs/source/api/operator/algorithms/univar.rst | 4 ++
.../source/api/operator/algorithms/vectorToCsv.rst | 4 ++
.../docs/source/api/operator/algorithms/wer.rst | 4 ++
.../source/api/operator/algorithms/winsorize.rst | 4 ++
.../api/operator/algorithms/winsorizeApply.rst | 4 ++
.../source/api/operator/algorithms/xdummy1.rst | 4 ++
.../source/api/operator/algorithms/xdummy2.rst | 4 ++
.../source/api/operator/algorithms/xgboost.rst | 4 ++
.../algorithms/xgboostPredictClassification.rst | 4 ++
.../algorithms/xgboostPredictRegression.rst | 4 ++
src/main/python/generator/dml_parser.py | 24 ++++++-
src/main/python/generator/generator.py | 75 +++++++++++++++++++++-
.../systemds/operator/algorithm/builtin/dist.py | 15 +++++
.../operator/algorithm/builtin/img_brightness.py | 19 +++++-
.../algorithm/builtin/img_brightness_linearized.py | 19 +++++-
.../operator/algorithm/builtin/img_crop.py | 19 +++++-
.../algorithm/builtin/img_crop_linearized.py | 19 +++++-
.../operator/algorithm/builtin/img_cutout.py | 20 ++++++
.../algorithm/builtin/img_cutout_linearized.py | 21 +++++-
.../operator/algorithm/builtin/img_invert.py | 21 +++++-
.../algorithm/builtin/img_invert_linearized.py | 21 +++++-
.../operator/algorithm/builtin/img_mirror.py | 23 ++++++-
.../algorithm/builtin/img_mirror_linearized.py | 48 +++++++++++++-
.../operator/algorithm/builtin/img_posterize.py | 23 ++++++-
.../algorithm/builtin/img_posterize_linearized.py | 23 ++++++-
.../operator/algorithm/builtin/img_rotate.py | 19 ++++++
.../algorithm/builtin/img_rotate_linearized.py | 23 ++++++-
.../algorithm/builtin/img_sample_pairing.py | 28 +++++++-
.../builtin/img_sample_pairing_linearized.py | 26 +++++++-
.../operator/algorithm/builtin/img_shear.py | 19 ++++++
.../algorithm/builtin/img_shear_linearized.py | 23 ++++++-
.../operator/algorithm/builtin/img_transform.py | 19 ++++++
.../algorithm/builtin/img_transform_linearized.py | 23 ++++++-
.../operator/algorithm/builtin/img_translate.py | 19 ++++++
.../algorithm/builtin/img_translate_linearized.py | 22 ++++++-
.../systemds/operator/algorithm/builtin/lm.py | 30 +++++++++
.../operator/algorithm/builtin/normalize.py | 14 ++++
.../operator/algorithm/builtin/randomForest.py | 41 ++++++++++++
.../algorithm/builtin/randomForestPredict.py | 43 +++++++++++++
.../operator/algorithm/builtin/toOneHot.py | 16 +++++
src/main/python/tests/algorithms/test_lm.py | 65 -------------------
.../auto_tests/test_dist.py} | 40 ++++++------
.../auto_tests/test_img_brightness.py} | 42 ++++++------
.../auto_tests/test_img_brightness_linearized.py} | 42 ++++++------
.../auto_tests/test_img_crop.py} | 42 ++++++------
.../auto_tests/test_img_crop_linearized.py} | 42 ++++++------
.../auto_tests/test_img_cutout.py} | 44 +++++++------
.../tests/auto_tests/test_img_cutout_linearized.py | 48 ++++++++++++++
.../auto_tests/test_img_invert.py} | 44 +++++++------
.../tests/auto_tests/test_img_invert_linearized.py | 48 ++++++++++++++
.../auto_tests/test_img_mirror.py} | 44 +++++++------
.../auto_tests/test_img_mirror_linearized_0.py | 48 ++++++++++++++
.../auto_tests/test_img_mirror_linearized_1.py | 55 ++++++++++++++++
.../auto_tests/test_img_posterize.py} | 44 +++++++------
.../auto_tests/test_img_posterize_linearized.py} | 44 +++++++------
.../auto_tests/test_img_rotate.py} | 44 +++++++------
.../tests/auto_tests/test_img_rotate_linearized.py | 48 ++++++++++++++
.../tests/auto_tests/test_img_sample_pairing.py | 53 +++++++++++++++
.../test_img_sample_pairing_linearized.py | 53 +++++++++++++++
.../auto_tests/test_img_shear.py} | 44 +++++++------
.../tests/auto_tests/test_img_shear_linearized.py | 48 ++++++++++++++
.../auto_tests/test_img_transform.py} | 44 +++++++------
.../auto_tests/test_img_transform_linearized.py | 48 ++++++++++++++
.../auto_tests/test_img_translate.py} | 44 +++++++------
.../auto_tests/test_img_translate_linearized.py | 48 ++++++++++++++
src/main/python/tests/auto_tests/test_lm.py | 59 +++++++++++++++++
.../auto_tests/test_normalize.py} | 39 ++++++-----
.../python/tests/auto_tests/test_randomForest.py | 71 ++++++++++++++++++++
.../tests/auto_tests/test_randomForestPredict.py | 71 ++++++++++++++++++++
.../auto_tests/test_toOneHot.py} | 41 ++++++------
284 files changed, 3200 insertions(+), 451 deletions(-)
diff --git a/scripts/builtin/dist.dml b/scripts/builtin/dist.dml
index f296fd717b..831992b192 100644
--- a/scripts/builtin/dist.dml
+++ b/scripts/builtin/dist.dml
@@ -21,6 +21,21 @@
# Returns Euclidean distance matrix (distances between N n-dimensional points)
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import dist
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... X = sds.from_numpy(np.array([[0], [3], [4]]))
+# ... out = dist(X).compute()
+# ... print(out)
+# [[0. 3. 4.]
+# [3. 0. 1.]
+# [4. 1. 0.]]
+#
+#
# INPUT:
# --------------------------------------------------------------------------------
# X Matrix to calculate the distance inside
diff --git a/scripts/builtin/img_brightness.dml b/scripts/builtin/img_brightness.dml
index 100ccb7588..dda7eba23d 100644
--- a/scripts/builtin/img_brightness.dml
+++ b/scripts/builtin/img_brightness.dml
@@ -21,9 +21,26 @@
# The img_brightness-function is an image data augmentation function. It changes the brightness of the image.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_brightness
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 50, 100,
+# ... 150, 200 ]], dtype=np.float32)
+# ... )
+# ... result_img = img_brightness(img, 30.0, 150).compute()
+# ... print(result_img.reshape(2, 2))
+# [[ 80. 130.]
+# [150. 150.]]
+#
+#
# INPUT:
# -----------------------------------------------------------------------------------------
-# img_in Input matrix/image
+# img_in Input image as 2D matrix with top left corner at [1, 1]
# value The amount of brightness to be changed for the image
# channel_max Maximum value of the brightness of the image
# -----------------------------------------------------------------------------------------
diff --git a/scripts/builtin/img_brightness_linearized.dml b/scripts/builtin/img_brightness_linearized.dml
index 8c5e72d13f..061b4597c2 100644
--- a/scripts/builtin/img_brightness_linearized.dml
+++ b/scripts/builtin/img_brightness_linearized.dml
@@ -21,9 +21,26 @@
# The img_brightness_linearized-function is an image data augmentation function. It changes the brightness of one or multiple images.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_brightness_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 50, 100,
+# ... 150, 200 ]], dtype=np.float32)
+# ... )
+# ... result_img = img_brightness_linearized(img, 30.0, 255).compute()
+# ... print(result_img.reshape(2, 2))
+# [[ 80. 130.]
+# [180. 230.]]
+#
+#
# INPUT:
# -----------------------------------------------------------------------------------------
-# img_in Input matrix/image (can represent multiple images every row of the matrix represents a linearized image)
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# value The amount of brightness to be changed for the image
# channel_max Maximum value of the brightness of the image
# -----------------------------------------------------------------------------------------
diff --git a/scripts/builtin/img_crop.dml b/scripts/builtin/img_crop.dml
index e85301f8bb..be183347b3 100644
--- a/scripts/builtin/img_crop.dml
+++ b/scripts/builtin/img_crop.dml
@@ -21,9 +21,26 @@
# The img_crop-function is an image data augmentation function. It cuts out a subregion of an image.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_crop
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 50., 100., 150.],
+# ... [150., 200., 250.],
+# ... [250., 200., 200.]], dtype=np.float32)
+# ... )
+# ... result_img = img_crop(img, 1, 1, 1, 1).compute()
+# ... print(result_img)
+# [[200.]]
+#
+#
# INPUT:
# ----------------------------------------------------------------------------------------
-# img_in Input matrix/image
+# img_in Input image as 2D matrix with top left corner at [1, 1]
# w The width of the subregion required
# h The height of the subregion required
# x_offset The horizontal coordinate in the image to begin the crop operation
diff --git a/scripts/builtin/img_crop_linearized.dml b/scripts/builtin/img_crop_linearized.dml
index b2c2c03fd1..c79da14c14 100644
--- a/scripts/builtin/img_crop_linearized.dml
+++ b/scripts/builtin/img_crop_linearized.dml
@@ -21,9 +21,26 @@
# The img_crop_linearized cuts out a rectangular section of multiple linearized images.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_crop_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 50., 100., 150.,
+# ... 150., 200., 250.,
+# ... 250., 200., 200. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_crop_linearized(img, 1, 1, 1, 1, 3, 3).compute()
+# ... print(result_img)
+# [[200.]]
+#
+#
# INPUT:
# ----------------------------------------------------------------------------------------
-# img_in Linearized input images as 2D matrix
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# w The width of the subregion required
# h The height of the subregion required
# x_offset The horizontal offset for the center of the crop region
diff --git a/scripts/builtin/img_cutout.dml b/scripts/builtin/img_cutout.dml
index cd3f432cd0..efe194045f 100644
--- a/scripts/builtin/img_cutout.dml
+++ b/scripts/builtin/img_cutout.dml
@@ -21,6 +21,26 @@
# Image Cutout function replaces a rectangular section of an image with a constant value.
#
+#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_cutout
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 50., 100., 150.],
+# ... [150., 200., 250.],
+# ... [250., 200., 200.]], dtype=np.float32)
+# ... )
+# ... result_img = img_cutout(img, 2, 2, 1, 1, 49.).compute()
+# ... print(result_img)
+# [[ 50. 100. 150.]
+# [150. 49. 250.]
+# [250. 200. 200.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------------
# img_in Input image as 2D matrix with top left corner at [1, 1]
diff --git a/scripts/builtin/img_cutout_linearized.dml b/scripts/builtin/img_cutout_linearized.dml
index cb923e31ba..9e10908904 100644
--- a/scripts/builtin/img_cutout_linearized.dml
+++ b/scripts/builtin/img_cutout_linearized.dml
@@ -21,14 +21,33 @@
# Image Cutout function replaces a rectangular section of an image with a constant value.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_cutout_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 50., 100., 150.,
+# ... 150., 200., 250.,
+# ... 250., 200., 200. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_cutout_linearized(img, 2, 2, 1, 1, 25.0, 3, 3).compute()
+# ... print(result_img.reshape(3, 3))
+# [[ 50. 100. 150.]
+# [150. 25. 250.]
+# [250. 200. 200.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------------
-# img_in Input images as linearized 2D matrix with top left corner at [1, 1]
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# x Column index of the top left corner of the rectangle (starting at 1)
# y Row index of the top left corner of the rectangle (starting at 1)
# width Width of the rectangle (must be positive)
# height Height of the rectangle (must be positive)
-# fill_value The value to set for the rectangle
+# fill_value The value to set for the rectangle
# s_cols Width of a single image
# s_rows Height of a single image
# ---------------------------------------------------------------------------------------------
diff --git a/scripts/builtin/img_invert.dml b/scripts/builtin/img_invert.dml
index c52f5bed3a..2475535aad 100644
--- a/scripts/builtin/img_invert.dml
+++ b/scripts/builtin/img_invert.dml
@@ -21,9 +21,28 @@
# This is an image data augmentation function. It inverts an image.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_invert
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 50., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... result_img = img_invert(img, 210.).compute()
+# ... print(result_img)
+# [[200. 190. 180.]
+# [170. 160. 150.]
+# [140. 130. 120.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------------
-# img_in Input image
+# img_in Input image as 2D matrix with top left corner at [1, 1]
# max_value The maximum value pixels can have
# ---------------------------------------------------------------------------------------------
#
diff --git a/scripts/builtin/img_invert_linearized.dml b/scripts/builtin/img_invert_linearized.dml
index 68b245492c..ce4c45219f 100644
--- a/scripts/builtin/img_invert_linearized.dml
+++ b/scripts/builtin/img_invert_linearized.dml
@@ -21,9 +21,28 @@
# This is an image data augmentation function. It inverts an image.It can handle one or multiple images
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_invert_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_invert_linearized(img, 200.).compute()
+# ... print(result_img.reshape(3, 3))
+# [[190. 180. 170.]
+# [160. 150. 140.]
+# [130. 120. 110.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------------
-# img_in Input matrix/image (every row of the matrix represents a linearized image)
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# max_value The maximum value pixels can have
# ---------------------------------------------------------------------------------------------
#
diff --git a/scripts/builtin/img_mirror.dml b/scripts/builtin/img_mirror.dml
index a8836f6fd2..1b79e385a5 100644
--- a/scripts/builtin/img_mirror.dml
+++ b/scripts/builtin/img_mirror.dml
@@ -22,10 +22,29 @@
# This function is an image data augmentation function.
# It flips an image on the X (horizontal) or Y (vertical) axis.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_mirror
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 50., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... result_img = img_mirror(img, False).compute()
+# ... print(result_img)
+# [[30. 20. 10.]
+# [60. 50. 40.]
+# [90. 80. 70.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------------
-# img_in Input matrix/image
-# max_value The maximum value pixels can have
+# img_in Input image as 2D matrix with top left corner at [1, 1]
+# horizontal_axis Flip either in X or Y axis
# ---------------------------------------------------------------------------------------------
#
# OUTPUT:
diff --git a/scripts/builtin/img_mirror_linearized.dml b/scripts/builtin/img_mirror_linearized.dml
index 08b3fe539f..f56f17dabb 100644
--- a/scripts/builtin/img_mirror_linearized.dml
+++ b/scripts/builtin/img_mirror_linearized.dml
@@ -22,9 +22,55 @@
# This function has the same functionality with img_mirror but it handles multiple images at
# the same time. Each row of the input and output matrix represents a linearized image/matrix
# It flips an image on the X (horizontal) or Y (vertical) axis.
+#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_mirror_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_mirror_linearized(img, True, 3, 3).compute()
+# ... print(result_img.reshape(3, 3))
+# [[70. 80. 90.]
+# [40. 50. 60.]
+# [10. 20. 30.]]
+#
+#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_mirror_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... imgs = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ],
+# ... [ 70., 80., 90.,
+# ... 40., 50., 60.,
+# ... 10., 20., 30. ]], dtype=np.float32)
+# ... )
+# ... result_imgs = img_mirror_linearized(imgs, True, 3, 3).compute()
+# ... print(result_imgs[0].reshape(3, 3))
+# ... print(result_imgs[1].reshape(3, 3))
+# [[70. 80. 90.]
+# [40. 50. 60.]
+# [10. 20. 30.]]
+# [[10. 20. 30.]
+# [40. 50. 60.]
+# [70. 80. 90.]]
+#
+#
# INPUT:
# -----------------------------------------------------------------------------------------
-# img_matrix Input matrix/image (every row represents a linearized matrix/image)
+# img_matrix Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# horizontal_axis flip either in X or Y axis
# original_rows number of rows in the original 2-D images
# original_cols number of cols in the original 2-D images
diff --git a/scripts/builtin/img_posterize.dml b/scripts/builtin/img_posterize.dml
index 91578b9c76..3916c828ba 100644
--- a/scripts/builtin/img_posterize.dml
+++ b/scripts/builtin/img_posterize.dml
@@ -22,10 +22,29 @@
# The Image Posterize function limits pixel values to 2^bits different values in the range [0, 255].
# Assumes the input image can attain values in the range [0, 255].
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_posterize
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 255., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... result_img = img_posterize(img, 1).compute()
+# ... print(result_img)
+# [[ 0. 0. 0.]
+# [ 0. 128. 0.]
+# [ 0. 0. 0.]]
+#
+#
# INPUT:
# -------------------------------------------------------------------------------------------
-# img_in Input image
-# bits The number of bits keep for the values.
+# img_in Input image as 2D matrix with top left corner at [1, 1]
+# bits The number of bits to keep for the values.
# 1 means black and white, 8 means every integer between 0 and 255.
# -------------------------------------------------------------------------------------------
#
diff --git a/scripts/builtin/img_posterize_linearized.dml b/scripts/builtin/img_posterize_linearized.dml
index a0edcf3ed4..0ff833bf67 100644
--- a/scripts/builtin/img_posterize_linearized.dml
+++ b/scripts/builtin/img_posterize_linearized.dml
@@ -22,10 +22,29 @@
# The Linearized Image Posterize function limits pixel values to 2^bits different values in the range [0, 255].
# Assumes the input image can attain values in the range [0, 255].
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_posterize_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 255., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_posterize_linearized(img, 1).compute()
+# ... print(result_img.reshape(3, 3))
+# [[ 0. 0. 0.]
+# [ 0. 128. 0.]
+# [ 0. 0. 0.]]
+#
+#
# INPUT:
# -------------------------------------------------------------------------------------------
-# img_in Row linearized input images as 2D matrix
-# bits The number of bits keep for the values.
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
+# bits The number of bits to keep for the values.
# 1 means black and white, 8 means every integer between 0 and 255.
# -------------------------------------------------------------------------------------------
#
diff --git a/scripts/builtin/img_rotate.dml b/scripts/builtin/img_rotate.dml
index c49826c210..d1e6da7bda 100644
--- a/scripts/builtin/img_rotate.dml
+++ b/scripts/builtin/img_rotate.dml
@@ -22,6 +22,25 @@
# The Image Rotate function rotates the input image counter-clockwise around the center.
# Uses nearest neighbor sampling.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_rotate
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 50., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... result_img = img_rotate(img, 3.14159, 255.).compute()
+# ... print(result_img)
+# [[90. 80. 70.]
+# [60. 50. 40.]
+# [30. 20. 10.]]
+#
+#
# INPUT:
# -----------------------------------------------------------------------------------------------
# img_in Input image as 2D matrix with top left corner at [1, 1]
diff --git a/scripts/builtin/img_rotate_linearized.dml b/scripts/builtin/img_rotate_linearized.dml
index f5ac43625d..45ad077aae 100644
--- a/scripts/builtin/img_rotate_linearized.dml
+++ b/scripts/builtin/img_rotate_linearized.dml
@@ -22,11 +22,32 @@
# The Linearized Image Rotate function rotates the linearized input images counter-clockwise around the center.
# Uses nearest neighbor sampling.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_rotate_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_rotate_linearized(img, 3.14159, 255., 3, 3).compute()
+# ... print(result_img.reshape(3, 3))
+# [[90. 80. 70.]
+# [60. 50. 40.]
+# [30. 20. 10.]]
+#
+#
# INPUT:
# -----------------------------------------------------------------------------------------------
-# img_in Linearized input images as 2D matrix with top left corner at [1, 1]
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# radians The value by which to rotate in radian.
-# fill_value The background color revealed by the rotation
+# fill_value The background color revealed by the rotation
+# s_cols Width of a single image
+# s_rows Height of a single image
# -----------------------------------------------------------------------------------------------
#
# OUTPUT:
diff --git a/scripts/builtin/img_sample_pairing.dml b/scripts/builtin/img_sample_pairing.dml
index 99147b2555..bac412a511 100644
--- a/scripts/builtin/img_sample_pairing.dml
+++ b/scripts/builtin/img_sample_pairing.dml
@@ -21,10 +21,34 @@
# The image sample pairing function blends two images together.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_sample_pairing
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img_in1 = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 50., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... img_in2 = sds.from_numpy(
+# ... np.array([[ 30., 40., 50.],
+# ... [ 60., 70., 80.],
+# ... [ 90., 100., 110.]], dtype=np.float32)
+# ... )
+# ... result_img = img_sample_pairing(img_in1, img_in2, 0.5).compute()
+# ... print(result_img)
+# [[ 20. 30. 40.]
+# [ 50. 60. 70.]
+# [ 80. 90. 100.]]
+#
+#
# INPUT:
# -------------------------------------------------------------------------------------------
-# img_in1 First input image
-# img_in2 Second input image
+# img_in1 First input image as 2D matrix with top left corner at [1, 1]
+# img_in2 Second input image as 2D matrix with top left corner at [1, 1]
# weight The weight given to the second image.
# 0 means only img_in1, 1 means only img_in2 will be visible
# -------------------------------------------------------------------------------------------
diff --git a/scripts/builtin/img_sample_pairing_linearized.dml b/scripts/builtin/img_sample_pairing_linearized.dml
index f09046cc18..975d12d2b8 100644
--- a/scripts/builtin/img_sample_pairing_linearized.dml
+++ b/scripts/builtin/img_sample_pairing_linearized.dml
@@ -21,9 +21,33 @@
# The image sample pairing function blends two images together.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_sample_pairing_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img_in1 = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... img_in2 = sds.from_numpy(
+# ... np.array([[ 30., 40., 50.,
+# ... 60., 70., 80.,
+# ... 90., 100., 110. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_sample_pairing_linearized(img_in1, img_in2, 0.5).compute()
+# ... print(result_img.reshape(3, 3))
+# [[ 20. 30. 40.]
+# [ 50. 60. 70.]
+# [ 80. 90. 100.]]
+#
+#
# INPUT:
# -------------------------------------------------------------------------------------------
-# img_in1 input matrix/image (every row is a linearized image)
+# img_in1 Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# img_in2 Second input image (one image represented as a single row linearized matrix)
# weight The weight given to the second image.
# 0 means only img_in1, 1 means only img_in2 will be visible
diff --git a/scripts/builtin/img_shear.dml b/scripts/builtin/img_shear.dml
index 2cf00592a6..bce106d80e 100644
--- a/scripts/builtin/img_shear.dml
+++ b/scripts/builtin/img_shear.dml
@@ -22,6 +22,25 @@
# This function applies a shearing transformation to an image.
# Uses nearest neighbor sampling.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_shear
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 50., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... result_img = img_shear(img, 1., 0., 255).compute()
+# ... print(result_img)
+# [[ 10. 20. 30.]
+# [255. 40. 50.]
+# [255. 255. 70.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------------
# img_in Input image as 2D matrix with top left corner at [1, 1]
diff --git a/scripts/builtin/img_shear_linearized.dml b/scripts/builtin/img_shear_linearized.dml
index 79471f358b..4bac774b28 100644
--- a/scripts/builtin/img_shear_linearized.dml
+++ b/scripts/builtin/img_shear_linearized.dml
@@ -22,12 +22,33 @@
# This function applies a shearing transformation to linearized images.
# Uses nearest neighbor sampling.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_shear_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_shear_linearized(img, 1., 0., 0., 3, 3).compute()
+# ... print(result_img.reshape(3, 3))
+# [[10. 20. 30.]
+# [ 0. 40. 50.]
+# [ 0. 0. 70.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------------
-# img_in Linearized input images as 2D matrix with top left corner at [1, 1]
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# shear_x Shearing factor for horizontal shearing
# shear_y Shearing factor for vertical shearing
# fill_value The background color revealed by the shearing
+# s_cols Width of a single image
+# s_rows Height of a single image
# ---------------------------------------------------------------------------------------------
#
# OUTPUT:
diff --git a/scripts/builtin/img_transform.dml b/scripts/builtin/img_transform.dml
index f65e2f4a5f..d6636c0bc3 100644
--- a/scripts/builtin/img_transform.dml
+++ b/scripts/builtin/img_transform.dml
@@ -23,6 +23,25 @@
# Optionally resizes the image (without scaling).
# Uses nearest neighbor sampling.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_transform
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 50., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... result_img = img_transform(img, 3, 3, -1., 0., 2., 0., 1., 0., 255.).compute()
+# ... print(result_img)
+# [[ 20. 10. 255.]
+# [ 50. 40. 255.]
+# [ 80. 70. 255.]]
+#
+#
# INPUT:
# -------------------------------------------------------------------------------------------
# img_in Input image as 2D matrix with top left corner at [1, 1]
diff --git a/scripts/builtin/img_transform_linearized.dml b/scripts/builtin/img_transform_linearized.dml
index 06867d61b2..dc4c650c58 100644
--- a/scripts/builtin/img_transform_linearized.dml
+++ b/scripts/builtin/img_transform_linearized.dml
@@ -23,13 +23,34 @@
# Optionally resizes the image (without scaling).
# Uses nearest neighbor sampling.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_transform_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_transform_linearized(img, 3, 3, -1., 0., 2., 0., 1., 0., 255., 3, 3).compute()
+# ... print(result_img.reshape(3, 3))
+# [[ 20. 10. 255.]
+# [ 50. 40. 255.]
+# [ 80. 70. 255.]]
+#
+#
# INPUT:
# -------------------------------------------------------------------------------------------
-# img_in Linearized input images as 2D matrix with top left corner at [1, 1]
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# out_w Width of the output matrix
# out_h Height of the output matrix
# a,b,c,d,e,f The first two rows of the affine matrix in row-major order
-# fill_value The background of an image
+# fill_value The background of an image
+# s_cols Width of a single image
+# s_rows Height of a single image
# -------------------------------------------------------------------------------------------
#
# OUTPUT:
diff --git a/scripts/builtin/img_translate.dml b/scripts/builtin/img_translate.dml
index 9bf2664d33..687f8f0415 100644
--- a/scripts/builtin/img_translate.dml
+++ b/scripts/builtin/img_translate.dml
@@ -23,6 +23,25 @@
# Optionally resizes the image (without scaling).
# Uses nearest neighbor sampling.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_translate
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.],
+# ... [ 40., 50., 60.],
+# ... [ 70., 80., 90.]], dtype=np.float32)
+# ... )
+# ... result_img = img_translate(img, 1., 1., 3, 3, 255.).compute()
+# ... print(result_img)
+# [[255. 255. 255.]
+# [255. 10. 20.]
+# [255. 40. 50.]]
+#
+#
# INPUT:
# ----------------------------------------------------------------------------------------------
# img_in Input image as 2D matrix with top left corner at [1, 1]
diff --git a/scripts/builtin/img_translate_linearized.dml b/scripts/builtin/img_translate_linearized.dml
index c2c898d21c..2feec93800 100644
--- a/scripts/builtin/img_translate_linearized.dml
+++ b/scripts/builtin/img_translate_linearized.dml
@@ -22,9 +22,29 @@
# This function has the same functionality with img_translate but it handles multiple images at
# the same time. Each row of the input and output matrix represents a linearized image/matrix
# It translates the image and Optionally resizes the image (without scaling).
+#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import img_translate_linearized
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... img = sds.from_numpy(
+# ... np.array([[ 10., 20., 30.,
+# ... 40., 50., 60.,
+# ... 70., 80., 90. ]], dtype=np.float32)
+# ... )
+# ... result_img = img_translate_linearized(img, 1., 1., 3, 3, 255.0, 3, 3).compute()
+# ... print(result_img.reshape(3, 3))
+# [[255. 255. 255.]
+# [255. 10. 20.]
+# [255. 40. 50.]]
+#
+#
# INPUT:
# ----------------------------------------------------------------------------------------------
-# img_in Input matrix/image (every row represents a linearized matrix/image)
+# img_in Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
# offset_x The distance to move the image in x direction
# offset_y The distance to move the image in y direction
# out_w Width of the output image
diff --git a/scripts/builtin/lm.dml b/scripts/builtin/lm.dml
index b7fc55e0ff..58f161a3ce 100644
--- a/scripts/builtin/lm.dml
+++ b/scripts/builtin/lm.dml
@@ -23,6 +23,36 @@
# method or the conjugate gradient algorithm depending on the input size
# of the matrices (See lmDS-function and lmCG-function respectively).
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import lm
+# >>>
+# >>> np.random.seed(0)
+# >>> features = np.random.rand(10, 15)
+# >>> y = np.random.rand(10, 1)
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... weights = lm(sds.from_numpy(features), sds.from_numpy(y)).compute()
+# ... print(weights)
+# [[-0.11538199]
+# [-0.20386541]
+# [-0.39956034]
+# [ 1.04078623]
+# [ 0.43270839]
+# [ 0.18954599]
+# [ 0.49858969]
+# [-0.26812763]
+# [ 0.09961844]
+# [-0.57000751]
+# [-0.43386048]
+# [ 0.55358873]
+# [-0.54638565]
+# [ 0.2205885 ]
+# [ 0.37957689]]
+#
+#
# INPUT:
# --------------------------------------------------------------------
# X Matrix of feature vectors.
diff --git a/scripts/builtin/normalize.dml b/scripts/builtin/normalize.dml
index 1f136757aa..9496431ee8 100644
--- a/scripts/builtin/normalize.dml
+++ b/scripts/builtin/normalize.dml
@@ -22,6 +22,20 @@
# Min-max normalization (a.k.a. min-max scaling) to range [0,1]. For matrices
# of positive values, this normalization preserves the input sparsity.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import normalize
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... X = sds.from_numpy(np.array([[1, 2], [3, 4]]))
+# ... Y, cmin, cmax = normalize(X).compute()
+# ... print(Y)
+# [[0. 0.]
+# [1. 1.]]
+#
+#
# INPUT:
# ---------------------------------------------------------------------------------------
# X Input feature matrix of shape n-by-m
diff --git a/scripts/builtin/randomForest.dml b/scripts/builtin/randomForest.dml
index 53529afb9a..cd29826541 100644
--- a/scripts/builtin/randomForest.dml
+++ b/scripts/builtin/randomForest.dml
@@ -46,6 +46,47 @@
# prefixed by a one-hot vector of sampled features
# (e.g., [1,1,1,0] if we sampled a,b,c of the four features)
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import randomForest, randomForestPredict
+# >>>
+# >>> # tiny toy dataset
+# >>> X = np.array([[1],
+# ... [2],
+# ... [10],
+# ... [11]], dtype=np.int64)
+# >>> y = np.array([[1],
+# ... [1],
+# ... [2],
+# ... [2]], dtype=np.int64)
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... X_sds = sds.from_numpy(X)
+# ... y_sds = sds.from_numpy(y)
+# ...
+# ... ctypes = sds.from_numpy(np.array([[1, 2]], dtype=np.int64))
+# ...
+# ... # train a 4-tree forest (no sampling)
+# ... M = randomForest(
+# ... X_sds, y_sds, ctypes,
+# ... num_trees = 4,
+# ... sample_frac = 1.0,
+# ... feature_frac = 1.0,
+# ... max_depth = 3,
+# ... min_leaf = 1,
+# ... min_split = 2,
+# ... seed = 42
+# ... )
+# ...
+# ... preds = randomForestPredict(X_sds, ctypes, M).compute()
+# ... print(preds)
+# [[1.]
+# [1.]
+# [2.]
+# [2.]]
+#
#
# INPUT:
# ------------------------------------------------------------------------------
diff --git a/scripts/builtin/randomForestPredict.dml b/scripts/builtin/randomForestPredict.dml
index a003f26f7d..3a42c7f487 100644
--- a/scripts/builtin/randomForestPredict.dml
+++ b/scripts/builtin/randomForestPredict.dml
@@ -22,6 +22,49 @@
# This script implements random forest prediction for recoded and binned
# categorical and numerical input features.
#
+#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import randomForest, randomForestPredict
+# >>>
+# >>> # tiny toy dataset
+# >>> X = np.array([[1],
+# ... [2],
+# ... [10],
+# ... [11]], dtype=np.int64)
+# >>> y = np.array([[1],
+# ... [1],
+# ... [2],
+# ... [2]], dtype=np.int64)
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... X_sds = sds.from_numpy(X)
+# ... y_sds = sds.from_numpy(y)
+# ...
+# ... ctypes = sds.from_numpy(np.array([[1, 2]], dtype=np.int64))
+# ...
+# ... # train a 4-tree forest (no sampling)
+# ... M = randomForest(
+# ... X_sds, y_sds, ctypes,
+# ... num_trees = 4,
+# ... sample_frac = 1.0,
+# ... feature_frac = 1.0,
+# ... max_depth = 3,
+# ... min_leaf = 1,
+# ... min_split = 2,
+# ... seed = 42
+# ... )
+# ...
+# ... preds = randomForestPredict(X_sds, ctypes, M).compute()
+# ... print(preds)
+# [[1.]
+# [1.]
+# [2.]
+# [2.]]
+#
+#
# INPUT:
# ------------------------------------------------------------------------------
# X Feature matrix in recoded/binned representation
diff --git a/scripts/builtin/toOneHot.dml b/scripts/builtin/toOneHot.dml
index 2232cdc97b..aec58c4999 100644
--- a/scripts/builtin/toOneHot.dml
+++ b/scripts/builtin/toOneHot.dml
@@ -21,6 +21,22 @@
# The toOneHot-function encodes unordered categorical vector to multiple binary vectors.
#
+# .. code-block:: python
+#
+# >>> import numpy as np
+# >>> from systemds.context import SystemDSContext
+# >>> from systemds.operator.algorithm import toOneHot
+# >>>
+# >>> with SystemDSContext() as sds:
+# ... X = sds.from_numpy(np.array([[1], [3], [2], [3]]))
+# ... Y = toOneHot(X, numClasses=3).compute()
+# ... print(Y)
+# [[1. 0. 0.]
+# [0. 0. 1.]
+# [0. 1. 0.]
+# [0. 0. 1.]]
+#
+#
# INPUT:
# ------------------------------------------------------------------------------------------
# X Vector with N integer entries between 1 and numClasses
diff --git a/src/main/python/docs/source/api/operator/algorithms.rst b/src/main/python/docs/source/api/operator/algorithms.rst
index 1ea5de4a43..2716389643 100644
--- a/src/main/python/docs/source/api/operator/algorithms.rst
+++ b/src/main/python/docs/source/api/operator/algorithms.rst
@@ -66,4 +66,9 @@ The output should be similar to
[ 0.37957689]]
.. automodule:: systemds.operator.algorithm
- :members:
\ No newline at end of file
+
+.. toctree::
+ :maxdepth: 1
+ :glob:
+
+ algorithms/*
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/WoE.rst b/src/main/python/docs/source/api/operator/algorithms/WoE.rst
new file mode 100644
index 0000000000..9712759986
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/WoE.rst
@@ -0,0 +1,4 @@
+WoE
+===
+
+.. autofunction:: systemds.operator.algorithm.WoE
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/WoEApply.rst b/src/main/python/docs/source/api/operator/algorithms/WoEApply.rst
new file mode 100644
index 0000000000..1b612b82bb
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/WoEApply.rst
@@ -0,0 +1,4 @@
+WoEApply
+========
+
+.. autofunction:: systemds.operator.algorithm.WoEApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/abstain.rst b/src/main/python/docs/source/api/operator/algorithms/abstain.rst
new file mode 100644
index 0000000000..dcef879159
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/abstain.rst
@@ -0,0 +1,4 @@
+abstain
+=======
+
+.. autofunction:: systemds.operator.algorithm.abstain
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/adasyn.rst b/src/main/python/docs/source/api/operator/algorithms/adasyn.rst
new file mode 100644
index 0000000000..2876239375
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/adasyn.rst
@@ -0,0 +1,4 @@
+adasyn
+======
+
+.. autofunction:: systemds.operator.algorithm.adasyn
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/als.rst b/src/main/python/docs/source/api/operator/algorithms/als.rst
new file mode 100644
index 0000000000..67ff3426dc
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/als.rst
@@ -0,0 +1,4 @@
+als
+===
+
+.. autofunction:: systemds.operator.algorithm.als
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/alsCG.rst b/src/main/python/docs/source/api/operator/algorithms/alsCG.rst
new file mode 100644
index 0000000000..11407a8cd5
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/alsCG.rst
@@ -0,0 +1,4 @@
+alsCG
+=====
+
+.. autofunction:: systemds.operator.algorithm.alsCG
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/alsDS.rst b/src/main/python/docs/source/api/operator/algorithms/alsDS.rst
new file mode 100644
index 0000000000..cffde102ce
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/alsDS.rst
@@ -0,0 +1,4 @@
+alsDS
+=====
+
+.. autofunction:: systemds.operator.algorithm.alsDS
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/alsPredict.rst b/src/main/python/docs/source/api/operator/algorithms/alsPredict.rst
new file mode 100644
index 0000000000..872eeff8d4
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/alsPredict.rst
@@ -0,0 +1,4 @@
+alsPredict
+==========
+
+.. autofunction:: systemds.operator.algorithm.alsPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/alsTopkPredict.rst b/src/main/python/docs/source/api/operator/algorithms/alsTopkPredict.rst
new file mode 100644
index 0000000000..f68c5c4e3f
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/alsTopkPredict.rst
@@ -0,0 +1,4 @@
+alsTopkPredict
+==============
+
+.. autofunction:: systemds.operator.algorithm.alsTopkPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/ampute.rst b/src/main/python/docs/source/api/operator/algorithms/ampute.rst
new file mode 100644
index 0000000000..f8b7783ef6
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/ampute.rst
@@ -0,0 +1,4 @@
+ampute
+======
+
+.. autofunction:: systemds.operator.algorithm.ampute
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/apply_pipeline.rst b/src/main/python/docs/source/api/operator/algorithms/apply_pipeline.rst
new file mode 100644
index 0000000000..1af55455da
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/apply_pipeline.rst
@@ -0,0 +1,4 @@
+apply_pipeline
+==============
+
+.. autofunction:: systemds.operator.algorithm.apply_pipeline
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/arima.rst b/src/main/python/docs/source/api/operator/algorithms/arima.rst
new file mode 100644
index 0000000000..af74a3f85f
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/arima.rst
@@ -0,0 +1,4 @@
+arima
+=====
+
+.. autofunction:: systemds.operator.algorithm.arima
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/auc.rst b/src/main/python/docs/source/api/operator/algorithms/auc.rst
new file mode 100644
index 0000000000..06457bdb4a
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/auc.rst
@@ -0,0 +1,4 @@
+auc
+===
+
+.. autofunction:: systemds.operator.algorithm.auc
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/autoencoder_2layer.rst b/src/main/python/docs/source/api/operator/algorithms/autoencoder_2layer.rst
new file mode 100644
index 0000000000..fee877e3ab
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/autoencoder_2layer.rst
@@ -0,0 +1,4 @@
+autoencoder_2layer
+==================
+
+.. autofunction:: systemds.operator.algorithm.autoencoder_2layer
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/bandit.rst b/src/main/python/docs/source/api/operator/algorithms/bandit.rst
new file mode 100644
index 0000000000..6884f821ce
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/bandit.rst
@@ -0,0 +1,4 @@
+bandit
+======
+
+.. autofunction:: systemds.operator.algorithm.bandit
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/bivar.rst b/src/main/python/docs/source/api/operator/algorithms/bivar.rst
new file mode 100644
index 0000000000..4def7aeac4
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/bivar.rst
@@ -0,0 +1,4 @@
+bivar
+=====
+
+.. autofunction:: systemds.operator.algorithm.bivar
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/components.rst b/src/main/python/docs/source/api/operator/algorithms/components.rst
new file mode 100644
index 0000000000..e42ca98cf6
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/components.rst
@@ -0,0 +1,4 @@
+components
+==========
+
+.. autofunction:: systemds.operator.algorithm.components
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/confusionMatrix.rst b/src/main/python/docs/source/api/operator/algorithms/confusionMatrix.rst
new file mode 100644
index 0000000000..9018952389
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/confusionMatrix.rst
@@ -0,0 +1,4 @@
+confusionMatrix
+===============
+
+.. autofunction:: systemds.operator.algorithm.confusionMatrix
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/cooccurrenceMatrix.rst b/src/main/python/docs/source/api/operator/algorithms/cooccurrenceMatrix.rst
new file mode 100644
index 0000000000..d768c2f775
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/cooccurrenceMatrix.rst
@@ -0,0 +1,4 @@
+cooccurrenceMatrix
+==================
+
+.. autofunction:: systemds.operator.algorithm.cooccurrenceMatrix
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/cor.rst b/src/main/python/docs/source/api/operator/algorithms/cor.rst
new file mode 100644
index 0000000000..34484d65ce
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/cor.rst
@@ -0,0 +1,4 @@
+cor
+===
+
+.. autofunction:: systemds.operator.algorithm.cor
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/correctTypos.rst b/src/main/python/docs/source/api/operator/algorithms/correctTypos.rst
new file mode 100644
index 0000000000..38a5b7695c
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/correctTypos.rst
@@ -0,0 +1,4 @@
+correctTypos
+============
+
+.. autofunction:: systemds.operator.algorithm.correctTypos
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/correctTyposApply.rst b/src/main/python/docs/source/api/operator/algorithms/correctTyposApply.rst
new file mode 100644
index 0000000000..a7f3a77a31
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/correctTyposApply.rst
@@ -0,0 +1,4 @@
+correctTyposApply
+=================
+
+.. autofunction:: systemds.operator.algorithm.correctTyposApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/cox.rst b/src/main/python/docs/source/api/operator/algorithms/cox.rst
new file mode 100644
index 0000000000..a8cbdf4248
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/cox.rst
@@ -0,0 +1,4 @@
+cox
+===
+
+.. autofunction:: systemds.operator.algorithm.cox
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/cspline.rst b/src/main/python/docs/source/api/operator/algorithms/cspline.rst
new file mode 100644
index 0000000000..00861c0b63
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/cspline.rst
@@ -0,0 +1,4 @@
+cspline
+=======
+
+.. autofunction:: systemds.operator.algorithm.cspline
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/csplineCG.rst b/src/main/python/docs/source/api/operator/algorithms/csplineCG.rst
new file mode 100644
index 0000000000..27785cfd48
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/csplineCG.rst
@@ -0,0 +1,4 @@
+csplineCG
+=========
+
+.. autofunction:: systemds.operator.algorithm.csplineCG
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/csplineDS.rst b/src/main/python/docs/source/api/operator/algorithms/csplineDS.rst
new file mode 100644
index 0000000000..01e5a9719f
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/csplineDS.rst
@@ -0,0 +1,4 @@
+csplineDS
+=========
+
+.. autofunction:: systemds.operator.algorithm.csplineDS
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/cvlm.rst b/src/main/python/docs/source/api/operator/algorithms/cvlm.rst
new file mode 100644
index 0000000000..e11cf61aba
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/cvlm.rst
@@ -0,0 +1,4 @@
+cvlm
+====
+
+.. autofunction:: systemds.operator.algorithm.cvlm
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/dbscan.rst b/src/main/python/docs/source/api/operator/algorithms/dbscan.rst
new file mode 100644
index 0000000000..5a72b28bfb
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/dbscan.rst
@@ -0,0 +1,4 @@
+dbscan
+======
+
+.. autofunction:: systemds.operator.algorithm.dbscan
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/dbscanApply.rst b/src/main/python/docs/source/api/operator/algorithms/dbscanApply.rst
new file mode 100644
index 0000000000..57b52e92ae
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/dbscanApply.rst
@@ -0,0 +1,4 @@
+dbscanApply
+===========
+
+.. autofunction:: systemds.operator.algorithm.dbscanApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/decisionTree.rst b/src/main/python/docs/source/api/operator/algorithms/decisionTree.rst
new file mode 100644
index 0000000000..39b871ddb9
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/decisionTree.rst
@@ -0,0 +1,4 @@
+decisionTree
+============
+
+.. autofunction:: systemds.operator.algorithm.decisionTree
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/decisionTreePredict.rst b/src/main/python/docs/source/api/operator/algorithms/decisionTreePredict.rst
new file mode 100644
index 0000000000..c2cadd0df3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/decisionTreePredict.rst
@@ -0,0 +1,4 @@
+decisionTreePredict
+===================
+
+.. autofunction:: systemds.operator.algorithm.decisionTreePredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/deepWalk.rst b/src/main/python/docs/source/api/operator/algorithms/deepWalk.rst
new file mode 100644
index 0000000000..48a60442bd
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/deepWalk.rst
@@ -0,0 +1,4 @@
+deepWalk
+========
+
+.. autofunction:: systemds.operator.algorithm.deepWalk
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/denialConstraints.rst b/src/main/python/docs/source/api/operator/algorithms/denialConstraints.rst
new file mode 100644
index 0000000000..6f9580b5ed
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/denialConstraints.rst
@@ -0,0 +1,4 @@
+denialConstraints
+=================
+
+.. autofunction:: systemds.operator.algorithm.denialConstraints
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/differenceStatistics.rst b/src/main/python/docs/source/api/operator/algorithms/differenceStatistics.rst
new file mode 100644
index 0000000000..bd5eff6c47
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/differenceStatistics.rst
@@ -0,0 +1,4 @@
+differenceStatistics
+====================
+
+.. autofunction:: systemds.operator.algorithm.differenceStatistics
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/discoverFD.rst b/src/main/python/docs/source/api/operator/algorithms/discoverFD.rst
new file mode 100644
index 0000000000..acb39f63b0
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/discoverFD.rst
@@ -0,0 +1,4 @@
+discoverFD
+==========
+
+.. autofunction:: systemds.operator.algorithm.discoverFD
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/dist.rst b/src/main/python/docs/source/api/operator/algorithms/dist.rst
new file mode 100644
index 0000000000..048d11444e
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/dist.rst
@@ -0,0 +1,4 @@
+dist
+====
+
+.. autofunction:: systemds.operator.algorithm.dist
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/dmv.rst b/src/main/python/docs/source/api/operator/algorithms/dmv.rst
new file mode 100644
index 0000000000..c01e47ea63
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/dmv.rst
@@ -0,0 +1,4 @@
+dmv
+===
+
+.. autofunction:: systemds.operator.algorithm.dmv
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/ema.rst b/src/main/python/docs/source/api/operator/algorithms/ema.rst
new file mode 100644
index 0000000000..1fab50bc65
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/ema.rst
@@ -0,0 +1,4 @@
+ema
+===
+
+.. autofunction:: systemds.operator.algorithm.ema
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/executePipeline.rst b/src/main/python/docs/source/api/operator/algorithms/executePipeline.rst
new file mode 100644
index 0000000000..e06fc6e96b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/executePipeline.rst
@@ -0,0 +1,4 @@
+executePipeline
+===============
+
+.. autofunction:: systemds.operator.algorithm.executePipeline
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/f1Score.rst b/src/main/python/docs/source/api/operator/algorithms/f1Score.rst
new file mode 100644
index 0000000000..fe436fc41b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/f1Score.rst
@@ -0,0 +1,4 @@
+f1Score
+=======
+
+.. autofunction:: systemds.operator.algorithm.f1Score
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/fdr.rst b/src/main/python/docs/source/api/operator/algorithms/fdr.rst
new file mode 100644
index 0000000000..a776cfa305
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/fdr.rst
@@ -0,0 +1,4 @@
+fdr
+===
+
+.. autofunction:: systemds.operator.algorithm.fdr
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/ffPredict.rst b/src/main/python/docs/source/api/operator/algorithms/ffPredict.rst
new file mode 100644
index 0000000000..9772e15959
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/ffPredict.rst
@@ -0,0 +1,4 @@
+ffPredict
+=========
+
+.. autofunction:: systemds.operator.algorithm.ffPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/ffTrain.rst b/src/main/python/docs/source/api/operator/algorithms/ffTrain.rst
new file mode 100644
index 0000000000..8e2b14ddfe
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/ffTrain.rst
@@ -0,0 +1,4 @@
+ffTrain
+=======
+
+.. autofunction:: systemds.operator.algorithm.ffTrain
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/fit_pipeline.rst b/src/main/python/docs/source/api/operator/algorithms/fit_pipeline.rst
new file mode 100644
index 0000000000..d3d32e880c
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/fit_pipeline.rst
@@ -0,0 +1,4 @@
+fit_pipeline
+============
+
+.. autofunction:: systemds.operator.algorithm.fit_pipeline
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/fixInvalidLengths.rst b/src/main/python/docs/source/api/operator/algorithms/fixInvalidLengths.rst
new file mode 100644
index 0000000000..31b0cd1233
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/fixInvalidLengths.rst
@@ -0,0 +1,4 @@
+fixInvalidLengths
+=================
+
+.. autofunction:: systemds.operator.algorithm.fixInvalidLengths
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/fixInvalidLengthsApply.rst b/src/main/python/docs/source/api/operator/algorithms/fixInvalidLengthsApply.rst
new file mode 100644
index 0000000000..95e5802fb3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/fixInvalidLengthsApply.rst
@@ -0,0 +1,4 @@
+fixInvalidLengthsApply
+======================
+
+.. autofunction:: systemds.operator.algorithm.fixInvalidLengthsApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/flattenQuantile.rst b/src/main/python/docs/source/api/operator/algorithms/flattenQuantile.rst
new file mode 100644
index 0000000000..e6fffa7140
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/flattenQuantile.rst
@@ -0,0 +1,4 @@
+flattenQuantile
+===============
+
+.. autofunction:: systemds.operator.algorithm.flattenQuantile
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/frameSort.rst b/src/main/python/docs/source/api/operator/algorithms/frameSort.rst
new file mode 100644
index 0000000000..87ee40c035
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/frameSort.rst
@@ -0,0 +1,4 @@
+frameSort
+=========
+
+.. autofunction:: systemds.operator.algorithm.frameSort
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/frequencyEncode.rst b/src/main/python/docs/source/api/operator/algorithms/frequencyEncode.rst
new file mode 100644
index 0000000000..e54e934d0c
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/frequencyEncode.rst
@@ -0,0 +1,4 @@
+frequencyEncode
+===============
+
+.. autofunction:: systemds.operator.algorithm.frequencyEncode
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/frequencyEncodeApply.rst b/src/main/python/docs/source/api/operator/algorithms/frequencyEncodeApply.rst
new file mode 100644
index 0000000000..db4d94e92b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/frequencyEncodeApply.rst
@@ -0,0 +1,4 @@
+frequencyEncodeApply
+====================
+
+.. autofunction:: systemds.operator.algorithm.frequencyEncodeApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/garch.rst b/src/main/python/docs/source/api/operator/algorithms/garch.rst
new file mode 100644
index 0000000000..0c605ab8a3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/garch.rst
@@ -0,0 +1,4 @@
+garch
+=====
+
+.. autofunction:: systemds.operator.algorithm.garch
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/gaussianClassifier.rst b/src/main/python/docs/source/api/operator/algorithms/gaussianClassifier.rst
new file mode 100644
index 0000000000..e202cefae8
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/gaussianClassifier.rst
@@ -0,0 +1,4 @@
+gaussianClassifier
+==================
+
+.. autofunction:: systemds.operator.algorithm.gaussianClassifier
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/getAccuracy.rst b/src/main/python/docs/source/api/operator/algorithms/getAccuracy.rst
new file mode 100644
index 0000000000..da9b573d3d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/getAccuracy.rst
@@ -0,0 +1,4 @@
+getAccuracy
+===========
+
+.. autofunction:: systemds.operator.algorithm.getAccuracy
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/glm.rst b/src/main/python/docs/source/api/operator/algorithms/glm.rst
new file mode 100644
index 0000000000..44a40c2a06
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/glm.rst
@@ -0,0 +1,4 @@
+glm
+===
+
+.. autofunction:: systemds.operator.algorithm.glm
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/glmPredict.rst b/src/main/python/docs/source/api/operator/algorithms/glmPredict.rst
new file mode 100644
index 0000000000..556ac2bbc4
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/glmPredict.rst
@@ -0,0 +1,4 @@
+glmPredict
+==========
+
+.. autofunction:: systemds.operator.algorithm.glmPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/glove.rst b/src/main/python/docs/source/api/operator/algorithms/glove.rst
new file mode 100644
index 0000000000..e578875378
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/glove.rst
@@ -0,0 +1,4 @@
+glove
+=====
+
+.. autofunction:: systemds.operator.algorithm.glove
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/gmm.rst b/src/main/python/docs/source/api/operator/algorithms/gmm.rst
new file mode 100644
index 0000000000..081f197ffa
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/gmm.rst
@@ -0,0 +1,4 @@
+gmm
+===
+
+.. autofunction:: systemds.operator.algorithm.gmm
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/gmmPredict.rst b/src/main/python/docs/source/api/operator/algorithms/gmmPredict.rst
new file mode 100644
index 0000000000..9dd34ee83b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/gmmPredict.rst
@@ -0,0 +1,4 @@
+gmmPredict
+==========
+
+.. autofunction:: systemds.operator.algorithm.gmmPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/gnmf.rst b/src/main/python/docs/source/api/operator/algorithms/gnmf.rst
new file mode 100644
index 0000000000..2a7295d9da
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/gnmf.rst
@@ -0,0 +1,4 @@
+gnmf
+====
+
+.. autofunction:: systemds.operator.algorithm.gnmf
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/gridSearch.rst b/src/main/python/docs/source/api/operator/algorithms/gridSearch.rst
new file mode 100644
index 0000000000..b59e437004
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/gridSearch.rst
@@ -0,0 +1,4 @@
+gridSearch
+==========
+
+.. autofunction:: systemds.operator.algorithm.gridSearch
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/hospitalResidencyMatch.rst b/src/main/python/docs/source/api/operator/algorithms/hospitalResidencyMatch.rst
new file mode 100644
index 0000000000..92d798e644
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/hospitalResidencyMatch.rst
@@ -0,0 +1,4 @@
+hospitalResidencyMatch
+======================
+
+.. autofunction:: systemds.operator.algorithm.hospitalResidencyMatch
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/hyperband.rst b/src/main/python/docs/source/api/operator/algorithms/hyperband.rst
new file mode 100644
index 0000000000..270fd16601
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/hyperband.rst
@@ -0,0 +1,4 @@
+hyperband
+=========
+
+.. autofunction:: systemds.operator.algorithm.hyperband
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_brightness.rst b/src/main/python/docs/source/api/operator/algorithms/img_brightness.rst
new file mode 100644
index 0000000000..b43686296b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_brightness.rst
@@ -0,0 +1,4 @@
+img_brightness
+==============
+
+.. autofunction:: systemds.operator.algorithm.img_brightness
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_brightness_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_brightness_linearized.rst
new file mode 100644
index 0000000000..a0ac5c1ea7
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_brightness_linearized.rst
@@ -0,0 +1,4 @@
+img_brightness_linearized
+=========================
+
+.. autofunction:: systemds.operator.algorithm.img_brightness_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_crop.rst b/src/main/python/docs/source/api/operator/algorithms/img_crop.rst
new file mode 100644
index 0000000000..eab6bb2a07
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_crop.rst
@@ -0,0 +1,4 @@
+img_crop
+========
+
+.. autofunction:: systemds.operator.algorithm.img_crop
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_crop_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_crop_linearized.rst
new file mode 100644
index 0000000000..e19d3a70a8
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_crop_linearized.rst
@@ -0,0 +1,4 @@
+img_crop_linearized
+===================
+
+.. autofunction:: systemds.operator.algorithm.img_crop_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_cutout.rst b/src/main/python/docs/source/api/operator/algorithms/img_cutout.rst
new file mode 100644
index 0000000000..b9b5e8467c
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_cutout.rst
@@ -0,0 +1,4 @@
+img_cutout
+==========
+
+.. autofunction:: systemds.operator.algorithm.img_cutout
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_cutout_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_cutout_linearized.rst
new file mode 100644
index 0000000000..7ce7c76b1d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_cutout_linearized.rst
@@ -0,0 +1,4 @@
+img_cutout_linearized
+=====================
+
+.. autofunction:: systemds.operator.algorithm.img_cutout_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_invert.rst b/src/main/python/docs/source/api/operator/algorithms/img_invert.rst
new file mode 100644
index 0000000000..be0af11a5a
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_invert.rst
@@ -0,0 +1,4 @@
+img_invert
+==========
+
+.. autofunction:: systemds.operator.algorithm.img_invert
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_invert_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_invert_linearized.rst
new file mode 100644
index 0000000000..8d0a6cf520
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_invert_linearized.rst
@@ -0,0 +1,4 @@
+img_invert_linearized
+=====================
+
+.. autofunction:: systemds.operator.algorithm.img_invert_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_mirror.rst b/src/main/python/docs/source/api/operator/algorithms/img_mirror.rst
new file mode 100644
index 0000000000..d1d31fba23
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_mirror.rst
@@ -0,0 +1,4 @@
+img_mirror
+==========
+
+.. autofunction:: systemds.operator.algorithm.img_mirror
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_mirror_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_mirror_linearized.rst
new file mode 100644
index 0000000000..56076e239f
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_mirror_linearized.rst
@@ -0,0 +1,4 @@
+img_mirror_linearized
+=====================
+
+.. autofunction:: systemds.operator.algorithm.img_mirror_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_posterize.rst b/src/main/python/docs/source/api/operator/algorithms/img_posterize.rst
new file mode 100644
index 0000000000..d2db21b114
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_posterize.rst
@@ -0,0 +1,4 @@
+img_posterize
+=============
+
+.. autofunction:: systemds.operator.algorithm.img_posterize
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_posterize_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_posterize_linearized.rst
new file mode 100644
index 0000000000..debac6d54d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_posterize_linearized.rst
@@ -0,0 +1,4 @@
+img_posterize_linearized
+========================
+
+.. autofunction:: systemds.operator.algorithm.img_posterize_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_rotate.rst b/src/main/python/docs/source/api/operator/algorithms/img_rotate.rst
new file mode 100644
index 0000000000..fca9801b32
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_rotate.rst
@@ -0,0 +1,4 @@
+img_rotate
+==========
+
+.. autofunction:: systemds.operator.algorithm.img_rotate
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_rotate_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_rotate_linearized.rst
new file mode 100644
index 0000000000..f40f086f84
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_rotate_linearized.rst
@@ -0,0 +1,4 @@
+img_rotate_linearized
+=====================
+
+.. autofunction:: systemds.operator.algorithm.img_rotate_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_sample_pairing.rst b/src/main/python/docs/source/api/operator/algorithms/img_sample_pairing.rst
new file mode 100644
index 0000000000..7de25f74b5
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_sample_pairing.rst
@@ -0,0 +1,4 @@
+img_sample_pairing
+==================
+
+.. autofunction:: systemds.operator.algorithm.img_sample_pairing
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_sample_pairing_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_sample_pairing_linearized.rst
new file mode 100644
index 0000000000..8cfd5a1873
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_sample_pairing_linearized.rst
@@ -0,0 +1,4 @@
+img_sample_pairing_linearized
+=============================
+
+.. autofunction:: systemds.operator.algorithm.img_sample_pairing_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_shear.rst b/src/main/python/docs/source/api/operator/algorithms/img_shear.rst
new file mode 100644
index 0000000000..8c8144d461
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_shear.rst
@@ -0,0 +1,4 @@
+img_shear
+=========
+
+.. autofunction:: systemds.operator.algorithm.img_shear
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_shear_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_shear_linearized.rst
new file mode 100644
index 0000000000..8907f6a90b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_shear_linearized.rst
@@ -0,0 +1,4 @@
+img_shear_linearized
+====================
+
+.. autofunction:: systemds.operator.algorithm.img_shear_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_transform.rst b/src/main/python/docs/source/api/operator/algorithms/img_transform.rst
new file mode 100644
index 0000000000..6bb4676270
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_transform.rst
@@ -0,0 +1,4 @@
+img_transform
+=============
+
+.. autofunction:: systemds.operator.algorithm.img_transform
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_transform_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_transform_linearized.rst
new file mode 100644
index 0000000000..16d043af9b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_transform_linearized.rst
@@ -0,0 +1,4 @@
+img_transform_linearized
+========================
+
+.. autofunction:: systemds.operator.algorithm.img_transform_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_translate.rst b/src/main/python/docs/source/api/operator/algorithms/img_translate.rst
new file mode 100644
index 0000000000..8b5952f8d0
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_translate.rst
@@ -0,0 +1,4 @@
+img_translate
+=============
+
+.. autofunction:: systemds.operator.algorithm.img_translate
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/img_translate_linearized.rst b/src/main/python/docs/source/api/operator/algorithms/img_translate_linearized.rst
new file mode 100644
index 0000000000..02f0ac813d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/img_translate_linearized.rst
@@ -0,0 +1,4 @@
+img_translate_linearized
+========================
+
+.. autofunction:: systemds.operator.algorithm.img_translate_linearized
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/impurityMeasures.rst b/src/main/python/docs/source/api/operator/algorithms/impurityMeasures.rst
new file mode 100644
index 0000000000..bbb6460a20
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/impurityMeasures.rst
@@ -0,0 +1,4 @@
+impurityMeasures
+================
+
+.. autofunction:: systemds.operator.algorithm.impurityMeasures
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByFD.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByFD.rst
new file mode 100644
index 0000000000..f2378547e2
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByFD.rst
@@ -0,0 +1,4 @@
+imputeByFD
+==========
+
+.. autofunction:: systemds.operator.algorithm.imputeByFD
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByFDApply.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByFDApply.rst
new file mode 100644
index 0000000000..90d7b52601
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByFDApply.rst
@@ -0,0 +1,4 @@
+imputeByFDApply
+===============
+
+.. autofunction:: systemds.operator.algorithm.imputeByFDApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByKNN.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByKNN.rst
new file mode 100644
index 0000000000..3f2e21eb59
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByKNN.rst
@@ -0,0 +1,4 @@
+imputeByKNN
+===========
+
+.. autofunction:: systemds.operator.algorithm.imputeByKNN
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByMean.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByMean.rst
new file mode 100644
index 0000000000..cf7f4dc128
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByMean.rst
@@ -0,0 +1,4 @@
+imputeByMean
+============
+
+.. autofunction:: systemds.operator.algorithm.imputeByMean
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByMeanApply.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByMeanApply.rst
new file mode 100644
index 0000000000..688b48db94
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByMeanApply.rst
@@ -0,0 +1,4 @@
+imputeByMeanApply
+=================
+
+.. autofunction:: systemds.operator.algorithm.imputeByMeanApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByMedian.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByMedian.rst
new file mode 100644
index 0000000000..a6762253de
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByMedian.rst
@@ -0,0 +1,4 @@
+imputeByMedian
+==============
+
+.. autofunction:: systemds.operator.algorithm.imputeByMedian
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByMedianApply.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByMedianApply.rst
new file mode 100644
index 0000000000..a6513410a3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByMedianApply.rst
@@ -0,0 +1,4 @@
+imputeByMedianApply
+===================
+
+.. autofunction:: systemds.operator.algorithm.imputeByMedianApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByMode.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByMode.rst
new file mode 100644
index 0000000000..817ec471d2
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByMode.rst
@@ -0,0 +1,4 @@
+imputeByMode
+============
+
+.. autofunction:: systemds.operator.algorithm.imputeByMode
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/imputeByModeApply.rst b/src/main/python/docs/source/api/operator/algorithms/imputeByModeApply.rst
new file mode 100644
index 0000000000..b7c78a9589
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/imputeByModeApply.rst
@@ -0,0 +1,4 @@
+imputeByModeApply
+=================
+
+.. autofunction:: systemds.operator.algorithm.imputeByModeApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/incSliceLine.rst b/src/main/python/docs/source/api/operator/algorithms/incSliceLine.rst
new file mode 100644
index 0000000000..da2c1f58de
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/incSliceLine.rst
@@ -0,0 +1,4 @@
+incSliceLine
+============
+
+.. autofunction:: systemds.operator.algorithm.incSliceLine
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/intersect.rst b/src/main/python/docs/source/api/operator/algorithms/intersect.rst
new file mode 100644
index 0000000000..762d68708b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/intersect.rst
@@ -0,0 +1,4 @@
+intersect
+=========
+
+.. autofunction:: systemds.operator.algorithm.intersect
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/km.rst b/src/main/python/docs/source/api/operator/algorithms/km.rst
new file mode 100644
index 0000000000..8392789508
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/km.rst
@@ -0,0 +1,4 @@
+km
+==
+
+.. autofunction:: systemds.operator.algorithm.km
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/kmeans.rst b/src/main/python/docs/source/api/operator/algorithms/kmeans.rst
new file mode 100644
index 0000000000..7f4d1a9259
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/kmeans.rst
@@ -0,0 +1,4 @@
+kmeans
+======
+
+.. autofunction:: systemds.operator.algorithm.kmeans
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/kmeansPredict.rst b/src/main/python/docs/source/api/operator/algorithms/kmeansPredict.rst
new file mode 100644
index 0000000000..b0832ee485
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/kmeansPredict.rst
@@ -0,0 +1,4 @@
+kmeansPredict
+=============
+
+.. autofunction:: systemds.operator.algorithm.kmeansPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/knn.rst b/src/main/python/docs/source/api/operator/algorithms/knn.rst
new file mode 100644
index 0000000000..c9bc1ed67d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/knn.rst
@@ -0,0 +1,4 @@
+knn
+===
+
+.. autofunction:: systemds.operator.algorithm.knn
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/knnGraph.rst b/src/main/python/docs/source/api/operator/algorithms/knnGraph.rst
new file mode 100644
index 0000000000..19c9c7adc2
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/knnGraph.rst
@@ -0,0 +1,4 @@
+knnGraph
+========
+
+.. autofunction:: systemds.operator.algorithm.knnGraph
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/knnbf.rst b/src/main/python/docs/source/api/operator/algorithms/knnbf.rst
new file mode 100644
index 0000000000..098af73b36
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/knnbf.rst
@@ -0,0 +1,4 @@
+knnbf
+=====
+
+.. autofunction:: systemds.operator.algorithm.knnbf
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/l2svm.rst b/src/main/python/docs/source/api/operator/algorithms/l2svm.rst
new file mode 100644
index 0000000000..ab8155faaa
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/l2svm.rst
@@ -0,0 +1,4 @@
+l2svm
+=====
+
+.. autofunction:: systemds.operator.algorithm.l2svm
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/l2svmPredict.rst b/src/main/python/docs/source/api/operator/algorithms/l2svmPredict.rst
new file mode 100644
index 0000000000..0aede20fcb
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/l2svmPredict.rst
@@ -0,0 +1,4 @@
+l2svmPredict
+============
+
+.. autofunction:: systemds.operator.algorithm.l2svmPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lasso.rst b/src/main/python/docs/source/api/operator/algorithms/lasso.rst
new file mode 100644
index 0000000000..c4d8f49093
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lasso.rst
@@ -0,0 +1,4 @@
+lasso
+=====
+
+.. autofunction:: systemds.operator.algorithm.lasso
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lenetPredict.rst b/src/main/python/docs/source/api/operator/algorithms/lenetPredict.rst
new file mode 100644
index 0000000000..f7ca6d4cfa
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lenetPredict.rst
@@ -0,0 +1,4 @@
+lenetPredict
+============
+
+.. autofunction:: systemds.operator.algorithm.lenetPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lenetTrain.rst b/src/main/python/docs/source/api/operator/algorithms/lenetTrain.rst
new file mode 100644
index 0000000000..59a1463290
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lenetTrain.rst
@@ -0,0 +1,4 @@
+lenetTrain
+==========
+
+.. autofunction:: systemds.operator.algorithm.lenetTrain
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lm.rst b/src/main/python/docs/source/api/operator/algorithms/lm.rst
new file mode 100644
index 0000000000..50eded5883
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lm.rst
@@ -0,0 +1,4 @@
+lm
+==
+
+.. autofunction:: systemds.operator.algorithm.lm
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lmCG.rst b/src/main/python/docs/source/api/operator/algorithms/lmCG.rst
new file mode 100644
index 0000000000..e0242f1377
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lmCG.rst
@@ -0,0 +1,4 @@
+lmCG
+====
+
+.. autofunction:: systemds.operator.algorithm.lmCG
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lmDS.rst b/src/main/python/docs/source/api/operator/algorithms/lmDS.rst
new file mode 100644
index 0000000000..52255a9310
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lmDS.rst
@@ -0,0 +1,4 @@
+lmDS
+====
+
+.. autofunction:: systemds.operator.algorithm.lmDS
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lmPredict.rst b/src/main/python/docs/source/api/operator/algorithms/lmPredict.rst
new file mode 100644
index 0000000000..a7179cb84e
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lmPredict.rst
@@ -0,0 +1,4 @@
+lmPredict
+=========
+
+.. autofunction:: systemds.operator.algorithm.lmPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/lmPredictStats.rst b/src/main/python/docs/source/api/operator/algorithms/lmPredictStats.rst
new file mode 100644
index 0000000000..984fd90730
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/lmPredictStats.rst
@@ -0,0 +1,4 @@
+lmPredictStats
+==============
+
+.. autofunction:: systemds.operator.algorithm.lmPredictStats
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/logSumExp.rst b/src/main/python/docs/source/api/operator/algorithms/logSumExp.rst
new file mode 100644
index 0000000000..aea539ced3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/logSumExp.rst
@@ -0,0 +1,4 @@
+logSumExp
+=========
+
+.. autofunction:: systemds.operator.algorithm.logSumExp
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/mae.rst b/src/main/python/docs/source/api/operator/algorithms/mae.rst
new file mode 100644
index 0000000000..36094918d8
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/mae.rst
@@ -0,0 +1,4 @@
+mae
+===
+
+.. autofunction:: systemds.operator.algorithm.mae
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/mape.rst b/src/main/python/docs/source/api/operator/algorithms/mape.rst
new file mode 100644
index 0000000000..a2284debb8
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/mape.rst
@@ -0,0 +1,4 @@
+mape
+====
+
+.. autofunction:: systemds.operator.algorithm.mape
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/matrixProfile.rst b/src/main/python/docs/source/api/operator/algorithms/matrixProfile.rst
new file mode 100644
index 0000000000..6dd5b4a7dd
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/matrixProfile.rst
@@ -0,0 +1,4 @@
+matrixProfile
+=============
+
+.. autofunction:: systemds.operator.algorithm.matrixProfile
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/mcc.rst b/src/main/python/docs/source/api/operator/algorithms/mcc.rst
new file mode 100644
index 0000000000..918f849be8
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/mcc.rst
@@ -0,0 +1,4 @@
+mcc
+===
+
+.. autofunction:: systemds.operator.algorithm.mcc
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/mdedup.rst b/src/main/python/docs/source/api/operator/algorithms/mdedup.rst
new file mode 100644
index 0000000000..88fd7ed5be
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/mdedup.rst
@@ -0,0 +1,4 @@
+mdedup
+======
+
+.. autofunction:: systemds.operator.algorithm.mdedup
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/mice.rst b/src/main/python/docs/source/api/operator/algorithms/mice.rst
new file mode 100644
index 0000000000..429337e782
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/mice.rst
@@ -0,0 +1,4 @@
+mice
+====
+
+.. autofunction:: systemds.operator.algorithm.mice
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/miceApply.rst b/src/main/python/docs/source/api/operator/algorithms/miceApply.rst
new file mode 100644
index 0000000000..2ecc09a5c2
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/miceApply.rst
@@ -0,0 +1,4 @@
+miceApply
+=========
+
+.. autofunction:: systemds.operator.algorithm.miceApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/mse.rst b/src/main/python/docs/source/api/operator/algorithms/mse.rst
new file mode 100644
index 0000000000..b739bbda38
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/mse.rst
@@ -0,0 +1,4 @@
+mse
+===
+
+.. autofunction:: systemds.operator.algorithm.mse
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/msmape.rst b/src/main/python/docs/source/api/operator/algorithms/msmape.rst
new file mode 100644
index 0000000000..b71f226d93
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/msmape.rst
@@ -0,0 +1,4 @@
+msmape
+======
+
+.. autofunction:: systemds.operator.algorithm.msmape
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/msvm.rst b/src/main/python/docs/source/api/operator/algorithms/msvm.rst
new file mode 100644
index 0000000000..744f0b3dd7
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/msvm.rst
@@ -0,0 +1,4 @@
+msvm
+====
+
+.. autofunction:: systemds.operator.algorithm.msvm
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/msvmPredict.rst b/src/main/python/docs/source/api/operator/algorithms/msvmPredict.rst
new file mode 100644
index 0000000000..7900af7168
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/msvmPredict.rst
@@ -0,0 +1,4 @@
+msvmPredict
+===========
+
+.. autofunction:: systemds.operator.algorithm.msvmPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/multiLogReg.rst b/src/main/python/docs/source/api/operator/algorithms/multiLogReg.rst
new file mode 100644
index 0000000000..603271a702
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/multiLogReg.rst
@@ -0,0 +1,4 @@
+multiLogReg
+===========
+
+.. autofunction:: systemds.operator.algorithm.multiLogReg
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/multiLogRegPredict.rst b/src/main/python/docs/source/api/operator/algorithms/multiLogRegPredict.rst
new file mode 100644
index 0000000000..edaf7f8305
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/multiLogRegPredict.rst
@@ -0,0 +1,4 @@
+multiLogRegPredict
+==================
+
+.. autofunction:: systemds.operator.algorithm.multiLogRegPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/na_locf.rst b/src/main/python/docs/source/api/operator/algorithms/na_locf.rst
new file mode 100644
index 0000000000..bc1c11bbc1
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/na_locf.rst
@@ -0,0 +1,4 @@
+na_locf
+=======
+
+.. autofunction:: systemds.operator.algorithm.na_locf
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/naiveBayes.rst b/src/main/python/docs/source/api/operator/algorithms/naiveBayes.rst
new file mode 100644
index 0000000000..0dcd81e0e2
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/naiveBayes.rst
@@ -0,0 +1,4 @@
+naiveBayes
+==========
+
+.. autofunction:: systemds.operator.algorithm.naiveBayes
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/naiveBayesPredict.rst b/src/main/python/docs/source/api/operator/algorithms/naiveBayesPredict.rst
new file mode 100644
index 0000000000..96882aea3d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/naiveBayesPredict.rst
@@ -0,0 +1,4 @@
+naiveBayesPredict
+=================
+
+.. autofunction:: systemds.operator.algorithm.naiveBayesPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/normalize.rst b/src/main/python/docs/source/api/operator/algorithms/normalize.rst
new file mode 100644
index 0000000000..10ebc62538
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/normalize.rst
@@ -0,0 +1,4 @@
+normalize
+=========
+
+.. autofunction:: systemds.operator.algorithm.normalize
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/normalizeApply.rst b/src/main/python/docs/source/api/operator/algorithms/normalizeApply.rst
new file mode 100644
index 0000000000..cc42b36e95
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/normalizeApply.rst
@@ -0,0 +1,4 @@
+normalizeApply
+==============
+
+.. autofunction:: systemds.operator.algorithm.normalizeApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/nrmse.rst b/src/main/python/docs/source/api/operator/algorithms/nrmse.rst
new file mode 100644
index 0000000000..ad189fa080
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/nrmse.rst
@@ -0,0 +1,4 @@
+nrmse
+=====
+
+.. autofunction:: systemds.operator.algorithm.nrmse
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/outlier.rst b/src/main/python/docs/source/api/operator/algorithms/outlier.rst
new file mode 100644
index 0000000000..e79c68e3a3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/outlier.rst
@@ -0,0 +1,4 @@
+outlier
+=======
+
+.. autofunction:: systemds.operator.algorithm.outlier
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/outlierByArima.rst b/src/main/python/docs/source/api/operator/algorithms/outlierByArima.rst
new file mode 100644
index 0000000000..7ea56086d3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/outlierByArima.rst
@@ -0,0 +1,4 @@
+outlierByArima
+==============
+
+.. autofunction:: systemds.operator.algorithm.outlierByArima
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/outlierByIQR.rst b/src/main/python/docs/source/api/operator/algorithms/outlierByIQR.rst
new file mode 100644
index 0000000000..fe62f01994
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/outlierByIQR.rst
@@ -0,0 +1,4 @@
+outlierByIQR
+============
+
+.. autofunction:: systemds.operator.algorithm.outlierByIQR
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/outlierByIQRApply.rst b/src/main/python/docs/source/api/operator/algorithms/outlierByIQRApply.rst
new file mode 100644
index 0000000000..2681463d05
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/outlierByIQRApply.rst
@@ -0,0 +1,4 @@
+outlierByIQRApply
+=================
+
+.. autofunction:: systemds.operator.algorithm.outlierByIQRApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/outlierBySd.rst b/src/main/python/docs/source/api/operator/algorithms/outlierBySd.rst
new file mode 100644
index 0000000000..bf7a66cf0d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/outlierBySd.rst
@@ -0,0 +1,4 @@
+outlierBySd
+===========
+
+.. autofunction:: systemds.operator.algorithm.outlierBySd
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/outlierBySdApply.rst b/src/main/python/docs/source/api/operator/algorithms/outlierBySdApply.rst
new file mode 100644
index 0000000000..ed34b6b6d2
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/outlierBySdApply.rst
@@ -0,0 +1,4 @@
+outlierBySdApply
+================
+
+.. autofunction:: systemds.operator.algorithm.outlierBySdApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/pageRank.rst b/src/main/python/docs/source/api/operator/algorithms/pageRank.rst
new file mode 100644
index 0000000000..f1bedc8419
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/pageRank.rst
@@ -0,0 +1,4 @@
+pageRank
+========
+
+.. autofunction:: systemds.operator.algorithm.pageRank
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/pca.rst b/src/main/python/docs/source/api/operator/algorithms/pca.rst
new file mode 100644
index 0000000000..1eda6ee503
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/pca.rst
@@ -0,0 +1,4 @@
+pca
+===
+
+.. autofunction:: systemds.operator.algorithm.pca
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/pcaInverse.rst b/src/main/python/docs/source/api/operator/algorithms/pcaInverse.rst
new file mode 100644
index 0000000000..6cc0cf1bff
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/pcaInverse.rst
@@ -0,0 +1,4 @@
+pcaInverse
+==========
+
+.. autofunction:: systemds.operator.algorithm.pcaInverse
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/pcaTransform.rst b/src/main/python/docs/source/api/operator/algorithms/pcaTransform.rst
new file mode 100644
index 0000000000..f78df2e465
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/pcaTransform.rst
@@ -0,0 +1,4 @@
+pcaTransform
+============
+
+.. autofunction:: systemds.operator.algorithm.pcaTransform
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/pnmf.rst b/src/main/python/docs/source/api/operator/algorithms/pnmf.rst
new file mode 100644
index 0000000000..1dd0dcb367
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/pnmf.rst
@@ -0,0 +1,4 @@
+pnmf
+====
+
+.. autofunction:: systemds.operator.algorithm.pnmf
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/ppca.rst b/src/main/python/docs/source/api/operator/algorithms/ppca.rst
new file mode 100644
index 0000000000..38e6f4468b
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/ppca.rst
@@ -0,0 +1,4 @@
+ppca
+====
+
+.. autofunction:: systemds.operator.algorithm.ppca
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/psnr.rst b/src/main/python/docs/source/api/operator/algorithms/psnr.rst
new file mode 100644
index 0000000000..c16bb02613
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/psnr.rst
@@ -0,0 +1,4 @@
+psnr
+====
+
+.. autofunction:: systemds.operator.algorithm.psnr
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/quantizeByCluster.rst b/src/main/python/docs/source/api/operator/algorithms/quantizeByCluster.rst
new file mode 100644
index 0000000000..1d4edf6d0d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/quantizeByCluster.rst
@@ -0,0 +1,4 @@
+quantizeByCluster
+=================
+
+.. autofunction:: systemds.operator.algorithm.quantizeByCluster
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/raGroupby.rst b/src/main/python/docs/source/api/operator/algorithms/raGroupby.rst
new file mode 100644
index 0000000000..bdf7bc9294
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/raGroupby.rst
@@ -0,0 +1,4 @@
+raGroupby
+=========
+
+.. autofunction:: systemds.operator.algorithm.raGroupby
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/raJoin.rst b/src/main/python/docs/source/api/operator/algorithms/raJoin.rst
new file mode 100644
index 0000000000..f26d443fdb
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/raJoin.rst
@@ -0,0 +1,4 @@
+raJoin
+======
+
+.. autofunction:: systemds.operator.algorithm.raJoin
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/raSelection.rst b/src/main/python/docs/source/api/operator/algorithms/raSelection.rst
new file mode 100644
index 0000000000..7ce2f3805e
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/raSelection.rst
@@ -0,0 +1,4 @@
+raSelection
+===========
+
+.. autofunction:: systemds.operator.algorithm.raSelection
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/randomForest.rst b/src/main/python/docs/source/api/operator/algorithms/randomForest.rst
new file mode 100644
index 0000000000..e38646fabc
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/randomForest.rst
@@ -0,0 +1,4 @@
+randomForest
+============
+
+.. autofunction:: systemds.operator.algorithm.randomForest
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/randomForestPredict.rst b/src/main/python/docs/source/api/operator/algorithms/randomForestPredict.rst
new file mode 100644
index 0000000000..e49e104980
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/randomForestPredict.rst
@@ -0,0 +1,4 @@
+randomForestPredict
+===================
+
+.. autofunction:: systemds.operator.algorithm.randomForestPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/rmse.rst b/src/main/python/docs/source/api/operator/algorithms/rmse.rst
new file mode 100644
index 0000000000..9a4772dcbd
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/rmse.rst
@@ -0,0 +1,4 @@
+rmse
+====
+
+.. autofunction:: systemds.operator.algorithm.rmse
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/scale.rst b/src/main/python/docs/source/api/operator/algorithms/scale.rst
new file mode 100644
index 0000000000..48a3d09415
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/scale.rst
@@ -0,0 +1,4 @@
+scale
+=====
+
+.. autofunction:: systemds.operator.algorithm.scale
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/scaleApply.rst b/src/main/python/docs/source/api/operator/algorithms/scaleApply.rst
new file mode 100644
index 0000000000..4150e19e62
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/scaleApply.rst
@@ -0,0 +1,4 @@
+scaleApply
+==========
+
+.. autofunction:: systemds.operator.algorithm.scaleApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/scaleMinMax.rst b/src/main/python/docs/source/api/operator/algorithms/scaleMinMax.rst
new file mode 100644
index 0000000000..a8a18237ca
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/scaleMinMax.rst
@@ -0,0 +1,4 @@
+scaleMinMax
+===========
+
+.. autofunction:: systemds.operator.algorithm.scaleMinMax
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/selectByVarThresh.rst b/src/main/python/docs/source/api/operator/algorithms/selectByVarThresh.rst
new file mode 100644
index 0000000000..f84ccd0678
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/selectByVarThresh.rst
@@ -0,0 +1,4 @@
+selectByVarThresh
+=================
+
+.. autofunction:: systemds.operator.algorithm.selectByVarThresh
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/ses.rst b/src/main/python/docs/source/api/operator/algorithms/ses.rst
new file mode 100644
index 0000000000..6e797bbfe7
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/ses.rst
@@ -0,0 +1,4 @@
+ses
+===
+
+.. autofunction:: systemds.operator.algorithm.ses
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/setdiff.rst b/src/main/python/docs/source/api/operator/algorithms/setdiff.rst
new file mode 100644
index 0000000000..abb64d899a
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/setdiff.rst
@@ -0,0 +1,4 @@
+setdiff
+=======
+
+.. autofunction:: systemds.operator.algorithm.setdiff
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/shapExplainer.rst b/src/main/python/docs/source/api/operator/algorithms/shapExplainer.rst
new file mode 100644
index 0000000000..b376f4a5f8
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/shapExplainer.rst
@@ -0,0 +1,4 @@
+shapExplainer
+=============
+
+.. autofunction:: systemds.operator.algorithm.shapExplainer
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/sherlock.rst b/src/main/python/docs/source/api/operator/algorithms/sherlock.rst
new file mode 100644
index 0000000000..bec99c1dcc
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/sherlock.rst
@@ -0,0 +1,4 @@
+sherlock
+========
+
+.. autofunction:: systemds.operator.algorithm.sherlock
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/sherlockPredict.rst b/src/main/python/docs/source/api/operator/algorithms/sherlockPredict.rst
new file mode 100644
index 0000000000..bb3c82835d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/sherlockPredict.rst
@@ -0,0 +1,4 @@
+sherlockPredict
+===============
+
+.. autofunction:: systemds.operator.algorithm.sherlockPredict
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/shortestPath.rst b/src/main/python/docs/source/api/operator/algorithms/shortestPath.rst
new file mode 100644
index 0000000000..8bba99bf79
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/shortestPath.rst
@@ -0,0 +1,4 @@
+shortestPath
+============
+
+.. autofunction:: systemds.operator.algorithm.shortestPath
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/sigmoid.rst b/src/main/python/docs/source/api/operator/algorithms/sigmoid.rst
new file mode 100644
index 0000000000..b2e613532f
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/sigmoid.rst
@@ -0,0 +1,4 @@
+sigmoid
+=======
+
+.. autofunction:: systemds.operator.algorithm.sigmoid
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/skewness.rst b/src/main/python/docs/source/api/operator/algorithms/skewness.rst
new file mode 100644
index 0000000000..7d4d80df49
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/skewness.rst
@@ -0,0 +1,4 @@
+skewness
+========
+
+.. autofunction:: systemds.operator.algorithm.skewness
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/sliceLine.rst b/src/main/python/docs/source/api/operator/algorithms/sliceLine.rst
new file mode 100644
index 0000000000..df6362d9f7
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/sliceLine.rst
@@ -0,0 +1,4 @@
+sliceLine
+=========
+
+.. autofunction:: systemds.operator.algorithm.sliceLine
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/sliceLineDebug.rst b/src/main/python/docs/source/api/operator/algorithms/sliceLineDebug.rst
new file mode 100644
index 0000000000..0f5a3f19cf
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/sliceLineDebug.rst
@@ -0,0 +1,4 @@
+sliceLineDebug
+==============
+
+.. autofunction:: systemds.operator.algorithm.sliceLineDebug
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/sliceLineExtract.rst b/src/main/python/docs/source/api/operator/algorithms/sliceLineExtract.rst
new file mode 100644
index 0000000000..94b0bbc011
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/sliceLineExtract.rst
@@ -0,0 +1,4 @@
+sliceLineExtract
+================
+
+.. autofunction:: systemds.operator.algorithm.sliceLineExtract
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/slicefinder.rst b/src/main/python/docs/source/api/operator/algorithms/slicefinder.rst
new file mode 100644
index 0000000000..85c7fced01
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/slicefinder.rst
@@ -0,0 +1,4 @@
+slicefinder
+===========
+
+.. autofunction:: systemds.operator.algorithm.slicefinder
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/smape.rst b/src/main/python/docs/source/api/operator/algorithms/smape.rst
new file mode 100644
index 0000000000..6aadbd9420
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/smape.rst
@@ -0,0 +1,4 @@
+smape
+=====
+
+.. autofunction:: systemds.operator.algorithm.smape
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/smote.rst b/src/main/python/docs/source/api/operator/algorithms/smote.rst
new file mode 100644
index 0000000000..729d9529d3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/smote.rst
@@ -0,0 +1,4 @@
+smote
+=====
+
+.. autofunction:: systemds.operator.algorithm.smote
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/softmax.rst b/src/main/python/docs/source/api/operator/algorithms/softmax.rst
new file mode 100644
index 0000000000..3d142077f9
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/softmax.rst
@@ -0,0 +1,4 @@
+softmax
+=======
+
+.. autofunction:: systemds.operator.algorithm.softmax
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/split.rst b/src/main/python/docs/source/api/operator/algorithms/split.rst
new file mode 100644
index 0000000000..0c46d92819
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/split.rst
@@ -0,0 +1,4 @@
+split
+=====
+
+.. autofunction:: systemds.operator.algorithm.split
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/splitBalanced.rst b/src/main/python/docs/source/api/operator/algorithms/splitBalanced.rst
new file mode 100644
index 0000000000..f9c6640a02
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/splitBalanced.rst
@@ -0,0 +1,4 @@
+splitBalanced
+=============
+
+.. autofunction:: systemds.operator.algorithm.splitBalanced
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/sqrtMatrix.rst b/src/main/python/docs/source/api/operator/algorithms/sqrtMatrix.rst
new file mode 100644
index 0000000000..f59bbb3b4a
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/sqrtMatrix.rst
@@ -0,0 +1,4 @@
+sqrtMatrix
+==========
+
+.. autofunction:: systemds.operator.algorithm.sqrtMatrix
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/stableMarriage.rst b/src/main/python/docs/source/api/operator/algorithms/stableMarriage.rst
new file mode 100644
index 0000000000..ddddbae2b2
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/stableMarriage.rst
@@ -0,0 +1,4 @@
+stableMarriage
+==============
+
+.. autofunction:: systemds.operator.algorithm.stableMarriage
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/statsNA.rst b/src/main/python/docs/source/api/operator/algorithms/statsNA.rst
new file mode 100644
index 0000000000..2272428487
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/statsNA.rst
@@ -0,0 +1,4 @@
+statsNA
+=======
+
+.. autofunction:: systemds.operator.algorithm.statsNA
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/steplm.rst b/src/main/python/docs/source/api/operator/algorithms/steplm.rst
new file mode 100644
index 0000000000..35cb47cff1
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/steplm.rst
@@ -0,0 +1,4 @@
+steplm
+======
+
+.. autofunction:: systemds.operator.algorithm.steplm
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/stratstats.rst b/src/main/python/docs/source/api/operator/algorithms/stratstats.rst
new file mode 100644
index 0000000000..65ec9dd1b4
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/stratstats.rst
@@ -0,0 +1,4 @@
+stratstats
+==========
+
+.. autofunction:: systemds.operator.algorithm.stratstats
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/symmetricDifference.rst b/src/main/python/docs/source/api/operator/algorithms/symmetricDifference.rst
new file mode 100644
index 0000000000..494e632383
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/symmetricDifference.rst
@@ -0,0 +1,4 @@
+symmetricDifference
+===================
+
+.. autofunction:: systemds.operator.algorithm.symmetricDifference
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/tSNE.rst b/src/main/python/docs/source/api/operator/algorithms/tSNE.rst
new file mode 100644
index 0000000000..1021a05219
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/tSNE.rst
@@ -0,0 +1,4 @@
+tSNE
+====
+
+.. autofunction:: systemds.operator.algorithm.tSNE
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/toOneHot.rst b/src/main/python/docs/source/api/operator/algorithms/toOneHot.rst
new file mode 100644
index 0000000000..8c220b3d86
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/toOneHot.rst
@@ -0,0 +1,4 @@
+toOneHot
+========
+
+.. autofunction:: systemds.operator.algorithm.toOneHot
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/tomeklink.rst b/src/main/python/docs/source/api/operator/algorithms/tomeklink.rst
new file mode 100644
index 0000000000..4fd0bd17f7
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/tomeklink.rst
@@ -0,0 +1,4 @@
+tomeklink
+=========
+
+.. autofunction:: systemds.operator.algorithm.tomeklink
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/topk_cleaning.rst b/src/main/python/docs/source/api/operator/algorithms/topk_cleaning.rst
new file mode 100644
index 0000000000..b57c24f3a4
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/topk_cleaning.rst
@@ -0,0 +1,4 @@
+topk_cleaning
+=============
+
+.. autofunction:: systemds.operator.algorithm.topk_cleaning
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/underSampling.rst b/src/main/python/docs/source/api/operator/algorithms/underSampling.rst
new file mode 100644
index 0000000000..0b7b146b0a
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/underSampling.rst
@@ -0,0 +1,4 @@
+underSampling
+=============
+
+.. autofunction:: systemds.operator.algorithm.underSampling
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/union.rst b/src/main/python/docs/source/api/operator/algorithms/union.rst
new file mode 100644
index 0000000000..24da31088f
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/union.rst
@@ -0,0 +1,4 @@
+union
+=====
+
+.. autofunction:: systemds.operator.algorithm.union
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/univar.rst b/src/main/python/docs/source/api/operator/algorithms/univar.rst
new file mode 100644
index 0000000000..c4df0e4e75
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/univar.rst
@@ -0,0 +1,4 @@
+univar
+======
+
+.. autofunction:: systemds.operator.algorithm.univar
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/vectorToCsv.rst b/src/main/python/docs/source/api/operator/algorithms/vectorToCsv.rst
new file mode 100644
index 0000000000..c1c9e2cbc0
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/vectorToCsv.rst
@@ -0,0 +1,4 @@
+vectorToCsv
+===========
+
+.. autofunction:: systemds.operator.algorithm.vectorToCsv
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/wer.rst b/src/main/python/docs/source/api/operator/algorithms/wer.rst
new file mode 100644
index 0000000000..9ea55cbd1f
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/wer.rst
@@ -0,0 +1,4 @@
+wer
+===
+
+.. autofunction:: systemds.operator.algorithm.wer
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/winsorize.rst b/src/main/python/docs/source/api/operator/algorithms/winsorize.rst
new file mode 100644
index 0000000000..43c20fbc65
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/winsorize.rst
@@ -0,0 +1,4 @@
+winsorize
+=========
+
+.. autofunction:: systemds.operator.algorithm.winsorize
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/winsorizeApply.rst b/src/main/python/docs/source/api/operator/algorithms/winsorizeApply.rst
new file mode 100644
index 0000000000..f4b3c9e983
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/winsorizeApply.rst
@@ -0,0 +1,4 @@
+winsorizeApply
+==============
+
+.. autofunction:: systemds.operator.algorithm.winsorizeApply
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/xdummy1.rst b/src/main/python/docs/source/api/operator/algorithms/xdummy1.rst
new file mode 100644
index 0000000000..20e4eed2b3
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/xdummy1.rst
@@ -0,0 +1,4 @@
+xdummy1
+=======
+
+.. autofunction:: systemds.operator.algorithm.xdummy1
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/xdummy2.rst b/src/main/python/docs/source/api/operator/algorithms/xdummy2.rst
new file mode 100644
index 0000000000..9254147e69
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/xdummy2.rst
@@ -0,0 +1,4 @@
+xdummy2
+=======
+
+.. autofunction:: systemds.operator.algorithm.xdummy2
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/xgboost.rst b/src/main/python/docs/source/api/operator/algorithms/xgboost.rst
new file mode 100644
index 0000000000..506771aa6d
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/xgboost.rst
@@ -0,0 +1,4 @@
+xgboost
+=======
+
+.. autofunction:: systemds.operator.algorithm.xgboost
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/xgboostPredictClassification.rst b/src/main/python/docs/source/api/operator/algorithms/xgboostPredictClassification.rst
new file mode 100644
index 0000000000..b65b35c8eb
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/xgboostPredictClassification.rst
@@ -0,0 +1,4 @@
+xgboostPredictClassification
+============================
+
+.. autofunction:: systemds.operator.algorithm.xgboostPredictClassification
\ No newline at end of file
diff --git a/src/main/python/docs/source/api/operator/algorithms/xgboostPredictRegression.rst b/src/main/python/docs/source/api/operator/algorithms/xgboostPredictRegression.rst
new file mode 100644
index 0000000000..1e33101190
--- /dev/null
+++ b/src/main/python/docs/source/api/operator/algorithms/xgboostPredictRegression.rst
@@ -0,0 +1,4 @@
+xgboostPredictRegression
+========================
+
+.. autofunction:: systemds.operator.algorithm.xgboostPredictRegression
\ No newline at end of file
diff --git a/src/main/python/generator/dml_parser.py b/src/main/python/generator/dml_parser.py
index 8e835e96a1..e9079b95d6 100644
--- a/src/main/python/generator/dml_parser.py
+++ b/src/main/python/generator/dml_parser.py
@@ -23,7 +23,7 @@
import json
import os
import re
-
+import textwrap
class FunctionParser(object):
header_input_pattern = r"^[ \t\n]*[#]+[ \t\n]*input[ \t\n\w:;.,#]*[\s#\-]*[#]+[\w\s\d:,.()\" \t\n\-]*[\s#\-]*$"
@@ -196,10 +196,30 @@ class FunctionParser(object):
input_parameters = self.parse_input_output_string(h_input)
output_parameters = self.parse_input_output_string(h_output)
+ with open(path, 'r') as f:
+ content = f.read()
+ pat = re.compile(
+ r"""
+ ^\#\s*\.\.\s*code-block::\s*python # .. code-block:: python
+ (.*?) # ← capture the actual example
+ (?= # stop just before
+ ^\#\s*(?:INPUT:| # → “# INPUT:” OR
+ \.\.\s*code-block::\s*python) # → another “# .. code-block:: python”
+ )
+ """,
+ re.MULTILINE | re.DOTALL | re.VERBOSE,
+ )
+ code_blocks = []
+ for match in pat.finditer(content):
+ raw_block = match.group(1)
+ code_lines = [line.lstrip("#") for line in raw_block.splitlines()] # Remove leading #
+ code_block = textwrap.dedent("\n".join([code_line for code_line in code_lines if code_line != ""]))
+ code_blocks.append(code_block)
data = {'description': description,
'parameters': input_parameters,
- 'return_values': output_parameters}
+ 'return_values': output_parameters,
+ 'code_blocks': code_blocks}
return data
def parse_input_output_string(self, data: str):
diff --git a/src/main/python/generator/generator.py b/src/main/python/generator/generator.py
index b124feff19..e321d8336c 100644
--- a/src/main/python/generator/generator.py
+++ b/src/main/python/generator/generator.py
@@ -35,6 +35,10 @@ class PythonAPIFileGenerator(object):
target_path = os.path.join(os.path.dirname(os.path.dirname(
__file__)), 'systemds', 'operator', 'algorithm', 'builtin')
+ test_path = os.path.join(os.path.dirname(os.path.dirname(
+ __file__)), 'tests', 'auto_tests')
+ rst_path = os.path.join(os.path.dirname(os.path.dirname(
+ __file__)), 'docs', 'source', 'api', 'operator', 'algorithms')
licence_path = os.path.join('resources', 'template_python_script_license')
template_path = os.path.join('resources', 'template_python_script_imports')
@@ -55,6 +59,8 @@ class PythonAPIFileGenerator(object):
self.extension = '.{extension}'.format(extension=extension)
os.makedirs(self.__class__.target_path, exist_ok=True)
+ os.makedirs(self.__class__.test_path, exist_ok=True)
+ os.makedirs(self.__class__.rst_path, exist_ok=True)
self.function_names = list()
for name in manually_added_algorithm_builtins:
# only add files which actually exist, to avoid breaking
@@ -89,13 +95,59 @@ class PythonAPIFileGenerator(object):
with open(target_file, "w") as new_script:
new_script.write(self.licence)
new_script.write(self.generated_by)
- new_script.write((self.generated_from + dml_file.replace("\\", "/") + "\n").replace(
- "../", "").replace("src/main/python/generator/", ""))
+ relative_path = os.path.relpath(dml_file, start=self.source_path)
+ new_script.write(f"{self.generated_from}scripts/builtin/{relative_path}\n")
new_script.write(self.imports)
new_script.write(file_content)
self.function_names.append(filename)
+ def generate_test_file(self, function_name: str, code_block: str = None):
+ """
+ Generates a test file for the given function
+ """
+ target_file = os.path.join(self.test_path, f"test_{function_name}") + self.extension
+ with open(target_file, "w") as test_script:
+ test_script.write(self.licence)
+ test_script.write(self.generated_by)
+ test_script.write("import unittest, contextlib, io\n")
+
+ test_script.write(f"class Test{function_name.upper()}(unittest.TestCase):\n")
+ test_script.write(f" def test_{function_name}(self):\n")
+ if code_block:
+ test_script.write(" # Example test case provided in python the code block\n")
+ test_script.write(" buf = io.StringIO()\n")
+ test_script.write(" with contextlib.redirect_stdout(buf):\n")
+
+ expected =""
+ for raw_line in code_block.splitlines(keepends=True): # keepends=True → ‘\n’ is preserved
+ stripped = raw_line.lstrip()
+ if stripped.startswith((">>>", "...")):
+ code_line = stripped[4:]
+ if code_line.strip():
+ test_script.write(f" {code_line}")
+ else:
+ test_script.write("\n")
+ else:
+ expected += raw_line
+ expected = expected.lstrip("\n")
+ test_script.write(f'\n expected="""{expected}"""\n')
+ test_script.write(f" self.assertEqual(buf.getvalue().strip(), expected)\n")
+
+ test_script.write("\nif __name__ == '__main__':\n")
+ test_script.write(" unittest.main()\n")
+
+ def generate_rst_file(self, function_name: str):
+ """
+ Generates an rst file for the given function
+ """
+ target_file = os.path.join(self.rst_path, f"{function_name}") + ".rst"
+ with open(target_file, "w") as rst_script:
+ # rst_script.write(self.licence)
+ rst_script.write(function_name + "\n")
+ rst_script.write("=" * len(function_name) + "\n\n")
+ rst_script.write(f".. autofunction:: systemds.operator.algorithm.{function_name}")
+
def generate_init_file(self):
with open(self.init_path, "w") as init_file:
init_file.write(self.licence)
@@ -390,6 +442,8 @@ if __name__ == "__main__":
try:
header_data = f_parser.parse_header(dml_file)
data = f_parser.parse_function(dml_file)
+ if not data:
+ continue
f_parser.check_parameters(header_data, data)
doc_generator.generate_documentation(header_data, data)
@@ -404,5 +458,22 @@ if __name__ == "__main__":
continue
file_generator.generate_file(
data["function_name"], script_content, dml_file)
+
+ # Generate test cases using the code blocks
+ test_examples = header_data.get("code_blocks", None)
+ if test_examples:
+ for i, test_example in enumerate(test_examples):
+ test_example_name = data["function_name"]
+ # Don't add test number if only one example
+ if len(test_examples) > 1:
+ test_example_name += f"_{i}"
+ file_generator.generate_test_file(test_example_name, test_example)
+ # TODO: dml test case files should also be created
+ else:
+ print(f"[INFO] Skipping python test case creation for '{data['function_name']}': No code example.")
+
+ # Generate rst file
+ file_generator.generate_rst_file(data["function_name"])
+
file_generator.function_names.sort()
file_generator.generate_init_file()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/dist.py b/src/main/python/systemds/operator/algorithm/builtin/dist.py
index 5f33d96bc2..c04f6fb1f4 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/dist.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/dist.py
@@ -32,6 +32,21 @@ def dist(X: Matrix):
"""
Returns Euclidean distance matrix (distances between N n-dimensional points)
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import dist
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... X = sds.from_numpy(np.array([[0], [3], [4]]))
+ ... out = dist(X).compute()
+ ... print(out)
+ [[0. 3. 4.]
+ [3. 0. 1.]
+ [4. 1. 0.]]
+
+
:param X: Matrix to calculate the distance inside
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py b/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
index 63a472716a..a7e93f13a1 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_brightness.py
@@ -34,9 +34,26 @@ def img_brightness(img_in: Matrix,
"""
The img_brightness-function is an image data augmentation function. It changes the brightness of the image.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_brightness
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 50, 100,
+ ... 150, 200 ]], dtype=np.float32)
+ ... )
+ ... result_img = img_brightness(img, 30.0, 150).compute()
+ ... print(result_img.reshape(2, 2))
+ [[ 80. 130.]
+ [150. 150.]]
- :param img_in: Input matrix/image
+
+
+
+ :param img_in: Input image as 2D matrix with top left corner at [1, 1]
:param value: The amount of brightness to be changed for the image
:param channel_max: Maximum value of the brightness of the image
:return: Output matrix/image
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_brightness_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_brightness_linearized.py
index a5b62012f5..c5c107526e 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_brightness_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_brightness_linearized.py
@@ -34,9 +34,26 @@ def img_brightness_linearized(img_in: Matrix,
"""
The img_brightness_linearized-function is an image data augmentation function. It changes the brightness of one or multiple images.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_brightness_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 50, 100,
+ ... 150, 200 ]], dtype=np.float32)
+ ... )
+ ... result_img = img_brightness_linearized(img, 30.0, 255).compute()
+ ... print(result_img.reshape(2, 2))
+ [[ 80. 130.]
+ [180. 230.]]
- :param img_in: Input matrix/image (can represent multiple images every row of the matrix represents a linearized image)
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param value: The amount of brightness to be changed for the image
:param channel_max: Maximum value of the brightness of the image
:return: Output matrix/images (every row of the matrix represents a linearized image)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_crop.py b/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
index f0432c7578..f5eed9a2ea 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_crop.py
@@ -36,9 +36,26 @@ def img_crop(img_in: Matrix,
"""
The img_crop-function is an image data augmentation function. It cuts out a subregion of an image.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_crop
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 50., 100., 150.],
+ ... [150., 200., 250.],
+ ... [250., 200., 200.]], dtype=np.float32)
+ ... )
+ ... result_img = img_crop(img, 1, 1, 1, 1).compute()
+ ... print(result_img)
+ [[200.]]
- :param img_in: Input matrix/image
+
+
+
+ :param img_in: Input image as 2D matrix with top left corner at [1, 1]
:param w: The width of the subregion required
:param h: The height of the subregion required
:param x_offset: The horizontal coordinate in the image to begin the crop operation
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_crop_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_crop_linearized.py
index 4321a8af0d..46fcf802f4 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_crop_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_crop_linearized.py
@@ -38,9 +38,26 @@ def img_crop_linearized(img_in: Matrix,
"""
The img_crop_linearized cuts out a rectangular section of multiple linearized images.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_crop_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 50., 100., 150.,
+ ... 150., 200., 250.,
+ ... 250., 200., 200. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_crop_linearized(img, 1, 1, 1, 1, 3, 3).compute()
+ ... print(result_img)
+ [[200.]]
- :param img_in: Linearized input images as 2D matrix
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param w: The width of the subregion required
:param h: The height of the subregion required
:param x_offset: The horizontal offset for the center of the crop region
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py b/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
index 93befbd736..110e91e9e9 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_cutout.py
@@ -38,6 +38,26 @@ def img_cutout(img_in: Matrix,
Image Cutout function replaces a rectangular section of an image with a constant value.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_cutout
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 50., 100., 150.],
+ ... [150., 200., 250.],
+ ... [250., 200., 200.]], dtype=np.float32)
+ ... )
+ ... result_img = img_cutout(img, 2, 2, 1, 1, 49.).compute()
+ ... print(result_img)
+ [[ 50. 100. 150.]
+ [150. 49. 250.]
+ [250. 200. 200.]]
+
+
+
:param img_in: Input image as 2D matrix with top left corner at [1, 1]
:param x: Column index of the top left corner of the rectangle (starting at 1)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_cutout_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_cutout_linearized.py
index 2dd0c52239..765885c663 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_cutout_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_cutout_linearized.py
@@ -39,9 +39,28 @@ def img_cutout_linearized(img_in: Matrix,
"""
Image Cutout function replaces a rectangular section of an image with a constant value.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_cutout_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 50., 100., 150.,
+ ... 150., 200., 250.,
+ ... 250., 200., 200. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_cutout_linearized(img, 2, 2, 1, 1, 25.0, 3, 3).compute()
+ ... print(result_img.reshape(3, 3))
+ [[ 50. 100. 150.]
+ [150. 25. 250.]
+ [250. 200. 200.]]
- :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1]
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param x: Column index of the top left corner of the rectangle (starting at 1)
:param y: Row index of the top left corner of the rectangle (starting at 1)
:param width: Width of the rectangle (must be positive)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py b/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
index a555f23708..32ad67c405 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
@@ -33,9 +33,28 @@ def img_invert(img_in: Matrix,
"""
This is an image data augmentation function. It inverts an image.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_invert
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 50., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... result_img = img_invert(img, 210.).compute()
+ ... print(result_img)
+ [[200. 190. 180.]
+ [170. 160. 150.]
+ [140. 130. 120.]]
- :param img_in: Input image
+
+
+
+ :param img_in: Input image as 2D matrix with top left corner at [1, 1]
:param max_value: The maximum value pixels can have
:return: Output image
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
index 2f66a0b8be..59e30a3c77 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
@@ -33,9 +33,28 @@ def img_invert_linearized(img_in: Matrix,
"""
This is an image data augmentation function. It inverts an image.It can handle one or multiple images
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_invert_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_invert_linearized(img, 200.).compute()
+ ... print(result_img.reshape(3, 3))
+ [[190. 180. 170.]
+ [160. 150. 140.]
+ [130. 120. 110.]]
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param max_value: The maximum value pixels can have
:return: Output images (every row of the matrix represents a linearized image)
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py b/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
index 285d25fbf2..94d95438fb 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_mirror.py
@@ -34,10 +34,29 @@ def img_mirror(img_in: Matrix,
This function is an image data augmentation function.
It flips an image on the X (horizontal) or Y (vertical) axis.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_mirror
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 50., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... result_img = img_mirror(img, False).compute()
+ ... print(result_img)
+ [[30. 20. 10.]
+ [60. 50. 40.]
+ [90. 80. 70.]]
- :param img_in: Input matrix/image
- :param max_value: The maximum value pixels can have
+
+
+
+ :param img_in: Input image as 2D matrix with top left corner at [1, 1]
+ :param horizontal_axis: Flip either in X or Y axis
:return: Flipped matrix/image
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_mirror_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_mirror_linearized.py
index 1c6ae58ad0..fdde6506c3 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_mirror_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_mirror_linearized.py
@@ -37,8 +37,54 @@ def img_mirror_linearized(img_matrix: Matrix,
the same time. Each row of the input and output matrix represents a linearized image/matrix
It flips an image on the X (horizontal) or Y (vertical) axis.
+ .. code-block:: python
- :param img_matrix: Input matrix/image (every row represents a linearized matrix/image)
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_mirror_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_mirror_linearized(img, True, 3, 3).compute()
+ ... print(result_img.reshape(3, 3))
+ [[70. 80. 90.]
+ [40. 50. 60.]
+ [10. 20. 30.]]
+
+
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_mirror_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... imgs = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ],
+ ... [ 70., 80., 90.,
+ ... 40., 50., 60.,
+ ... 10., 20., 30. ]], dtype=np.float32)
+ ... )
+ ... result_imgs = img_mirror_linearized(imgs, True, 3, 3).compute()
+ ... print(result_imgs[0].reshape(3, 3))
+ ... print(result_imgs[1].reshape(3, 3))
+ [[70. 80. 90.]
+ [40. 50. 60.]
+ [10. 20. 30.]]
+ [[10. 20. 30.]
+ [40. 50. 60.]
+ [70. 80. 90.]]
+
+
+
+
+ :param img_matrix: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param horizontal_axis: flip either in X or Y axis
:param original_rows: number of rows in the original 2-D images
:param original_cols: number of cols in the original 2-D images
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py b/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
index e314b0e7ca..ae1b367ded 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_posterize.py
@@ -34,10 +34,29 @@ def img_posterize(img_in: Matrix,
The Image Posterize function limits pixel values to 2^bits different values in the range [0, 255].
Assumes the input image can attain values in the range [0, 255].
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_posterize
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 255., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... result_img = img_posterize(img, 1).compute()
+ ... print(result_img)
+ [[ 0. 0. 0.]
+ [ 0. 128. 0.]
+ [ 0. 0. 0.]]
- :param img_in: Input image
- :param bits: The number of bits keep for the values.
+
+
+
+ :param img_in: Input image as 2D matrix with top left corner at [1, 1]
+ :param bits: The number of bits to keep for the values.
1 means black and white, 8 means every integer between 0 and 255.
:return: Output image
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_posterize_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_posterize_linearized.py
index 286ce0222d..508145943f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_posterize_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_posterize_linearized.py
@@ -34,10 +34,29 @@ def img_posterize_linearized(img_in: Matrix,
The Linearized Image Posterize function limits pixel values to 2^bits different values in the range [0, 255].
Assumes the input image can attain values in the range [0, 255].
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_posterize_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 255., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_posterize_linearized(img, 1).compute()
+ ... print(result_img.reshape(3, 3))
+ [[ 0. 0. 0.]
+ [ 0. 128. 0.]
+ [ 0. 0. 0.]]
- :param img_in: Row linearized input images as 2D matrix
- :param bits: The number of bits keep for the values.
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
+ :param bits: The number of bits to keep for the values.
1 means black and white, 8 means every integer between 0 and 255.
:return: Row linearized output images as 2D matrix
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py b/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
index b8ab1ec068..55f7f28864 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_rotate.py
@@ -35,6 +35,25 @@ def img_rotate(img_in: Matrix,
The Image Rotate function rotates the input image counter-clockwise around the center.
Uses nearest neighbor sampling.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_rotate
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 50., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... result_img = img_rotate(img, 3.14159, 255.).compute()
+ ... print(result_img)
+ [[90. 80. 70.]
+ [60. 50. 40.]
+ [30. 20. 10.]]
+
+
:param img_in: Input image as 2D matrix with top left corner at [1, 1]
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_rotate_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_rotate_linearized.py
index 94e7ecbff2..9b1c1725de 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_rotate_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_rotate_linearized.py
@@ -37,11 +37,32 @@ def img_rotate_linearized(img_in: Matrix,
The Linearized Image Rotate function rotates the linearized input images counter-clockwise around the center.
Uses nearest neighbor sampling.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_rotate_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_rotate_linearized(img, 3.14159, 255., 3, 3).compute()
+ ... print(result_img.reshape(3, 3))
+ [[90. 80. 70.]
+ [60. 50. 40.]
+ [30. 20. 10.]]
- :param img_in: Linearized input images as 2D matrix with top left corner at [1, 1]
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param radians: The value by which to rotate in radian.
:param fill_value: The background color revealed by the rotation
+ :param s_cols: Width of a single image
+ :param s_rows: Height of a single image
:return: Output images in linearized form as 2D matrix with top left corner at [1, 1]
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
index 892c524baf..c757d626bd 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing.py
@@ -34,10 +34,34 @@ def img_sample_pairing(img_in1: Matrix,
"""
The image sample pairing function blends two images together.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_sample_pairing
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img_in1 = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 50., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... img_in2 = sds.from_numpy(
+ ... np.array([[ 30., 40., 50.],
+ ... [ 60., 70., 80.],
+ ... [ 90., 100., 110.]], dtype=np.float32)
+ ... )
+ ... result_img = img_sample_pairing(img_in1, img_in2, 0.5).compute()
+ ... print(result_img)
+ [[ 20. 30. 40.]
+ [ 50. 60. 70.]
+ [ 80. 90. 100.]]
- :param img_in1: First input image
- :param img_in2: Second input image
+
+
+
+ :param img_in1: First input image as 2D matrix with top left corner at [1, 1]
+ :param img_in2: Second input image as 2D matrix with top left corner at [1, 1]
:param weight: The weight given to the second image.
0 means only img_in1, 1 means only img_in2 will be visible
:return: Output image
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing_linearized.py
index a7f08c74f4..4368e2ddc3 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_sample_pairing_linearized.py
@@ -34,9 +34,33 @@ def img_sample_pairing_linearized(img_in1: Matrix,
"""
The image sample pairing function blends two images together.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_sample_pairing_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img_in1 = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... img_in2 = sds.from_numpy(
+ ... np.array([[ 30., 40., 50.,
+ ... 60., 70., 80.,
+ ... 90., 100., 110. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_sample_pairing_linearized(img_in1, img_in2, 0.5).compute()
+ ... print(result_img.reshape(3, 3))
+ [[ 20. 30. 40.]
+ [ 50. 60. 70.]
+ [ 80. 90. 100.]]
- :param img_in1: input matrix/image (every row is a linearized image)
+
+
+
+ :param img_in1: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param img_in2: Second input image (one image represented as a single row linearized matrix)
:param weight: The weight given to the second image.
0 means only img_in1, 1 means only img_in2 will be visible
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_shear.py b/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
index 44ad9f6883..b9c6a22cab 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_shear.py
@@ -36,6 +36,25 @@ def img_shear(img_in: Matrix,
This function applies a shearing transformation to an image.
Uses nearest neighbor sampling.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_shear
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 50., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... result_img = img_shear(img, 1., 0., 255).compute()
+ ... print(result_img)
+ [[ 10. 20. 30.]
+ [255. 40. 50.]
+ [255. 255. 70.]]
+
+
:param img_in: Input image as 2D matrix with top left corner at [1, 1]
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_shear_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_shear_linearized.py
index a470c8a08c..96899e6d06 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_shear_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_shear_linearized.py
@@ -38,12 +38,33 @@ def img_shear_linearized(img_in: Matrix,
This function applies a shearing transformation to linearized images.
Uses nearest neighbor sampling.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_shear_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_shear_linearized(img, 1., 0., 0., 3, 3).compute()
+ ... print(result_img.reshape(3, 3))
+ [[10. 20. 30.]
+ [ 0. 40. 50.]
+ [ 0. 0. 70.]]
- :param img_in: Linearized input images as 2D matrix with top left corner at [1, 1]
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param shear_x: Shearing factor for horizontal shearing
:param shear_y: Shearing factor for vertical shearing
:param fill_value: The background color revealed by the shearing
+ :param s_cols: Width of a single image
+ :param s_rows: Height of a single image
:return: Output images in linearized form as 2D matrix with top left corner at [1, 1]
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_transform.py b/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
index 73095816bd..51a2468e1a 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_transform.py
@@ -43,6 +43,25 @@ def img_transform(img_in: Matrix,
Optionally resizes the image (without scaling).
Uses nearest neighbor sampling.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_transform
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 50., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... result_img = img_transform(img, 3, 3, -1., 0., 2., 0., 1., 0., 255.).compute()
+ ... print(result_img)
+ [[ 20. 10. 255.]
+ [ 50. 40. 255.]
+ [ 80. 70. 255.]]
+
+
:param img_in: Input image as 2D matrix with top left corner at [1, 1]
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_transform_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_transform_linearized.py
index 8020b22a54..fb706fc2f9 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_transform_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_transform_linearized.py
@@ -45,13 +45,34 @@ def img_transform_linearized(img_in: Matrix,
Optionally resizes the image (without scaling).
Uses nearest neighbor sampling.
+ .. code-block:: python
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_transform_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_transform_linearized(img, 3, 3, -1., 0., 2., 0., 1., 0., 255., 3, 3).compute()
+ ... print(result_img.reshape(3, 3))
+ [[ 20. 10. 255.]
+ [ 50. 40. 255.]
+ [ 80. 70. 255.]]
- :param img_in: Linearized input images as 2D matrix with top left corner at [1, 1]
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param out_w: Width of the output matrix
:param out_h: Height of the output matrix
:param a,b,c,d,e,f: The first two rows of the affine matrix in row-major order
:param fill_value: The background of an image
+ :param s_cols: Width of a single image
+ :param s_rows: Height of a single image
:return: Output images in linearized form as 2D matrix with top left corner at [1, 1]
"""
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_translate.py b/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
index 9cfc991ca5..e184bdbadf 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_translate.py
@@ -39,6 +39,25 @@ def img_translate(img_in: Matrix,
Optionally resizes the image (without scaling).
Uses nearest neighbor sampling.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_translate
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.],
+ ... [ 40., 50., 60.],
+ ... [ 70., 80., 90.]], dtype=np.float32)
+ ... )
+ ... result_img = img_translate(img, 1., 1., 3, 3, 255.).compute()
+ ... print(result_img)
+ [[255. 255. 255.]
+ [255. 10. 20.]
+ [255. 40. 50.]]
+
+
:param img_in: Input image as 2D matrix with top left corner at [1, 1]
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_translate_linearized.py b/src/main/python/systemds/operator/algorithm/builtin/img_translate_linearized.py
index 92098dab2c..9b3e2eab92 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_translate_linearized.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/img_translate_linearized.py
@@ -41,8 +41,28 @@ def img_translate_linearized(img_in: Matrix,
the same time. Each row of the input and output matrix represents a linearized image/matrix
It translates the image and Optionally resizes the image (without scaling).
+ .. code-block:: python
- :param img_in: Input matrix/image (every row represents a linearized matrix/image)
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import img_translate_linearized
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... img = sds.from_numpy(
+ ... np.array([[ 10., 20., 30.,
+ ... 40., 50., 60.,
+ ... 70., 80., 90. ]], dtype=np.float32)
+ ... )
+ ... result_img = img_translate_linearized(img, 1., 1., 3, 3, 255.0, 3, 3).compute()
+ ... print(result_img.reshape(3, 3))
+ [[255. 255. 255.]
+ [255. 10. 20.]
+ [255. 40. 50.]]
+
+
+
+
+ :param img_in: Input images as linearized 2D matrix with top left corner at [1, 1] (every row represents a linearized matrix/image)
:param offset_x: The distance to move the image in x direction
:param offset_y: The distance to move the image in y direction
:param out_w: Width of the output image
diff --git a/src/main/python/systemds/operator/algorithm/builtin/lm.py b/src/main/python/systemds/operator/algorithm/builtin/lm.py
index e67bbb366f..fa317fb22c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/lm.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/lm.py
@@ -36,6 +36,36 @@ def lm(X: Matrix,
method or the conjugate gradient algorithm depending on the input size
of the matrices (See lmDS-function and lmCG-function respectively).
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import lm
+ >>>
+ >>> np.random.seed(0)
+ >>> features = np.random.rand(10, 15)
+ >>> y = np.random.rand(10, 1)
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... weights = lm(sds.from_numpy(features), sds.from_numpy(y)).compute()
+ ... print(weights)
+ [[-0.11538199]
+ [-0.20386541]
+ [-0.39956034]
+ [ 1.04078623]
+ [ 0.43270839]
+ [ 0.18954599]
+ [ 0.49858969]
+ [-0.26812763]
+ [ 0.09961844]
+ [-0.57000751]
+ [-0.43386048]
+ [ 0.55358873]
+ [-0.54638565]
+ [ 0.2205885 ]
+ [ 0.37957689]]
+
+
:param X: Matrix of feature vectors.
diff --git a/src/main/python/systemds/operator/algorithm/builtin/normalize.py b/src/main/python/systemds/operator/algorithm/builtin/normalize.py
index 9353f75b8b..f4dd5bbd12 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/normalize.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/normalize.py
@@ -33,6 +33,20 @@ def normalize(X: Matrix):
Min-max normalization (a.k.a. min-max scaling) to range [0,1]. For matrices
of positive values, this normalization preserves the input sparsity.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import normalize
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... X = sds.from_numpy(np.array([[1, 2], [3, 4]]))
+ ... Y, cmin, cmax = normalize(X).compute()
+ ... print(Y)
+ [[0. 0.]
+ [1. 1.]]
+
+
:param X: Input feature matrix of shape n-by-m
diff --git a/src/main/python/systemds/operator/algorithm/builtin/randomForest.py b/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
index 177ebd3fd3..f100d28092 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/randomForest.py
@@ -60,6 +60,47 @@ def randomForest(X: Matrix,
prefixed by a one-hot vector of sampled features
(e.g., [1,1,1,0] if we sampled a,b,c of the four features)
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import randomForest, randomForestPredict
+ >>>
+ >>> # tiny toy dataset
+ >>> X = np.array([[1],
+ ... [2],
+ ... [10],
+ ... [11]], dtype=np.int64)
+ >>> y = np.array([[1],
+ ... [1],
+ ... [2],
+ ... [2]], dtype=np.int64)
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... X_sds = sds.from_numpy(X)
+ ... y_sds = sds.from_numpy(y)
+ ...
+ ... ctypes = sds.from_numpy(np.array([[1, 2]], dtype=np.int64))
+ ...
+ ... # train a 4-tree forest (no sampling)
+ ... M = randomForest(
+ ... X_sds, y_sds, ctypes,
+ ... num_trees = 4,
+ ... sample_frac = 1.0,
+ ... feature_frac = 1.0,
+ ... max_depth = 3,
+ ... min_leaf = 1,
+ ... min_split = 2,
+ ... seed = 42
+ ... )
+ ...
+ ... preds = randomForestPredict(X_sds, ctypes, M).compute()
+ ... print(preds)
+ [[1.]
+ [1.]
+ [2.]
+ [2.]]
+
diff --git a/src/main/python/systemds/operator/algorithm/builtin/randomForestPredict.py b/src/main/python/systemds/operator/algorithm/builtin/randomForestPredict.py
index bff00217e2..78dc1bda3f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/randomForestPredict.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/randomForestPredict.py
@@ -37,6 +37,49 @@ def randomForestPredict(X: Matrix,
categorical and numerical input features.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import randomForest, randomForestPredict
+ >>>
+ >>> # tiny toy dataset
+ >>> X = np.array([[1],
+ ... [2],
+ ... [10],
+ ... [11]], dtype=np.int64)
+ >>> y = np.array([[1],
+ ... [1],
+ ... [2],
+ ... [2]], dtype=np.int64)
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... X_sds = sds.from_numpy(X)
+ ... y_sds = sds.from_numpy(y)
+ ...
+ ... ctypes = sds.from_numpy(np.array([[1, 2]], dtype=np.int64))
+ ...
+ ... # train a 4-tree forest (no sampling)
+ ... M = randomForest(
+ ... X_sds, y_sds, ctypes,
+ ... num_trees = 4,
+ ... sample_frac = 1.0,
+ ... feature_frac = 1.0,
+ ... max_depth = 3,
+ ... min_leaf = 1,
+ ... min_split = 2,
+ ... seed = 42
+ ... )
+ ...
+ ... preds = randomForestPredict(X_sds, ctypes, M).compute()
+ ... print(preds)
+ [[1.]
+ [1.]
+ [2.]
+ [2.]]
+
+
+
:param X: Feature matrix in recoded/binned representation
:param y: Label matrix in recoded/binned representation,
diff --git a/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py b/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
index 0ad76ec5f7..436ed64df7 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
+++ b/src/main/python/systemds/operator/algorithm/builtin/toOneHot.py
@@ -33,6 +33,22 @@ def toOneHot(X: Matrix,
"""
The toOneHot-function encodes unordered categorical vector to multiple binary vectors.
+ .. code-block:: python
+
+ >>> import numpy as np
+ >>> from systemds.context import SystemDSContext
+ >>> from systemds.operator.algorithm import toOneHot
+ >>>
+ >>> with SystemDSContext() as sds:
+ ... X = sds.from_numpy(np.array([[1], [3], [2], [3]]))
+ ... Y = toOneHot(X, numClasses=3).compute()
+ ... print(Y)
+ [[1. 0. 0.]
+ [0. 0. 1.]
+ [0. 1. 0.]
+ [0. 0. 1.]]
+
+
:param X: Vector with N integer entries between 1 and numClasses
diff --git a/src/main/python/tests/algorithms/test_lm.py b/src/main/python/tests/algorithms/test_lm.py
deleted file mode 100644
index aad8abac66..0000000000
--- a/src/main/python/tests/algorithms/test_lm.py
+++ /dev/null
@@ -1,65 +0,0 @@
-# -------------------------------------------------------------
-#
-# 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.
-#
-# -------------------------------------------------------------
-
-import unittest
-
-import numpy as np
-from sklearn.linear_model import LinearRegression
-from systemds.context import SystemDSContext
-from systemds.operator.algorithm import lm
-
-np.random.seed(7)
-
-
-class TestLm(unittest.TestCase):
-
- sds: SystemDSContext = None
-
- @classmethod
- def setUpClass(cls):
- cls.sds = SystemDSContext()
-
- @classmethod
- def tearDownClass(cls):
- cls.sds.close()
-
- def test_lm_simple(self):
- # if the dimensions of the input is 1, then the
- X = np.random.rand(30, 1)
- Y = np.random.rand(30, 1)
- regressor = LinearRegression(fit_intercept=False)
- model = regressor.fit(X, Y).coef_
-
- X_sds = self.sds.from_numpy(X)
- Y_sds = self.sds.from_numpy(Y)
-
- sds_model_weights = lm(X_sds, Y_sds, verbose=False).compute()
- model = model.reshape(sds_model_weights.shape)
-
- eps = 1e-03
-
- self.assertTrue(
- np.allclose(sds_model_weights, model, eps), "All elements are not close"
- )
-
-
-if __name__ == "__main__":
- unittest.main(exit=False)
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py b/src/main/python/tests/auto_tests/test_dist.py
similarity index 57%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert.py
copy to src/main/python/tests/auto_tests/test_dist.py
index a555f23708..6a3e39f05d 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
+++ b/src/main/python/tests/auto_tests/test_dist.py
@@ -20,27 +20,25 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert.dml
+import unittest, contextlib, io
+class TestDIST(unittest.TestCase):
+ def test_dist(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import dist
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ X = sds.from_numpy(np.array([[0], [3], [4]]))
+ out = dist(X).compute()
+ print(out)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[0. 3. 4.]
+ [3. 0. 1.]
+ [4. 1. 0.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.
-
-
-
- :param img_in: Input image
- :param max_value: The maximum value pixels can have
- :return: Output image
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_brightness.py
similarity index 52%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_brightness.py
index 2f66a0b8be..f30545cd76 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_brightness.py
@@ -20,27 +20,27 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_BRIGHTNESS(unittest.TestCase):
+ def test_img_brightness(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_brightness
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 50, 100,
+ 150, 200 ]], dtype=np.float32)
+ )
+ result_img = img_brightness(img, 30.0, 150).compute()
+ print(result_img.reshape(2, 2))
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[ 80. 130.]
+ [150. 150.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_brightness_linearized.py
similarity index 51%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_brightness_linearized.py
index 2f66a0b8be..a82bab3153 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_brightness_linearized.py
@@ -20,27 +20,27 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_BRIGHTNESS_LINEARIZED(unittest.TestCase):
+ def test_img_brightness_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_brightness_linearized
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 50, 100,
+ 150, 200 ]], dtype=np.float32)
+ )
+ result_img = img_brightness_linearized(img, 30.0, 255).compute()
+ print(result_img.reshape(2, 2))
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[ 80. 130.]
+ [180. 230.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_crop.py
similarity index 52%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_crop.py
index 2f66a0b8be..ac94a9f833 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_crop.py
@@ -20,27 +20,27 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_CROP(unittest.TestCase):
+ def test_img_crop(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_crop
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 50., 100., 150.],
+ [150., 200., 250.],
+ [250., 200., 200.]], dtype=np.float32)
+ )
+ result_img = img_crop(img, 1, 1, 1, 1).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[200.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_crop_linearized.py
similarity index 50%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_crop_linearized.py
index 2f66a0b8be..ae22372188 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_crop_linearized.py
@@ -20,27 +20,27 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_CROP_LINEARIZED(unittest.TestCase):
+ def test_img_crop_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_crop_linearized
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 50., 100., 150.,
+ 150., 200., 250.,
+ 250., 200., 200. ]], dtype=np.float32)
+ )
+ result_img = img_crop_linearized(img, 1, 1, 1, 1, 3, 3).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[200.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_cutout.py
similarity index 50%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_cutout.py
index 2f66a0b8be..e66f0aed6f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_cutout.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_CUTOUT(unittest.TestCase):
+ def test_img_cutout(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_cutout
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 50., 100., 150.],
+ [150., 200., 250.],
+ [250., 200., 200.]], dtype=np.float32)
+ )
+ result_img = img_cutout(img, 2, 2, 1, 1, 49.).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[ 50. 100. 150.]
+ [150. 49. 250.]
+ [250. 200. 200.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_cutout_linearized.py b/src/main/python/tests/auto_tests/test_img_cutout_linearized.py
new file mode 100644
index 0000000000..f553b14039
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_cutout_linearized.py
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_CUTOUT_LINEARIZED(unittest.TestCase):
+ def test_img_cutout_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_cutout_linearized
+
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 50., 100., 150.,
+ 150., 200., 250.,
+ 250., 200., 200. ]], dtype=np.float32)
+ )
+ result_img = img_cutout_linearized(img, 2, 2, 1, 1, 25.0, 3, 3).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[ 50. 100. 150.]
+ [150. 25. 250.]
+ [250. 200. 200.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_invert.py
similarity index 51%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_invert.py
index 2f66a0b8be..a11ff19e99 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_invert.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_INVERT(unittest.TestCase):
+ def test_img_invert(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_invert
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 50., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ result_img = img_invert(img, 210.).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[200. 190. 180.]
+ [170. 160. 150.]
+ [140. 130. 120.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_invert_linearized.py
new file mode 100644
index 0000000000..65db0866c9
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_invert_linearized.py
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_INVERT_LINEARIZED(unittest.TestCase):
+ def test_img_invert_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_invert_linearized
+
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ result_img = img_invert_linearized(img, 200.).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[190. 180. 170.]
+ [160. 150. 140.]
+ [130. 120. 110.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_mirror.py
similarity index 51%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_mirror.py
index 2f66a0b8be..241635199c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_mirror.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_MIRROR(unittest.TestCase):
+ def test_img_mirror(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_mirror
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 50., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ result_img = img_mirror(img, False).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[30. 20. 10.]
+ [60. 50. 40.]
+ [90. 80. 70.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_mirror_linearized_0.py b/src/main/python/tests/auto_tests/test_img_mirror_linearized_0.py
new file mode 100644
index 0000000000..f5b8ba4733
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_mirror_linearized_0.py
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_MIRROR_LINEARIZED_0(unittest.TestCase):
+ def test_img_mirror_linearized_0(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_mirror_linearized
+
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ result_img = img_mirror_linearized(img, True, 3, 3).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[70. 80. 90.]
+ [40. 50. 60.]
+ [10. 20. 30.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_mirror_linearized_1.py b/src/main/python/tests/auto_tests/test_img_mirror_linearized_1.py
new file mode 100644
index 0000000000..a9884ab19e
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_mirror_linearized_1.py
@@ -0,0 +1,55 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_MIRROR_LINEARIZED_1(unittest.TestCase):
+ def test_img_mirror_linearized_1(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_mirror_linearized
+
+ with SystemDSContext() as sds:
+ imgs = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ],
+ [ 70., 80., 90.,
+ 40., 50., 60.,
+ 10., 20., 30. ]], dtype=np.float32)
+ )
+ result_imgs = img_mirror_linearized(imgs, True, 3, 3).compute()
+ print(result_imgs[0].reshape(3, 3))
+ print(result_imgs[1].reshape(3, 3))
+
+ expected="""[[70. 80. 90.]
+ [40. 50. 60.]
+ [10. 20. 30.]]
+[[10. 20. 30.]
+ [40. 50. 60.]
+ [70. 80. 90.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_posterize.py
similarity index 50%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_posterize.py
index 2f66a0b8be..d0f1cd7b6c 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_posterize.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_POSTERIZE(unittest.TestCase):
+ def test_img_posterize(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_posterize
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 255., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ result_img = img_posterize(img, 1).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[ 0. 0. 0.]
+ [ 0. 128. 0.]
+ [ 0. 0. 0.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_posterize_linearized.py
similarity index 51%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_posterize_linearized.py
index 2f66a0b8be..fb2605998f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_posterize_linearized.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_POSTERIZE_LINEARIZED(unittest.TestCase):
+ def test_img_posterize_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_posterize_linearized
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 255., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ result_img = img_posterize_linearized(img, 1).compute()
+ print(result_img.reshape(3, 3))
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[ 0. 0. 0.]
+ [ 0. 128. 0.]
+ [ 0. 0. 0.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_rotate.py
similarity index 51%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_rotate.py
index 2f66a0b8be..ed7e8bcc43 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_rotate.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_ROTATE(unittest.TestCase):
+ def test_img_rotate(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_rotate
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 50., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ result_img = img_rotate(img, 3.14159, 255.).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[90. 80. 70.]
+ [60. 50. 40.]
+ [30. 20. 10.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_rotate_linearized.py b/src/main/python/tests/auto_tests/test_img_rotate_linearized.py
new file mode 100644
index 0000000000..1f2d7ba1f6
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_rotate_linearized.py
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_ROTATE_LINEARIZED(unittest.TestCase):
+ def test_img_rotate_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_rotate_linearized
+
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ result_img = img_rotate_linearized(img, 3.14159, 255., 3, 3).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[90. 80. 70.]
+ [60. 50. 40.]
+ [30. 20. 10.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_sample_pairing.py b/src/main/python/tests/auto_tests/test_img_sample_pairing.py
new file mode 100644
index 0000000000..87c50493c4
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_sample_pairing.py
@@ -0,0 +1,53 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_SAMPLE_PAIRING(unittest.TestCase):
+ def test_img_sample_pairing(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_sample_pairing
+
+ with SystemDSContext() as sds:
+ img_in1 = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 50., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ img_in2 = sds.from_numpy(
+ np.array([[ 30., 40., 50.],
+ [ 60., 70., 80.],
+ [ 90., 100., 110.]], dtype=np.float32)
+ )
+ result_img = img_sample_pairing(img_in1, img_in2, 0.5).compute()
+ print(result_img)
+
+ expected="""[[ 20. 30. 40.]
+ [ 50. 60. 70.]
+ [ 80. 90. 100.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_sample_pairing_linearized.py b/src/main/python/tests/auto_tests/test_img_sample_pairing_linearized.py
new file mode 100644
index 0000000000..5b550735e3
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_sample_pairing_linearized.py
@@ -0,0 +1,53 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_SAMPLE_PAIRING_LINEARIZED(unittest.TestCase):
+ def test_img_sample_pairing_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_sample_pairing_linearized
+
+ with SystemDSContext() as sds:
+ img_in1 = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ img_in2 = sds.from_numpy(
+ np.array([[ 30., 40., 50.,
+ 60., 70., 80.,
+ 90., 100., 110. ]], dtype=np.float32)
+ )
+ result_img = img_sample_pairing_linearized(img_in1, img_in2, 0.5).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[ 20. 30. 40.]
+ [ 50. 60. 70.]
+ [ 80. 90. 100.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_shear.py
similarity index 51%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_shear.py
index 2f66a0b8be..5571e9d3cb 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_shear.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_SHEAR(unittest.TestCase):
+ def test_img_shear(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_shear
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 50., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ result_img = img_shear(img, 1., 0., 255).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[ 10. 20. 30.]
+ [255. 40. 50.]
+ [255. 255. 70.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_shear_linearized.py b/src/main/python/tests/auto_tests/test_img_shear_linearized.py
new file mode 100644
index 0000000000..d8963beaeb
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_shear_linearized.py
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_SHEAR_LINEARIZED(unittest.TestCase):
+ def test_img_shear_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_shear_linearized
+
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ result_img = img_shear_linearized(img, 1., 0., 0., 3, 3).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[10. 20. 30.]
+ [ 0. 40. 50.]
+ [ 0. 0. 70.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_transform.py
similarity index 50%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_transform.py
index 2f66a0b8be..f1a91bc6d8 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_transform.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_TRANSFORM(unittest.TestCase):
+ def test_img_transform(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_transform
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 50., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ result_img = img_transform(img, 3, 3, -1., 0., 2., 0., 1., 0., 255.).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[ 20. 10. 255.]
+ [ 50. 40. 255.]
+ [ 80. 70. 255.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_transform_linearized.py b/src/main/python/tests/auto_tests/test_img_transform_linearized.py
new file mode 100644
index 0000000000..6992968486
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_transform_linearized.py
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_TRANSFORM_LINEARIZED(unittest.TestCase):
+ def test_img_transform_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_transform_linearized
+
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ result_img = img_transform_linearized(img, 3, 3, -1., 0., 2., 0., 1., 0., 255., 3, 3).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[ 20. 10. 255.]
+ [ 50. 40. 255.]
+ [ 80. 70. 255.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py b/src/main/python/tests/auto_tests/test_img_translate.py
similarity index 50%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
copy to src/main/python/tests/auto_tests/test_img_translate.py
index 2f66a0b8be..22f63e25f4 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert_linearized.py
+++ b/src/main/python/tests/auto_tests/test_img_translate.py
@@ -20,27 +20,29 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert_linearized.dml
+import unittest, contextlib, io
+class TestIMG_TRANSLATE(unittest.TestCase):
+ def test_img_translate(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_translate
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.],
+ [ 40., 50., 60.],
+ [ 70., 80., 90.]], dtype=np.float32)
+ )
+ result_img = img_translate(img, 1., 1., 3, 3, 255.).compute()
+ print(result_img)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[255. 255. 255.]
+ [255. 10. 20.]
+ [255. 40. 50.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert_linearized(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.It can handle one or multiple images
-
-
-
- :param img_in: Input matrix/image (every row of the matrix represents a linearized image)
- :param max_value: The maximum value pixels can have
- :return: Output images (every row of the matrix represents a linearized image)
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert_linearized',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_img_translate_linearized.py b/src/main/python/tests/auto_tests/test_img_translate_linearized.py
new file mode 100644
index 0000000000..86c894b1c5
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_img_translate_linearized.py
@@ -0,0 +1,48 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestIMG_TRANSLATE_LINEARIZED(unittest.TestCase):
+ def test_img_translate_linearized(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import img_translate_linearized
+
+ with SystemDSContext() as sds:
+ img = sds.from_numpy(
+ np.array([[ 10., 20., 30.,
+ 40., 50., 60.,
+ 70., 80., 90. ]], dtype=np.float32)
+ )
+ result_img = img_translate_linearized(img, 1., 1., 3, 3, 255.0, 3, 3).compute()
+ print(result_img.reshape(3, 3))
+
+ expected="""[[255. 255. 255.]
+ [255. 10. 20.]
+ [255. 40. 50.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_lm.py b/src/main/python/tests/auto_tests/test_lm.py
new file mode 100644
index 0000000000..5c4e83bc8b
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_lm.py
@@ -0,0 +1,59 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestLM(unittest.TestCase):
+ def test_lm(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import lm
+
+ np.random.seed(0)
+ features = np.random.rand(10, 15)
+ y = np.random.rand(10, 1)
+
+ with SystemDSContext() as sds:
+ weights = lm(sds.from_numpy(features), sds.from_numpy(y)).compute()
+ print(weights)
+
+ expected="""[[-0.11538199]
+ [-0.20386541]
+ [-0.39956034]
+ [ 1.04078623]
+ [ 0.43270839]
+ [ 0.18954599]
+ [ 0.49858969]
+ [-0.26812763]
+ [ 0.09961844]
+ [-0.57000751]
+ [-0.43386048]
+ [ 0.55358873]
+ [-0.54638565]
+ [ 0.2205885 ]
+ [ 0.37957689]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py b/src/main/python/tests/auto_tests/test_normalize.py
similarity index 57%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert.py
copy to src/main/python/tests/auto_tests/test_normalize.py
index a555f23708..8d6e910a42 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
+++ b/src/main/python/tests/auto_tests/test_normalize.py
@@ -20,27 +20,24 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert.dml
+import unittest, contextlib, io
+class TestNORMALIZE(unittest.TestCase):
+ def test_normalize(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import normalize
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ X = sds.from_numpy(np.array([[1, 2], [3, 4]]))
+ Y, cmin, cmax = normalize(X).compute()
+ print(Y)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[0. 0.]
+ [1. 1.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.
-
-
-
- :param img_in: Input image
- :param max_value: The maximum value pixels can have
- :return: Output image
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_randomForest.py b/src/main/python/tests/auto_tests/test_randomForest.py
new file mode 100644
index 0000000000..917e6524d3
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_randomForest.py
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestRANDOMFOREST(unittest.TestCase):
+ def test_randomForest(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import randomForest, randomForestPredict
+
+ # tiny toy dataset
+ X = np.array([[1],
+ [2],
+ [10],
+ [11]], dtype=np.int64)
+ y = np.array([[1],
+ [1],
+ [2],
+ [2]], dtype=np.int64)
+
+ with SystemDSContext() as sds:
+ X_sds = sds.from_numpy(X)
+ y_sds = sds.from_numpy(y)
+
+ ctypes = sds.from_numpy(np.array([[1, 2]], dtype=np.int64))
+
+ # train a 4-tree forest (no sampling)
+ M = randomForest(
+ X_sds, y_sds, ctypes,
+ num_trees = 4,
+ sample_frac = 1.0,
+ feature_frac = 1.0,
+ max_depth = 3,
+ min_leaf = 1,
+ min_split = 2,
+ seed = 42
+ )
+
+ preds = randomForestPredict(X_sds, ctypes, M).compute()
+ print(preds)
+
+ expected="""[[1.]
+ [1.]
+ [2.]
+ [2.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/tests/auto_tests/test_randomForestPredict.py b/src/main/python/tests/auto_tests/test_randomForestPredict.py
new file mode 100644
index 0000000000..48b8e06bdf
--- /dev/null
+++ b/src/main/python/tests/auto_tests/test_randomForestPredict.py
@@ -0,0 +1,71 @@
+# -------------------------------------------------------------
+#
+# 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
+import unittest, contextlib, io
+class TestRANDOMFORESTPREDICT(unittest.TestCase):
+ def test_randomForestPredict(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import randomForest, randomForestPredict
+
+ # tiny toy dataset
+ X = np.array([[1],
+ [2],
+ [10],
+ [11]], dtype=np.int64)
+ y = np.array([[1],
+ [1],
+ [2],
+ [2]], dtype=np.int64)
+
+ with SystemDSContext() as sds:
+ X_sds = sds.from_numpy(X)
+ y_sds = sds.from_numpy(y)
+
+ ctypes = sds.from_numpy(np.array([[1, 2]], dtype=np.int64))
+
+ # train a 4-tree forest (no sampling)
+ M = randomForest(
+ X_sds, y_sds, ctypes,
+ num_trees = 4,
+ sample_frac = 1.0,
+ feature_frac = 1.0,
+ max_depth = 3,
+ min_leaf = 1,
+ min_split = 2,
+ seed = 42
+ )
+
+ preds = randomForestPredict(X_sds, ctypes, M).compute()
+ print(preds)
+
+ expected="""[[1.]
+ [1.]
+ [2.]
+ [2.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py b/src/main/python/tests/auto_tests/test_toOneHot.py
similarity index 56%
copy from src/main/python/systemds/operator/algorithm/builtin/img_invert.py
copy to src/main/python/tests/auto_tests/test_toOneHot.py
index a555f23708..4d6b15e79f 100644
--- a/src/main/python/systemds/operator/algorithm/builtin/img_invert.py
+++ b/src/main/python/tests/auto_tests/test_toOneHot.py
@@ -20,27 +20,26 @@
# -------------------------------------------------------------
# Autogenerated By : src/main/python/generator/generator.py
-# Autogenerated From : scripts/builtin/img_invert.dml
+import unittest, contextlib, io
+class TestTOONEHOT(unittest.TestCase):
+ def test_toOneHot(self):
+ # Example test case provided in python the code block
+ buf = io.StringIO()
+ with contextlib.redirect_stdout(buf):
+ import numpy as np
+ from systemds.context import SystemDSContext
+ from systemds.operator.algorithm import toOneHot
-from typing import Dict, Iterable
+ with SystemDSContext() as sds:
+ X = sds.from_numpy(np.array([[1], [3], [2], [3]]))
+ Y = toOneHot(X, numClasses=3).compute()
+ print(Y)
-from systemds.operator import OperationNode, Matrix, Frame, List, MultiReturn, Scalar
-from systemds.utils.consts import VALID_INPUT_TYPES
+ expected="""[[1. 0. 0.]
+ [0. 0. 1.]
+ [0. 1. 0.]
+ [0. 0. 1.]]"""
+ self.assertEqual(buf.getvalue().strip(), expected)
-
-def img_invert(img_in: Matrix,
- max_value: float):
- """
- This is an image data augmentation function. It inverts an image.
-
-
-
- :param img_in: Input image
- :param max_value: The maximum value pixels can have
- :return: Output image
- """
-
- params_dict = {'img_in': img_in, 'max_value': max_value}
- return Matrix(img_in.sds_context,
- 'img_invert',
- named_input_nodes=params_dict)
+if __name__ == '__main__':
+ unittest.main()