4 zmx2029

尚未进行身份认证

暂无相关描述

等级
博文 221
排名 2w+

GraphLossoCV & affinity_propagation

'''fromsklearnimportdatasets,model_selection,svm,decomposition,pipeline,metricsimportmatplotlib.pyplotaspltlfw_people=datasets.fetch_lfw_people(min_faces_per_person=70,resize=.4)n_...

2019-06-14 16:38:55

pipelining in sklearn

importnumpyfromsklearnimportlinear_model,decomposition,pipeline,model_selection,datasetspca=decomposition.PCA()logistic=linear_model.SGDClassifier('log')pipe=pipeline.Pipeline([('p...

2019-06-12 18:08:54

model selection in sklean

cross_val_scoreimportnumpyfromsklearnimportsvm,model_selection,datasetsdigit=datasets.load_digits()x=digit.datay=digit.targetcs=numpy.logspace(-10,0,11)mean_scores=[]std_...

2019-06-12 16:32:38

PCA vs ICA

PCAimportnumpyfromsklearnimportdecompositionx1=numpy.random.normal(size=100)x2=numpy.random.normal(size=100)x3=x1+x2x=numpy.c_[x1,x2,x3]#pca=decomposition.PCA()#pca.fit(x...

2019-06-10 23:32:01

feature agglomeration

fromsklearnimportcluster,datasetsfromsklearn.feature_extraction.imageimportgrid_to_graphdigit=datasets.load_digits()images=digit.imagesx=images.reshape((len(images),-1))agg=clus...

2019-06-10 23:14:57

vector quantization

fromscipyimportmiscfromsklearnimportclusterimportnumpyface=misc.face(gray=True)x=face.reshape((-1,1))kmeans=cluster.KMeans(n_clusters=5)kmeans.fit(x)labels=kmeans.labels_value...

2019-06-10 23:04:07

kmeans

fromsklearnimportcluster,datasetsiris=datasets.load_iris()x=iris.data[:,:4]y=iris.targetkmeans=cluster.KMeans(n_clusters=3)kmeans.fit(x,y)y_=kmeans.predict(x)print(y[::10])pr...

2019-06-10 21:55:39

KNN vs Logistic Regression vs SVM

importnumpyfromsklearnimportsvm,linear_model,neighbors,datasetsimporttimedefpredict():digit=datasets.load_digits()x=digit.data/digit.data.max()y=digit.targetn...

2019-06-10 14:09:15

Native Bayes Find Ham Mail

importnumpyimportrandomdefget_vac_list(data):vac_list=[]forvindata:forvvinv:iflen(vv)>2:vac_list.append(vv)returnlist(set(v...

2019-06-07 18:43:20

[install gcc6.1.0]error: Unable to find a suitable type for HOST_WIDE_INT

unsetLIBRARY_PATHCPATHC_INCLUDE_PATHPKG_CONFIG_PATHCPLUS_INCLUDE_PATHINCLUDE

2019-04-27 14:01:16

Installing gcc 6.1 on centos 7

yuminstalllibmpc-develmpfr-develgmp-devel yuminstallzlib-devel* cd~/Downloads curlftp://ftp.gnu.org/pub/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.bz2-O tarxvfjgcc-6.1.0.tar.bz2 cdgcc-6.1.0 ./c...

2019-04-26 15:42:53

golang simple test

190416.gopackage_90416import"errors"funcDivision(a,bfloat64)(float64,error){ ifb==0{ return0,errors.New("cannotbedividedby0") } returna/b,nil}190416_test.gopacka...

2019-04-17 17:10:17

Golang Read And Write Etcd

packagemainimport( "go.etcd.io/etcd/clientv3" "fmt" "time" "context" "encoding/json")typeSecInfoConfstruct{ ProductIdint StartTimeint EndTimeint Statusint Totalint Leftint...

2019-04-12 18:31:30

Words 20190411

susceptible[sə'septəb(ə)l]adj.敏感bemoresusceptibletohackersahackerdrainsPoloniexinactualityintensive[ɪn'tensɪv]adj.加强asecurity-intensivebusinessbynomeans决不bynomeanspe...

2019-04-11 21:55:13

go-ethereum Verify User

packagemainimport( ethereum_crypto"github.com/ethereum/go-ethereum/crypto" "fmt" "crypto/ecdsa" )funcmain(){ privateKey,err:=ethereum_crypto.HexToECDSA("47fcf73dd2b80cfb78630bd593bd...

2019-04-08 16:52:10

go-ethereum Create Wallet

packagemainimport( ethereum_crypto"github.com/ethereum/go-ethereum/crypto" "fmt" "github.com/ethereum/go-ethereum/common/hexutil" "crypto/ecdsa")funcmain(){ privateKey,err:=ethereu...

2019-04-08 16:46:28

Golang UDP C/S Communication

Serverpackagemainimport( "net" "fmt")funcmain(){ sAddr,err:=net.ResolveUDPAddr("udp",":6666") iferr!=nil{ fmt.Print(err) return } server,err:=net.ListenUDP("udp",sA...

2019-03-27 21:54:21

no such file or directory, scandir '/Users/zmx/190202/node_modules/node-sass/vendor'

npmrebuildnode-sass 

2019-02-08 15:05:46

ipfs CORS config

ipfsconfigjsonAPI.HTTPHeaders.Access-Control-Allow-Methods'["PUT","GET","POST","OPTIONS"]'ipfsconfigjsonAPI.HTTPHeaders.Access-Control-Allow-Origin'["*"]'ipfsconfigjsonAPI.HTTPHeaders.Acces...

2019-02-03 16:24:17

npm install:EACCES: permission denied

npminstall-gxx--unsafe-perm--allow-root 

2019-01-27 14:43:16
奖章
  • 持之以恒
    持之以恒
    授予每个自然月内发布4篇或4篇以上原创或翻译IT博文的用户。不积跬步无以至千里,不积小流无以成江海,程序人生的精彩需要坚持不懈地积累!
  • 勤写标兵Lv1
    勤写标兵Lv1
    授予每个自然周发布1篇到3篇原创IT博文的用户。本勋章将于次周上午根据用户上周的博文发布情况由系统自动颁发。