使用决策树进行疾病预测 [英] Disease Prediction using Decisional Trees

查看:257
本文介绍了使用决策树进行疾病预测的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我根据使用决策树的症状进行了癌症预测,但我无法运行我的代码


请帮助我!在此先感谢!!!

I have made cancer prediction based on symptoms using decision trees but i am not able to run my code

Please Help ME!! Thanks in Advance!!!

展开 | 选择 | Wrap | 行号

推荐答案

你有没有理由使用C ++但是试图用C编写代码?

您应该使用C ++字符串对象,类和映射容器。这避免了所有树代码。


如果你用C语言编写,那么使用C #includes和scanf / printf函数。


如果继续使用,请使用调试器逐步执行代码。


C ++可能看起来像:
Is there a reason you are using C++ but are attempting to code in C ?

You should be using be using C++ string objects, classes and a map container. That avoids all of the tree code.

If you are writing in C then use the C #includes and the scanf/printf functions.

If you continue your way, then use your debugger to step through the code.

C++ might kind of look like:
展开 | 选择 | Wrap < span class =codeDivider> | 行号


谢谢!


我正在做的是将两者结合起来以简化程序。


我发现我的循环没有正确结束..如果你能看到,并提供关于遍历或搜索部分的输入/纠正。


如果你有时间..请尝试运行我的代码然后你可以看到我面临的错误


谢谢!!
Thank You!

What i am doing is to incorporate both of them for the simplicity of the program.

I have found that my loop is not ending properly.. If you could please see that and give your input/rectification about the traversal or the search part.

If you have time..Please try running my code then you can see the error i am facing

Thank You!!


你提到运行时问题。您是否收到任何编译器警告?


第113行检查症状字段是否为NULL,但症状是char数组而不是char指针。我很惊讶你没有收到编译器警告。同样适用于第133行的其他NULL测试。


您能用文字描述search()函数背后的意图吗?变量名lchild和rchild建议使用二叉树;但是arr数组看起来不像树。
You mention run-time problems. Are you getting any compiler warnings?

Line 113 checks if the symptom field is NULL, but symptom is a char array not a char pointer. I''m surprised you didn''t get a compiler warning for this. Likewise for other NULL test on line 133.

Can you describe in words the intent behind your search() function? Variable names lchild and rchild suggest a binary tree; but the arr array does not look a tree.


这篇关于使用决策树进行疾病预测的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆