Open
Conversation
j143
commented
May 3, 2025
heart_attack_systemds.py
Outdated
| y_test_sds = sds.from_numpy(y_test_full + 1.0) | ||
| ctypes_sds = sds.from_numpy(ctypes) | ||
| dt_model = decisionTree(X_train_sds, y_train_sds, ctypes_sds, icpt=1, max_depth=5) | ||
| dt_pred = decisionTreePredict(X_test_sds, dt_model).compute() |
Owner
Author
There was a problem hiding this comment.
[ERROR] Could not find 'None' in 'dropped' column for logistic regression accuracy. Using 0.0 as fallback.
25/05/03 05:13:05 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Traceback (most recent call last):
File "/workspaces/heart-attack-analysis/heart_attack_systemds.py", line 234, in
dt_pred = decisionTreePredict(X_test_sds, dt_model).compute()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: decisionTreePredict() missing 1 required positional argument: 'M'
j143
commented
May 3, 2025
heart_attack_systemds.py
Outdated
| ctypes_sds = sds.from_numpy(ctypes) | ||
| dt_model = decisionTree(X_train_sds, y_train_sds, ctypes_sds, icpt=1, max_depth=5) | ||
| dt_pred = decisionTreePredict(X_test_sds, dt_model).compute() | ||
| dt_pred = decisionTreePredict(X_test_sds, dt_model, X_train_sds).compute() |
Owner
Author
There was a problem hiding this comment.
[ERROR] Could not find 'None' in 'dropped' column for logistic regression accuracy. Using 0.0 as fallback.
25/05/03 05:15:50 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
Traceback (most recent call last):
File "/workspaces/heart-attack-analysis/heart_attack_systemds.py", line 234, in <module>
dt_pred = decisionTreePredict(X_test_sds, dt_model, X_train_sds).compute()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python/3.12.1/lib/python3.12/site-packages/systemds/operator/nodes/matrix.py", line 108, in compute
return super().compute(verbose, lineage)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python/3.12.1/lib/python3.12/site-packages/systemds/operator/operation_node.py", line 108, in compute
result_variables = self._script.execute()
^^^^^^^^^^^^^^^^^^^^^^
File "/usr/local/python/3.12.1/lib/python3.12/site-packages/systemds/script_building/script.py", line 100, in execute
self.sds_context.exception_and_close(exception_str, trace_back_limit)
File "/usr/local/python/3.12.1/lib/python3.12/site-packages/systemds/context/systemds_context.py", line 143, in exception_and_close
raise RuntimeError(message)
RuntimeError:
An error occurred while calling o1.prepareScript.
: org.apache.sysds.api.DMLException: org.apache.sysds.parser.LanguageException: ERROR: [line 5:0] -> V4=decisionTree(X=V1,y=V2,ctypes=V3,icpt=1,max_depth=5); -- Named function call parameter 'icpt' does not exist in signature of function 'm_decisionTree'. Function signature: [X, y, ctypes, max_depth, min_leaf, min_split, max_features, max_values, max_dataratio, impurity, seed, verbose]
at org.apache.sysds.api.jmlc.Connection.prepareScript(Connection.java:284)
at org.apache.sysds.api.jmlc.Connection.prepareScript(Connection.java:223)
at org.apache.sysds.api.jmlc.Connection.prepareScript(Connection.java:210)
at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
at java.base/java.lang.reflect.Method.invoke(Method.java:580)
at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:244)
at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:357)
at py4j.Gateway.invoke(Gateway.java:282)
at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:132)
at py4j.commands.CallCommand.execute(CallCommand.java:79)
at py4j.GatewayConnection.run(GatewayConnection.java:238)
at java.base/java.lang.Thread.run(Thread.java:1583)
Caused by: org.apache.sysds.parser.LanguageException: ERROR: [line 5:0] -> V4=decisionTree(X=V1,y=V2,ctypes=V3,icpt=1,max_depth=5); -- Named function call parameter 'icpt' does not exist in signature of function 'm_decisionTree'. Function signature: [X, y, ctypes, max_depth, min_leaf, min_split, max_features, max_values, max_dataratio, impurity, seed, verbose]
at org.apache.sysds.parser.Expression.raiseValidateError(Expression.java:395)
at org.apache.sysds.parser.Expression.raiseValidateError(Expression.java:362)
at org.apache.sysds.parser.FunctionCallIdentifier.validateExpression(FunctionCallIdentifier.java:162)
at org.apache.sysds.parser.StatementBlock.validateAssignmentStatement(StatementBlock.java:933)
at org.apache.sysds.parser.StatementBlock.validate(StatementBlock.java:881)
at org.apache.sysds.parser.DMLTranslator.validateParseTree(DMLTranslator.java:135)
at org.apache.sysds.parser.DMLTranslator.validateParseTree(DMLTranslator.java:110)
at org.apache.sysds.api.jmlc.Connection.prepareScript(Connection.java:261)
... 11 more
Closes #5.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
decisionTree
and
decisionTreePredict