首页 > 解决方案 > 如何使用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> 

标签: phpneural-network

解决方案


使用 PHP 我认为这是不可能的,但在 TensorFlow 中使用一些框架或其他语言(如 python)是可能的,我建议分类数据可以正常工作而不是神经网络,因为通过分类,您可以使用创建的数据集对表单数据进行分类并预测您的数据表单使用有资格的献血者的数据集。创建您自己的符合条件的献血者数据集,按照您的 40 个问题表进行分类,从而使您的项目成为可能。我提供了一些开始的链接。祝你好运。

https://scikit-learn.org/
https://www.tensorflow.org/tutorials/keras/text_classification_with_hub


推荐阅读