php - 如何使用php语言实现人工神经网络
问题描述
我目前正在开发一个系统来检查献血的资格。用户需要在这个系统中回答一些问题。捐赠者资格的结果是基于他们在这个系统中的回答。如何使用 PHP 语言实现神经网络来确定献血的资格?
这些是我系统的简单代码。我将问题减少到五(5)。我开发的原版有40个问题。非常感谢您的回复。感谢,并有一个愉快的一天
<?php
if(isset($_POST['submit'])){
}
?>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<form method="post">
<table>
<tr>
<th>1.</th>
<td>Are you healthy today?</td>
<td><input type="radio" name="q1" value="1">Yes</td>
<td><input type="radio" name="q1" value="0">No</td>
</tr>
<tr>
<th>2.</th>
<td>Do you have any contagious disease?</td>
<td><input type="radio" name="q2" value="1">Yes</td>
<td><input type="radio" name="q2" value="0">No</td>
</tr>
<tr>
<th>3.</th>
<td>Have you donate blood before?</td>
<td><input type="radio" name="q3" value="1">Yes</td>
<td><input type="radio" name="q3" value="0">No</td>
</tr>
<tr>
<th>4.</th>
<td>Is there any of your family members have contagious disease?</td>
<td><input type="radio" name="q4" value="1">Yes</td>
<td><input type="radio" name="q4" value="0">No</td>
</tr>
<tr>
<th>5.</th>
<td>Have you have sex before?</td>
<td><input type="radio" name="q4" value="1">Yes</td>
<td><input type="radio" name="q4" value="0">No</td>
</tr>
</table>
<button type="submit" name="submit">Submit answer</button>
</form>
</body>
</html>
解决方案
使用 PHP 我认为这是不可能的,但在 TensorFlow 中使用一些框架或其他语言(如 python)是可能的,我建议分类数据可以正常工作而不是神经网络,因为通过分类,您可以使用创建的数据集对表单数据进行分类并预测您的数据表单使用有资格的献血者的数据集。创建您自己的符合条件的献血者数据集,按照您的 40 个问题表进行分类,从而使您的项目成为可能。我提供了一些开始的链接。祝你好运。
https://scikit-learn.org/
https://www.tensorflow.org/tutorials/keras/text_classification_with_hub
推荐阅读
- apache-kafka - 无法重新分配 kafka 主题分区
- vue.js - 使用 CRUD 操作在数据表中进行 Vuetify 外部分页
- c++ - 如何让 __m256i AVX 容器覆盖 8 位整数数组?
- visual-studio-code - 我在视图中看不到集成终端选项,只有终端显示。如何在我的 Visual Studio 代码上获得集成终端?
- excel - 使用 VBA 复制和粘贴大量单元格
- python - 似乎无法遍历本网站页面中的所有数据 - Python、Selenium 和 BeautifulSoup
- firebase - 我可以评论 firebase.json 文件吗?
- ruby-on-rails - Rails——&= 是做什么的?
- java - 如何降低 SmartMaterialSpinner 的高度?
- react-native - 本机动画模块不支持属性“rotateZ”