登录
首页 » Others » 基于tensorflow的二分类的python实现(注释超详细!)

基于tensorflow的二分类的python实现(注释超详细!)

于 2020-07-03 发布
0 254
下载积分: 1 下载次数: 3

代码说明:

使用tensorflow实现的神经网络二分类,数据集为糖尿病化验数据,其中前八列为特征,第九列为期望结果,准准确率81.75%,内有详细的代码注解,适合新手学习使用

下载说明:请别用迅雷下载,失败请重下,重下不扣分!

发表评论

0 个回复

  • 稀疏自码深度学习的Matlab实现
    稀疏自编码深度学习的Matlab实现,sparse Auto coding,Matlab codetrain, m/7% CS294A/CS294W Programming Assignment Starter CodeInstructions%%%This file contains code that helps you get started ontheprogramming assignment. You will need to complete thecode in sampleIMAgEsml sparseAutoencoder Cost m and computeNumericalGradientml For the purpose of completing the assignment, you domot need tochange the code in this filecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencodtrain.m∥%%========%6% STEP 0: Here we provide the relevant parameters valuesthat willl allow your sparse autoencoder to get good filters; youdo not need to9 change the parameters belowvisibleSize =8*8; number of input unitshiddensize 25number of hidden unitssparsity Param =0.01; desired average activation ofthe hidden units7 (This was denoted by the greek alpharho, which looks like a lower-case pcurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod4/57train.,m∥in the lecture notes)1 ambda=0.0001%o weight decay parameterbeta 3%o weight of sparsity penalty term%%==:79 STEP 1: Implement sampleIMAGESAfter implementing sampleIMAGES, the display_networkcommand shouldfo display a random sample of 200 patches from the datasetpatches sampleIMAgES;display_network(patches(:, randi(size(patches, 2), 204, 1)), 8)%为产生一个204维的列向量,每一维的值为0~10000curer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod5/57train.m/v%中的随机数,说明是随机取204个 patch来显示%o Obtain random parameters thetatheta= initializeParameters ( hiddenSize, visibleSize)%%=============三三三三====================================97 STEP 2: Implement sparseAutoencoder CostYou can implement all of the components (squared errorcost, weight decay termsparsity penalty) in the cost function at once, butit may be easier to do%o it step-by-step and run gradient checking (see STEP3 after each stepWecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod6/57train. m vb suggest implementing the sparseAutoencoder Cost functionusing the following steps(a) Implement forward propagation in your neural networland implement the%squared error term of the cost function. Implementbackpropagation tocompute the derivatives. Then (using lambda=beta=(run gradient Checking%to verify that the calculations corresponding tothe squared error costterm are correctcurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod7/57train. m vl(b) Add in the weight decay term (in both the cost funcand the derivativecalculations), then re-run Gradient Checking toverify correctnessl (c) Add in the sparsity penalty term, then re-run gradiChecking toverify correctnessFeel free to change the training settings when debuggingyour%o code. (For example, reducing the training set sizecurer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod8/57train m vl/number of hidden units may make your code run fasterand setting betaand/or lambda to zero may be helpful for debuggingHowever, in yourfinal submission of the visualized weights, please useparameters web gave in Step 0 abovecoS七grad]sparseAutoencoderCost(theta, visibleSize,hiddensize, lambda,sparsityParam, beta,patches)二〓二二二二二二二〓二〓二〓二〓=二====〓=curer:YiBinYUyuyibintony@163.com,WuYiUniversityning, MATLAB Code for Sparse Autoencod9/57train.m vlll96% STeP 3: Gradient CheckingHint: If you are debugging your code, performing gradienchecking on smaller modelsand smaller training sets (e. g, using only 10 trainingexamples and 1-2 hiddenunits) may speed things upl First, lets make sure your numerical gradient computationis correct for a%o simple function. After you have implemented computeNumerun the followingcheckNumericalGradientocurer:YiBinYUyuyibintony@163.com,WuYiUniversityDeep Learning, MATLAB Code for Sparse Autoencode10/57
    2020-12-05下载
    积分:1
  • ,数字式电压,电流,功率测量电网数据集合在起便于数据的分析,而且内有MODBUS-RTU与上位机直接数据通讯
    ,数字式电压,电流,功率测量电网数据集合在一起便于数据的分析,而且内有MODBUS-RTU与上位机直接数据通讯
    2020-12-01下载
    积分:1
  • 节点导纳矩阵
    以前的一个作业,用matlab编写节点导纳矩阵
    2020-12-03下载
    积分:1
  • 网络协议及套接字科普PPT
    网络协议TCP/IP科普介绍、套接字简介,共22页
    2020-11-29下载
    积分:1
  • 相机标定 Tsai方法
    【实例简介】相机标定,tsai方法源码,做pets的可能会需要,我也是没钱才共享,不好意思,分多的给点
    2021-11-18 00:32:44下载
    积分:1
  • 多种图像边缘检测与分割处理(matlab实现)
    多种边缘检测算子(Prewitt算子,LoG算子,Canny算子等)实现图像的边缘检测与分割
    2020-11-30下载
    积分:1
  • 用四阶统计量方法对图像特征进行提取的MATLAB仿真
    用四阶统计量方法对图像特征进行提取,进行分析,所用的是MATLAB仿真,仿真的程序和结果都有!
    2020-12-09下载
    积分:1
  • 湖南大学操作系统实验报告
    湖大操作系统实验报告,附源代码,一共五个实验,中断处理, 银行家算法,CPU调度, 页面置换算法, 生产者消费者算法,
    2020-12-09下载
    积分:1
  • 基于Simulink的匹配滤波器设计
    通信课程设计作业,有演示PPT、设计报告和程序。
    2020-11-27下载
    积分:1
  • 学生管理系统图形化界面Qt版
    学生管理系统,包含录入学生,删除学生,显示信息等功能,是图形化界面的版本,利用C++和 Qt的库开发。
    2020-12-07下载
    积分:1
  • 696518资源总数
  • 105885会员总数
  • 31今日下载