Baunsgaard commented on a change in pull request #1191:
URL: https://github.com/apache/systemds/pull/1191#discussion_r584155069



##########
File path: scripts/builtin/cspline.dml
##########
@@ -0,0 +1,63 @@
+#-------------------------------------------------------------
+#
+# 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.
+#
+#-------------------------------------------------------------
+#
+# THIS SCRIPT SOLVES CUBIC SPLINE INTERPOLATION
+#
+# INPUT PARAMETERS:
+# 
--------------------------------------------------------------------------------------------
+# NAME  TYPE           DEFAULT   MEANING
+# 
--------------------------------------------------------------------------------------------
+# X     Matrix[Double]  ---      1-column matrix of x values knots
+# Y     Matrix[Double]  ---      1-column matrix of corresponding y values 
knots
+# inp_x Double          ---      the given input x, for which the cspline will 
find predicted y.
+# Log   String          " "      Location to store iteration-specific 
variables for monitoring and debugging purposes
+#
+# tol   Double          0.000001 Tolerance (epsilon); conjugate graduent 
procedure terminates early if
+#                                L2 norm of the beta-residual is less than 
tolerance * its initial norm
+# maxi  Int             0        Maximum number of conjugate gradient 
iterations, 0 = no maximum
+# 
--------------------------------------------------------------------------------------------
+# OUTPUT: 
+# pred_Y Matrix[Double] ---      Predicted value
+# K      Matrix[Double] ---      Matrix of k parameters

Review comment:
       i am assuming that a new predict function would take a new X dataset and 
the content of K, and be able to make a new pred_y on unseen data.
   I we would need Y to make a prediction, then it would be the same as saying 
give me a dataset and "what is in it (labels)", and i will tell you "what is in 
it".
   
   again this is a task that is only bonus if possible.
   for inspiration take a look at "pca.dml" and "pcaPredict.dml, there pca is 
used to "train" parameters, and pcaPredict is used on unseen data.
   




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to