あなたのデータセットを使用して、非常に単純なモデルを作成しました。これを行うために、R で Rattle ライブラリを使用しました。
入力データ
rgbh1 - number of bins in RGB histogram, which value > @param@, in my case @param@ = 30 (340 is maximum value)
rgbh2 - number of bins in RGB histogram, which value > 0 (not empty)
hsvh1 - number of bins in HSV histogram, which value > @param@, in my case @param@ = 30 (340 is maximum value)
hsvh2 - number of bins in HSV histogram, which value > 0 (not empty)
countours - number of contours on image
PicFlag - flag indicating picture/photo (picture = 1, photo = 0)
データ探索
データをよりよく理解するために、写真/写真グループごとの個々の変数の分布のプロットを次に示します (y 軸にパーセンテージがあります)。

予測力を持つ変数があることを明確に示しています。それらのほとんどは、私たちのモデルで使用できます。次に、単純な散布図マトリックスを作成して、変数の組み合わせが役立つかどうかを確認しました。

たとえば、countour の数と rgbh1 の組み合わせが有望に見えることがわかります。
次のグラフでは、変数間にも非常に強い相関関係があることがわかります。(一般的に、相関変数の数は限られていますが、相関の低い変数を多く持つことを好みます)。円グラフは相関の大きさを示します。完全な円は 1 を意味し、空の円は 0 を意味します。私の意見では、相関が .4 を超える場合、モデルに両方の変数を含めることはお勧めできません)。

モデル
次に、デシジョン ツリー、ランダム フォレスト、ロジスティック回帰、およびニューラル ネットワークを使用して、簡単なモデルを作成しました (Rattle のデフォルトを維持)。入力として、データを 60/20/20 に分割して使用しました (トレーニング、検証、テスト データセット)。これが私の結果です (エラー マトリックスがわからない場合は、Google を参照してください)。
Error matrix for the Decision Tree model on pics.csv [validate] (counts):
Predicted
Actual 0 1
0 167 22
1 6 204
Error matrix for the Decision Tree model on pics.csv [validate] (%):
Predicted
Actual 0 1
0 42 6
1 2 51
Overall error: 0.07017544
Rattle timestamp: 2013-01-02 11:35:40
======================================================================
Error matrix for the Random Forest model on pics.csv [validate] (counts):
Predicted
Actual 0 1
0 170 19
1 8 202
Error matrix for the Random Forest model on pics.csv [validate] (%):
Predicted
Actual 0 1
0 43 5
1 2 51
Overall error: 0.06766917
Rattle timestamp: 2013-01-02 11:35:40
======================================================================
Error matrix for the Linear model on pics.csv [validate] (counts):
Predicted
Actual 0 1
0 171 18
1 13 197
Error matrix for the Linear model on pics.csv [validate] (%):
Predicted
Actual 0 1
0 43 5
1 3 49
Overall error: 0.07769424
Rattle timestamp: 2013-01-02 11:35:40
======================================================================
Error matrix for the Neural Net model on pics.csv [validate] (counts):
Predicted
Actual 0 1
0 169 20
1 15 195
Error matrix for the Neural Net model on pics.csv [validate] (%):
Predicted
Actual 0 1
0 42 5
1 4 49
Overall error: 0.0877193
Rattle timestamp: 2013-01-02 11:35:40
======================================================================
結果
ご覧のとおり、全体的なエラー率は 6.5% から 8% の間で変動します。使用するメソッドのパラメーターを調整することで、この結果が大幅に改善されるとは思いません。全体的なエラー率を下げる方法は 2 つあります。
- 相関関係のない変数を追加します (通常、モデリング データセットには 100 以上の入力変数があり、最終モデルには +/- 5 ~ 10 があります)。
- さらにデータを追加します (オーバーフィッティングに怯えることなくモデルを調整できます)
使用ソフトウェア:
コーグラムと散布図の作成に使用されるコード (他の出力は Rattle GUI を使用して生成されました):
# install.packages("lattice",dependencies=TRUE)
# install.packages("car")
library(lattice)
library(car)
setwd("C:/")
indata <- read.csv2("pics.csv")
str(indata)
# Corrgram
corrgram(indata, order=TRUE, lower.panel=panel.shade,
upper.panel=panel.pie, text.panel=panel.txt,
main="Picture/Photo correlation matrix")
# Scatterplot Matrices
attach(indata)
scatterplotMatrix(~rgbh1+rgbh2+hsvh1+hsvh2+countours|PicFlag,main="Picture/Photo scatterplot matrix",
diagonal=c("histogram"),legend.plot=TRUE,pch=c(1,1))