Upgrade to Pro — share decks privately, control downloads, hide ads and more …

不動産webサービスを強くする機械学習の使い方

hiddy
July 29, 2016

 不動産webサービスを強くする機械学習の使い方

2016/07/28(木) 19:30〜
【不動産テック勉強会#1】人工知能時代に備えて不動産関連データについて色々語らう勉強会
※画像や物件名などについてはマスクしております。ご了承下さい。

hiddy

July 29, 2016
Tweet

Other Decks in Technology

Transcript

  1. One-class svm library(kernlab) # make data to one-class svm model

    DF <- data.frame(DF, class=1) outlier.svm <- ksvm(x=class ~bukken_shubetsu +struct +struct_all +madori +history_TOTAL +log_price_with_kanrihi, data=DF, type="one-svc",C=1000,scaled=TRUE,nu=0.01, kernel="rbfdot") #judge outlier DF$outlier <- predict(outlier.svm, DF, type = "response") ෺݅छผ ݐஙλΠϓ ઐ༗໘ੵ ؒऔΓ ங೥਺ ؅ཧඅࠐΈՈ௞ʢର਺Խʣ
  2. Boro detection svm library(kernlab) boro.svm <- ksvm( boro~bukken_shubetsu +struct +struct_all

    +madori_num +madori_type_num +history_TOTAL +log_price_with_kanrihi, data=DF, C=1.584893, scaled=TRUE,nu=0.01, kernel="rbfdot",kpar=list(sigma=10),cross=13)  ಛघ෺݅ΛਓྗͰ݅ఔ౓ऩू  ಛघ෺݅Ͱ͸ͳ͍΋ͷΛ݅நग़  47.ʹͯɺʮಛघ෺݅൑ఆثʯΛੜ੒ ෺݅छผ ݐஙλΠϓ ઐ༗໘ੵ ؒऔΓ ؒऔΓλΠϓ ؅ཧඅࠐΈՈ௞ʢର਺Խʣ ங೥਺ http://d.hatena.ne.jp/sleepy_yoshi/20120624/p1 Λνϡʔχϯάͷࢀߟʹ͠·ͨ͠
  3. 3ͷSBOHFSQBDLBHFͳΒ QSPCBCJMJUZ͕ग़ྗՄೳ install.packages('Rcpp') install.packages('ranger') # make CV model CV.ranger <-

    ranger(formula = CV ~ walk_time1+struct+struct_all +level3+direction+madori_num+madori_type_num+price_with_kanrihi +history_TOTAL+station1+bukken_shubetsu+gyosha_no, data = DFtrain, num.trees=300, write.forest =TRUE, probability =TRUE, always.split.variables= "station1") # prediction of CV model cv.predict <- predict(CVmodel,DF) # draw probabilities cv.predict$predictions[,2]
  4. H2O Deeplearning library(h2o) # Deep learningͰֶशͤ͞Δ localH2O <- h2o.init(ip =

    "localhost", port = 54321, startH2O = TRUE, nthreads=-1) res.dl <- h2o.deeplearning(x = 2:10001, y = 1, training_frame = as.h2o(target), activation = "TanhWithDropout", hidden=rep(160,5), epochs = 20) pred.dl <- h2o.predict(object=res.dl, newdata = as.h2o(target)) pred <- as.data.frame(pred.dl) # ਖ਼ղ཰Λ֬ೝ print(1-sum(abs(round(pred[,1]) - target[,1]))/length(target[,1]))  ࿨ࣜτΠϨը૾ΛਓྗͰ݅ఔ౓ऩू  ը૾αΠζΛἧ͑ͯɺάϨʔεέʔϧʹม׵  %FFQMFBSOJOHͰ࿨ࣜτΠϨ൑ఆثΛ࡞੒