Slide 60
Slide 60 text
どう使うの?
Configuration conf
= new ConfigurationBuilder().host("127.0.0.1").port(9199).build();
Classifier classifier = new Classifier(conf, "name");
// 訓練データを用いて多値分類のモデルを更新する
classifier.newFeatures()
.label("male")
.add("hair", "short")
.add("bottom", "jeans")
.add("height", 1.70)
.train();
// 更新したモデルを使って多値分類する
ClassificationResult res = classifier.newFeatures()
.add("hair", "short")
.add("bottom", "jeans")
.add("height", 1.70)
.classify();
// 多値分類結果のうち、最大のスコアとなったラベルを取得する
String estimatedLabel = res.maximumScoredLabel();