zoukankan      html  css  js  c++  java
  • LogisticRegression_demo

    from numpy import loadtxt,where
    from pylab import scatter,show,legend,xlabel,ylabel
    
    #read the data
    data = loadtxt('F:/书籍/第03阶段-算法基础提高篇-3-BAT机器学习回归神经网络-21课(10G,2016年8月更新)/(05)回归分析与工程应用/课件和数据及代码/data1.txt',delimiter=',')
    
    X=data[:,0:2]
    y=data[:,2]
    
    pos=where(y==1)
    neg=where(y==0)
    scatter(X[pos,0],X[pos,1],marker='o',c='b')
    scatter(X[neg,0],X[neg,1],marker='x',c='r')
    xlabel('Feature1/Exam 1 score')
    ylabel('Feature2/Exam 2 score')
    legend(['Fail','Pass'])
    show()
    

  • 相关阅读:
    Google glass GDK
    Google glass GDK
    Google glass GDK
    趣味开发
    Android
    Google glass GDK
    Google glass GDK
    Google glass GDK
    Android
    Google glass GDK
  • 原文地址:https://www.cnblogs.com/hugeng007/p/9501952.html
Copyright © 2011-2022 走看看