From ccfa38ba4d3689f3fbf4ee4a1ed7e23d5c27dd18 Mon Sep 17 00:00:00 2001 From: Arkadiusz Kondas Date: Tue, 10 May 2016 23:44:28 +0200 Subject: [PATCH] wine and glass demo dataset docs --- README.md | 2 + docs/index.md | 2 + docs/machine-learning/datasets/demo/glass.md | 42 +++++++++++++++++++ docs/machine-learning/datasets/demo/iris.md | 2 + docs/machine-learning/datasets/demo/wine.md | 35 ++++++++++++++++ .../imputation-missing-values.md | 1 + .../preprocessing/normalization.md | 1 + 7 files changed, 85 insertions(+) create mode 100644 docs/machine-learning/datasets/demo/glass.md create mode 100644 docs/machine-learning/datasets/demo/wine.md diff --git a/README.md b/README.md index dc65c09..da95839 100644 --- a/README.md +++ b/README.md @@ -57,6 +57,8 @@ composer require php-ai/php-ml * [CSV](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/csv-dataset) * Ready to use: * [Iris](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/demo/iris/) + * [Wine](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/demo/wine/) + * [Glass](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/demo/glass/) * Math * [Distance](http://php-ml.readthedocs.io/en/latest/math/distance/) * [Matrix](http://php-ml.readthedocs.io/en/latest/math/matrix/) diff --git a/docs/index.md b/docs/index.md index dc65c09..da95839 100644 --- a/docs/index.md +++ b/docs/index.md @@ -57,6 +57,8 @@ composer require php-ai/php-ml * [CSV](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/csv-dataset) * Ready to use: * [Iris](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/demo/iris/) + * [Wine](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/demo/wine/) + * [Glass](http://php-ml.readthedocs.io/en/latest/machine-learning/datasets/demo/glass/) * Math * [Distance](http://php-ml.readthedocs.io/en/latest/math/distance/) * [Matrix](http://php-ml.readthedocs.io/en/latest/math/matrix/) diff --git a/docs/machine-learning/datasets/demo/glass.md b/docs/machine-learning/datasets/demo/glass.md new file mode 100644 index 0000000..1ad84d3 --- /dev/null +++ b/docs/machine-learning/datasets/demo/glass.md @@ -0,0 +1,42 @@ +# Glass Dataset + +From USA Forensic Science Service; 6 types of glass; defined in terms of their oxide content (i.e. Na, Fe, K, etc) + +### Specification + +| Classes | 6 | +| Samples total | 214 | +| Features per sample | 9 | + +Samples per class: + * 70 float processed building windows + * 17 float processed vehicle windows + * 76 non-float processed building windows + * 13 containers + * 9 tableware + * 29 headlamps + +### Load + +To load Glass dataset simple use: + +``` +use Phpml\Dataset\Demo\Glass; + +$dataset = new Glass(); +``` + +### Several samples example + +``` +RI: refractive index,Na: Sodium,Mg: Magnesium,Al: Aluminum,Si: Silicon,K: Potassium,Ca: Calcium,Ba: Barium,Fe: Iron,type of glass +1.52101,13.64,4.49,1.10,71.78,0.06,8.75,0.00,0.00,building_windows_float_processed +1.51761,13.89,3.60,1.36,72.73,0.48,7.83,0.00,0.00,building_windows_float_processed +1.51618,13.53,3.55,1.54,72.99,0.39,7.78,0.00,0.00,building_windows_float_processed +1.51766,13.21,3.69,1.29,72.61,0.57,8.22,0.00,0.00,building_windows_float_processed +1.51742,13.27,3.62,1.24,73.08,0.55,8.07,0.00,0.00,building_windows_float_processed +1.51596,12.79,3.61,1.62,72.97,0.64,8.07,0.00,0.26,building_windows_float_processed +1.51743,13.30,3.60,1.14,73.09,0.58,8.17,0.00,0.00,building_windows_float_processed +1.51756,13.15,3.61,1.05,73.24,0.57,8.24,0.00,0.00,building_windows_float_processed +1.51918,14.04,3.58,1.37,72.08,0.56,8.30,0.00,0.00,building_windows_float_processed +``` diff --git a/docs/machine-learning/datasets/demo/iris.md b/docs/machine-learning/datasets/demo/iris.md index 5972f1b..8baf731 100644 --- a/docs/machine-learning/datasets/demo/iris.md +++ b/docs/machine-learning/datasets/demo/iris.md @@ -14,6 +14,8 @@ Most popular and widely available dataset of iris flower measurement and class n To load Iris dataset simple use: ``` +use Phpml\Dataset\Demo\Iris; + $dataset = new Iris(); ``` diff --git a/docs/machine-learning/datasets/demo/wine.md b/docs/machine-learning/datasets/demo/wine.md new file mode 100644 index 0000000..5b3f999 --- /dev/null +++ b/docs/machine-learning/datasets/demo/wine.md @@ -0,0 +1,35 @@ +# Wine Dataset + +These data are the results of a chemical analysis of wines grown in the same region in Italy but derived from three different cultivars. The analysis determined the quantities of 13 constituents found in each of the three types of wines. + +### Specification + +| Classes | 3 | +| Samples per class | class 1 59; class 2 71; class 3 48 | +| Samples total | 178 | +| Features per sample | 13 | + +### Load + +To load Wine dataset simple use: + +``` +use Phpml\Dataset\Demo\Wine; + +$dataset = new Wine(); +``` + +### Several samples example + +``` +alcohol,malic acid,ash,alcalinity of ash,magnesium,total phenols,flavanoids,nonflavanoid phenols,proanthocyanins,color intensity,hue,OD280/OD315 of diluted wines,proline,class +14.23,1.71,2.43,15.6,127,2.8,3.06,.28,2.29,5.64,1.04,3.92,1065,1 +13.2,1.78,2.14,11.2,100,2.65,2.76,.26,1.28,4.38,1.05,3.4,1050,1 +13.16,2.36,2.67,18.6,101,2.8,3.24,.3,2.81,5.68,1.03,3.17,1185,1 +14.37,1.95,2.5,16.8,113,3.85,3.49,.24,2.18,7.8,.86,3.45,1480,1 +13.24,2.59,2.87,21,118,2.8,2.69,.39,1.82,4.32,1.04,2.93,735,1 +14.2,1.76,2.45,15.2,112,3.27,3.39,.34,1.97,6.75,1.05,2.85,1450,1 +14.39,1.87,2.45,14.6,96,2.5,2.52,.3,1.98,5.25,1.02,3.58,1290,1 +14.06,2.15,2.61,17.6,121,2.6,2.51,.31,1.25,5.05,1.06,3.58,1295,1 +14.83,1.64,2.17,14,97,2.8,2.98,.29,1.98,5.2,1.08,2.85,1045,1 +``` diff --git a/docs/machine-learning/preprocessing/imputation-missing-values.md b/docs/machine-learning/preprocessing/imputation-missing-values.md index e69de29..db64d8d 100644 --- a/docs/machine-learning/preprocessing/imputation-missing-values.md +++ b/docs/machine-learning/preprocessing/imputation-missing-values.md @@ -0,0 +1 @@ +# Imputation missing values diff --git a/docs/machine-learning/preprocessing/normalization.md b/docs/machine-learning/preprocessing/normalization.md index e69de29..a0dbc80 100644 --- a/docs/machine-learning/preprocessing/normalization.md +++ b/docs/machine-learning/preprocessing/normalization.md @@ -0,0 +1 @@ +# Normalization