Skip to content

Commit cc9f8d9

Browse files
committed
Ampute header error fix
1 parent 2807194 commit cc9f8d9

File tree

5 files changed

+24
-7
lines changed

5 files changed

+24
-7
lines changed

scripts/builtin/ampute.dml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@
3030
# mech a string [either "MAR", "MNAR", or "MCAR"] specifying the missingness mechanism. Chosen "MAR" and "MNAR" settings will be overridden if a non-default weight matrix is specified
3131
# weights a weight matrix [shape: k-by-m], containing weights that will be used to calculate the weighted sum scores. Will be overridden if mech == "MCAR"
3232
# seed a manually defined seed for reproducible RNG
33-
3433
# -------------------------------------------------------------------------------------
3534
#
3635
# OUTPUT:

scripts/builtin/cooccurrenceMatrix.dml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,16 @@
1818
# under the License.
1919
#
2020
#-------------------------------------------------------------
21-
#
22-
# The implementation is based on
23-
# https://github.com/stanfordnlp/GloVe/blob/master/src/cooccur.c
24-
#
25-
#-------------------------------------------------------------
2621

2722
## Cleans and processes text data by removing punctuation, converting it to lowercase, and reformatting.
28-
## Adds an index column to the result.
23+
## Adds an index column to the result. The implementation is based on
24+
# https://github.com/stanfordnlp/GloVe/blob/master/src/cooccur.c
25+
#
2926
# INPUT:
3027
# ------------------------------------------------------------------------------
3128
# S (Frame[Unknown]): 1D input data frame containing text data.
3229
# ------------------------------------------------------------------------------
30+
#
3331
# OUTPUT:
3432
# ------------------------------------------------------------------------------
3533
# result (Frame[Unknown]): Processed text data with an index column.

scripts/builtin/differenceStatistics.dml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,11 @@
2828
# X First Matrix to compare
2929
# Y Second Matrix to compare
3030
# --------------------------------------------------------------------------------
31+
#
32+
# OUTPUT:
33+
# -------------------------------------------------------------------------------------
34+
# stats. Difference statistics
35+
# -------------------------------------------------------------------------------------
3136

3237
m_differenceStatistics = function(Matrix[Double] X, Matrix[Double] Y) {
3338

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

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,16 @@ def ampute(X: Matrix,
3333
"""
3434
This function injects missing values into a multivariate a given dataset, similarly to the ampute() method in R's MICE package.
3535
36+
37+
38+
:param X: a multivariate numeric dataset [shape: n-by-m]
39+
:param prop: a number in the (0, 1] range specifying the proportion of amputed rows across the entire dataset
40+
:param patterns: a pattern matrix of 0's and 1's [shape: k-by-m] where each row corresponds to a pattern. 0 indicates that a variable should have missing values and 1 indicating that a variable should remain complete
41+
:param freq: a vector [length: k] containing the relative frequency with which each pattern in the patterns matrix should occur
42+
:param mech: a string [either "MAR", "MNAR", or "MCAR"] specifying the missingness mechanism. Chosen "MAR" and "MNAR" settings will be overridden if a non-default weight matrix is specified
43+
:param weights: a weight matrix [shape: k-by-m], containing weights that will be used to calculate the weighted sum scores. Will be overridden if mech == "MCAR"
44+
:param seed: a manually defined seed for reproducible RNG
45+
:return: amputed output dataset
3646
"""
3747

3848
params_dict = {'X': X}

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

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ def differenceStatistics(X: Matrix,
3535
they are different. This can be used for instance in comparison of lossy
3636
compression techniques, that reduce the fidelity of the data.
3737
38+
39+
40+
:param X: First Matrix to compare
41+
:param Y: Second Matrix to compare
42+
:return: Difference statistics
3843
"""
3944

4045
params_dict = {'X': X, 'Y': Y}

0 commit comments

Comments
 (0)