117
Machine Learning Applied to Fourteen Agricultural Datasets Kirsten Thomson Robert J. McQueen Machine Learning Group Department of Computer Science University of Waikato Research Report September, 1996

Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

  • Upload
    others

  • View
    0

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

Machine Learning Applied to Fourteen Agricultural Datasets

Kirsten ThomsonRobert J. McQueen

Machine Learning GroupDepartment of Computer Science

University of Waikato

Research Report

September, 1996

Page 2: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

i

Table of Contents

1. INTRODUCTION............................................................................................................. 11.1 Machine Learning........................................................................................................ 11.2 The WEKA machine learning workbench..................................................................... 21.3 Characteristics of the datasets ...................................................................................... 31.4 Classes and accuracy.................................................................................................... 31.5 WEKA Workbench functions and machine learning schemes used................................ 41.6 The results of the tests ................................................................................................. 4

2. APPLE BRUISING........................................................................................................... 62.1 Original research.......................................................................................................... 62.2 Machine learning.......................................................................................................... 62.3 Discussion of results .................................................................................................. 122.4 Conclusion................................................................................................................. 12

3. BULLS............................................................................................................................ 133.1 Original research........................................................................................................ 133.2 Machine learning........................................................................................................ 133.3 Discussion of results .................................................................................................. 153.4 Conclusion................................................................................................................. 15

4. EUCALYPTUS SOIL CONSERVATION ...................................................................... 174.1 Original research........................................................................................................ 174.2 Machine learning........................................................................................................ 174.3 Discussion of results .................................................................................................. 254.4 Conclusion................................................................................................................. 25

5. GRASS GRUBS AND DAMAGE RANKING................................................................ 305.1 Original research........................................................................................................ 305.2 Machine learning........................................................................................................ 305.3 Discussion of results .................................................................................................. 335.4 Conclusion................................................................................................................. 34

6. GRASS GRUBS AND RAINFALL................................................................................. 386.1 Original research........................................................................................................ 386.2 Machine learning........................................................................................................ 396.3 Discussion of results .................................................................................................. 416.4 Conclusion................................................................................................................. 42

7.GROWER QUESTIONNAIRE ........................................................................................ 467.1 Original research........................................................................................................ 467.2 Machine learning........................................................................................................ 467.3 Discussion of results .................................................................................................. 497.4 Conclusion................................................................................................................. 49

8. PASTURE PRODUCTION............................................................................................. 518.1 Original research........................................................................................................ 518.2 Machine learning........................................................................................................ 518.3 Discussion of results .................................................................................................. 558.4 Conclusion................................................................................................................. 55

9. PEA SEED COLOUR ..................................................................................................... 589.1 Original research........................................................................................................ 589.2 Machine learning........................................................................................................ 589.3 Conclusion................................................................................................................. 61

Page 3: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

ii

10. SLUGS.......................................................................................................................... 6310.1 Original research...................................................................................................... 6310.2 Machine learning...................................................................................................... 6310.3 Discussion of results ................................................................................................ 6810.4 Conclusion............................................................................................................... 68

11. SQUASH HARVEST.................................................................................................... 7111.1 Original research...................................................................................................... 7111.2 Machine learning...................................................................................................... 7111.3 Conclusion............................................................................................................... 78

12. VALLEY CATEGORIES.............................................................................................. 8312.1 Original research...................................................................................................... 8312.2 Machine learning...................................................................................................... 8312.3 Discussion of results ................................................................................................ 8712.4 Conclusion............................................................................................................... 87

13. VENISON BRUISING.................................................................................................. 8913.1 Original research...................................................................................................... 8913.2 Machine learning...................................................................................................... 8913.3 Discussion of results ................................................................................................ 9513.4 Conclusion............................................................................................................... 95

14. WASP NESTS .............................................................................................................. 9714.1 Original research...................................................................................................... 9714.2 Machine learning...................................................................................................... 9714.3 Discussion of results .............................................................................................. 10214.4 Conclusion............................................................................................................. 102

15. WHITE CLOVER PERSISTENCE TRIALS............................................................... 10315.1 Original research.................................................................................................... 10315.2 Machine learning.................................................................................................... 10315.3 Discussion of results .............................................................................................. 11115.4 Conclusion............................................................................................................. 111

16. REFERENCES............................................................................................................ 114

Page 4: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

1

1. INTRODUCTION

This document reports on an investigation conducted between November, 1995 and March,1996 into the use of machine learning on 14 sets of data supplied by agricultural researchers inNew Zealand. Our purpose here is to collect together short reports on trials with thesedatasets using the WEKA machine learning workbench, so that some understanding of theapplicability and potential application of machine learning to similar datasets may result.

We gratefully acknowledge the support of the New Zealand agricultural researchers whoprovided their datasets to us for analysis so that we could better understand the nature andanalysis requirements of the research they are undertaking, and whether machine learningtechniques could contribute to other views of the phenomena they are studying. Thecontribution of Colleen Burrows, Stephen Garner, Kirsten Thomson, Stuart Yeates and JamesLittin and other members of the Machine Learning Group in performing the analyses wasessential to the completion of this work.

This work is supported by a PGSF grant from the Government of New Zealand

1.1 Machine Learning

Machine learning is an emerging technology that can aid in the discovery of rules and patternsin sets of data. It has frequently been observed that the volume of recorded data is growing atan astonishing rate that far outstrips our ability to make sense of it, and the phrase “databasemining” is now being used to describe efforts to analyze data sets automatically for significantstructural regularities (Piatetsky–Shapiro and Frawley, 1991). Potential applications of thesetechniques in domains such as agriculture and horticulture are legion. There are many possibleways to capitalize on any patterns that are discovered. For example, their implicit predictiveability of decision and classification rules generated by machine learning techniques could beembedded in automatic processes such as expert systems, or they could be used directly forcommunication between human experts agricultural practitioners. The decision tree output ofsome machine learning schemes can aid in the discovery of the structure and hierarchy ofobserved data, assisting in the focusing of analysis efforts, and potential significant saving oftime.

Machine learning has potential in assisting agricultural researchers to better understand thedata that is the product of their field trials (McQueen et al, 1995). In the 14 cases discussed inthis report, the data was collected by the original researchers anticipating the use of one ormore statistical analysis techniques to understand its meaning. We anticipate a future timewhen machine learning might be one of the techniques used, alongside statistical analysis, toderive understanding from field data. If that is to be a common occurrence, then experimentsand field data collection may need to anticipate the benefits of machine learning, and therequirements this may impose, or opportunities presented on how the study is designed anddata captured.

Page 5: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

2

1.2 The WEKA machine learning workbench

One of the practical problems in applying machine learning is that it is hard to acquire a varietyof learning tools and experiment with them in a uniform way. The WEKA (WaikatoEnvironment for Knowledge Analysis) workbench is a software system that collects together anumber of machine learning schemes and allows users to easily switch between schemes, usinga common datafile standard and a unifying user interface to ease the testing and interpretationof results.

The machine learning research group at the University of Waikato has constructed thisworkbench to allow users to access a variety of machine learning techniques for the purposesof experimentation and comparison using real world data sets. The workbench is not a singleprogram, but rather a set of tools bound together by a common user interface.

The WEKA workbench differs from other machine learning environments in that its target useris a domain expert, in this case an agricultural scientist, who wants to apply machine learningto real world data sets. Other systems are intended for use by machine learning researchersand programmers developing and evaluating machine learning schemes. The WEKAworkbench concentrates on simplifying access to the schemes, so that their performance canbe evaluated on their own.

WEKA currently includes a number of different machine learning schemes, summarized below.In a typical session, a user might select a data set, run several different learning schemes on it,exclude and include different sets of attributes, and make comparisons between the resultingconcepts. Output from each scheme can be viewed in an appropriate form, for example as text,a tree or a graph.

Scheme Learning approach Reference

Unsupervised AUTOCLASS Bayesian clustering Cheeseman et al. (1988)

CLASSWEB Incremental conceptual clustering Fisher et al. (1987), Gennari(1989)

Supervised C4.5 Decision tree induction Quinlan (1992)

1R AND T2 Simple rules

INDUCT Complex rules Gaines (1991)

IB1-4,PEBLS andK*

Instance based learning

M5’ regression model trees

FOIL First-order inductive learner forrelational rules

Quinlan (1990), Quinlan (1991),Quinlan et al. (1993), Cameron-Jones et al. (1993)

Machine learning schemes currently included in the WEKA workbench

Further information on the WEKA workbench, the activities of the machine learning group,and its publications can be obtained at http://www.cs.waikato.ac.nz/~ml.

Page 6: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

3

1.3 Characteristics of the datasets

The table below gives an overview of the datasets tested. Instances refers to the number ofobservations, or "rows" in the dataset, while attributes refers to the number of variables, or"columns" recorded for each observation instance. In some cases, additional attributes werederived, or calculated from the original attributes in the provided dataset prior to machinelearning runs, and these are indicated by an * in the table below. Attributes types are indicatedas the following:enumerated: data point is one of a set of discrete numbers or symbols, not necessarily in acontinuous range. Numbers have no inherent meaning as a value other than symbolic.Comparison tests only on equality. The attribute value represented by the number 4 is nottwice as big as the number 2. Examples: 1,4,9.2, high, a+, yes.real: data point is in a continuous range of decimal numbers. Any number in the range is valid.Comparison tests include greater than, less than. Examples (for a range between -4.0 and 9.5):4.1, 6.324, -2.5integer: Non decimal number, usually positive. Comparison tests on greater than, less than.Numbers have order.

Section Dataset Name # ofInstances

# ofAttributes

enumerated real integer

2 Apple 1662 16 7 6 33 Bulls 90 8 3 54 Eucalypt 736 20 65 Grub Damage 155 9 5 3 16 Grub Rain 19 6 1 57 Grower 22 15 1 148 Pasture 36 25 2 15 89 Pea Seed 51 15 1 13 1

10 Slugs 100 9* 5 3 111 Squash 261 24 3 6 1612 Valley 878 15 1 13 113 Venison 21,448 23 13 1 914 Wasp 506 13 6 5 215 White Clover 63* 32* 5 27

1.4 Classes and accuracy

When a dataset is processed through the WEKA workbench, the objective is usually topartition the instances into "classes" of one of the attributes. For example, in trial number 8,pasture production, the class attribute was pasture production class, which could be one ofthree enumerated values, namely lo, med and hi. Machine learning then attempts to constructdecision trees, based on the other attributes selected for the run, which will result in allinstances being classified into those classes. Because the machine learning scheme tries togenerate a "best fit" set of decision rules, those rules do not necessarily allow for all instancesto be correctly put into their proper class, as specified in the attribute for that instance. To testitself, the machine learning scheme usually automatically calculates a measure of accuracy, that

Page 7: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

4

is the percent of instances that are correctly placed in their proper class for each run processedthrough it.

Hypothetically, one could generate a set of rules, the number of which would equal thenumber of instances for the test dataset, which would classify each instance with 100%accuracy. Thus, for a 1000 instance dataset, a 1000 rule decision tree would be required.However, to better understand the phenomena being studied, we are willing to trade off 100%accuracy for smaller decision trees that give a clearer understanding of the relationship of themost important attributes in determining the proper class. The machine learning schemes thusallow for parameters to be specified which will determine the balance between trees with largenumbers of rules and high accuracy, to much smaller and simpler rulesets with perhaps onlyslightly decreased accuracy. The datasets analysed in this study have been put through thisiterative procedure to determine the best balance between accuracy and decision tree size.

1.5 WEKA Workbench functions and machine learning schemes used

The following WEKA Workbench functions and machine learning schemes were used. Theattribute editor supports creation of new, or derived attributes based on mathematical orlogical combinations of existing attributes.

Section Dataset Name Attribute editor C4.5 1Rw Autoclass2 Apple yes yes3 Bulls yes4 Eucalypt yes yes5 Grub Damage yes yes6 Grub Rain yes yes7 Grower yes yes8 Pasture yes yes9 Pea Seed yes yes yes

10 Slugs yes yes11 Squash yes yes12 Valley yes yes yes13 Venison yes yes yes14 Wasp yes yes15 White Clover yes yes

1.6 The results of the tests

The following sections contain a short summary of the tests undertaken with the datasetssupplied. In each section, most of the following are given:

identification informationobjectives of the original researchobjective of the machine learning testdescription of the size of the datasetdescription of each attributeclass information

Page 8: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

5

profiles of key attributesmachine learning processes undertakenindicators of size of decision tree and errorssamples of the decision tree in graphical formdiscussion of resultsconclusions as to applicability of machine learning to this dataset

Page 9: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

6

2. APPLE BRUISING

Data source Brian De la RueLincoln TechnologyHamilton

Date received 3 November, 1995

Assigned to Colleen Burrows, Research programmer

Data location /home/ml/datasets/Summer1995/apples-95-96/REPORT/original.arff/home/ml/datasets/Summer1995/apples-95-96/REPORT/results.arff

2.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo determine which attributes contribute to apple bruise sizes.

Summary of original research resultsThe original research results are currently unknown.

2.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

Machine learning objectiveTo determine which attributes contribute highly to apple bruise sizes.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

The data is complete except ‘BruiseWidthEquator’ is present for only one impactenergy value for each code. Instances in Code ‘95GS-A’, ‘95GS-C’, and ‘95GS-D’,which are significantly smaller than instances for ‘95GS-B’, should all have similarvalues for ‘FruitRadius’.

Page 10: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

7

Instance informationThe original dataset contained attributes with large numbers of missing vlaues, thesewere removed for analyses purposes. The factors present are only a representation ofall the features required to describe apple bruising.

Original dataset : 1662 instances.Instances where ‘Code’ equals ‘95GS-E’ and ‘95GS-F’ were deleted from thedataset. Remaining instances totalled 1536.

Attribute informationNumber of attributes : 16 (15 plus one predefined class).

The attributes are :1. Code (bruise location - class value)

type : enumeratedvalues : 95GS-A, 95GS-B, 95-GS-C, 95GS-Dmissing : 0

2. HarvestTimetype : enumeratedvalues : midmissing : 0

3. ImpactSurfacetype : enumeratedvalues : Steel, Fruitmissing : 0

4. ImpactEnergytype : enumeratedvalues : 0.019, 0.037, 0.056, 0.075, 0.093. 0.115missing : 0

5. FruitNumbertype : enumeratedvalues : 1 - 16missing : 0

6. BruiseLabeltype : enumeratedvalues : A, B, C, Dmissing : 0

7. FruitRadiusEquatortype : integervalues : n/amissing : 1536

8. FruitRadiusPolartype : integervalues : n/amissing : 1536

9. FruitRadiusCombinedtype : integervalues : 25.0 - 62.0missing : 0

Page 11: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

8

10. ContactWidthEquatortype : realvalues : 8.0 - 23.0missing : 0

11. ContactWidthPolartype : realvalues : 8.0 - 23.0missing : 0

12. BruiseWidthEquatortype : realvalues : 10.0 - 20.0missing : 0

13. BruiseWidthPolartype : realvalues : 0.0 - 21.0missing : 0

14. BruiseDepthBottomtype : realvalues : 0.0 - 7.0missing : 0

15. BruiseDepthToptype : realvalues : 0.0 - 5.0missing : 0

16. VisibleExternallytype : enumeratedvalues : 0 (no), 1 (yes)missing : 0

Class informationA number of classes were used throughout the analysis. These were :

‘Code’ - predefined class values1. 95GS-A2. 95GS-B3. 95GS-C4. 95GS-D

‘CodeRadi2’ - based on ‘Radius’ and ‘Code’ values1. Alow2. Amed3. Ahi4. Blow5. Bmed6. Bhi7. Clow8. Cmed9. Chi10. Dlow11. Dmed12. Dhi

Page 12: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

9

‘ContactArea’ - ‘ContactWidthEquator’ * ‘ContactWidthPolar’1. small2. med3. large4. vlarge

‘BruiseDiameter’ - based on ‘BruiseWidthPolar’1. SmallDiam2. MediumDiam3. LargeDiam4. VeryLargeDiam

The distribution of the classes are :‘Code’1. 95GS-A2. 95GS-B3. 95GS-C4. 95GS-D

‘CodeRadi2’1. Alow2. Amed3. Ahi4. Blow5. Bmed6. Bhi7. Clow8. Cmed9. Chi10. Dlow11. Dmed12. Dhi

‘ContactArea’1. small2. med3. large4. vlarge

‘BruiseDiameter’1. SmallDiam2. MediumDiam3. LargeDiam4. VeryLargeDiam

Page 13: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

10

Data analyses procedure

Three ‘bruise size’ classes weredetermined from a ‘bruise area’calculation :

• none = 0• small < 1• large > 1

Experiments on the training setincluded :1. C4.5 was run with ‘Code’ as

the class and the attributes : ‘ImpactEnergy’‘FruitRadiusCombined’‘ContactWidthEquator’‘ContactWidthPolar’‘BruiseDepthBottom’‘BruiseDepthTop’‘VisibleExternally’

2. C4.5 was run with the attributes(above) except :

‘BruiseDepthBottom’‘BruiseDepthTop’

Results

1. The simplified decision tree was :size : 35(nodes) with 4.6% errordominant attributes :

‘ImpactEnergy’ ‘BruiseDepthBottom’ ‘Code’

This tree seems quite lopsided since thefirst node states that if the impactenergy is greater than 0.019, then thebruise size will be large, and the othernodes include instances with impactenergy at 0.019.

2. The simplified decision tree had:size : 25 with 8.2% errorsdominant attributes :

‘ImpactEnergy’‘Code’‘VisibleExternally’

Again the tree was lopsided.

3. C4.5 was run with the attributes:‘BruiseWidthPolar’‘BruiseDepthTop’‘BruiseDepthBottom’

3. The simplified decision tree had: size : 117 with 37.8% errors

This result may indicate that the threeattributes are equally important inrelationship to impact energy

Each ‘Code’ group was dividedinto three categories - low,medium, high - based on the‘FruitRadius’ value. This newattribute ‘CodeRadi2’ was usedinstead of ‘Code’ and‘FruitRadius’.

Page 14: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

11

4. C4.5 was run using ‘sizebru2’with attributes :

‘ImpactEnergy’,‘ContactWidthEquator’,‘ContactWidthPolar’,‘BruiseDepthBottom’,‘BruiseDepthTop’‘VisibleExternally’‘CodeRadi2’

A new attribute ‘ContactArea’ wascreated by multiplying values of‘ContactWidthEquator’ by valuesof ‘ContactWidthPolar’.Enumerated values were createdwith values :

• small < 150• med < 230• large < 330• vlarge > 330

5. C4.5 was used with‘ContactArea’ as a class with :

‘ImpactEnergy’‘BruiseDepthBottom’‘BruiseDepthTop’‘BruiseWidthPolar’‘VisibleExternally’‘CodeRadi2’

A new attribute ‘BruiseDiameter’was created from‘BruiseWidthPolar’ where :

• SmallDiam < 7• MediumDiam < 13• LargeDiam < 17• VeryLargeDiam < 17

4. The simplified decision tree had :size : 5 with 5.7% errors

This resulted in :if the ‘BruiseDepthBottom’ is zerothen there is no bruise, orif the ‘ImpactEnergy’ is 0.019 thenthe bruise is small, otherwisethe bruise will be large.

This indicates that the size of the bruiseis wholly dependent on the impactenergy.

5. The simplified decision tree had :size : 93 with 16% errorsdominant attributes :

‘ImpactEnergy’‘CodeRadi2’

This indicates that impact energy hadmore effect on the bruise contact areathan the bruise size.

Page 15: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

12

6. C4.5 was run with‘BruiseDiameter’ as the classwith :

‘ImpactEnergy’‘BruiseDepthBottom’‘BruiseDepthTop’‘VisibleExternally’‘ContactWidthEquator’‘ContactWidthTop’‘CodeRadi2’

7. C4.5 was run using‘BruiseDiameter’ as the classwith the same attributes except‘Code and‘FruitRadiusCombined’ wereused instead of ‘CodeRadi2’

6. The simplified decision tree had:size : 103 with 17.3% errorsdominant attributes :

‘ImpactEnergy’‘BruiseDepthBottom’‘ContactWidthEquator’

7. The simplified decision tree had :size : 95 with 16.9% errors

The result is almost identical to oneabove as ‘Code’ and‘FruitRadiusCombined’ appear so low inthe tree.

2.3 Discussion of resultsApples within a certain code were not of constant radius as was originally thought.‘ImpactEnergy’ seems to contribute most to the size of the bruise and the contact area.

2.4 ConclusionThe results seem favourable to machine learning. One tree (size 5 with 5.7% errors) meetsC4.5’s requirements to distinguish a good tree. It has a small number of nodes, and has fewerrors. Contributing to this outcome is the fact that there are no missing values in the dataset.Consequently, noise will be reduced. Also, a large number of instances were analysed with agood number of attributes (not too many and not too smaller amount). Nearly half of theattributes contained enumerated value types. This often enables C4.5 to categorise instancesmore easily.

The ability to create new attributes enabled initial analyses techniques to be extended.

Page 16: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

13

3. BULLS

Data source Jenny JagoAnimal Behaviour and Welfare ResearchAgResearch, Ruakura Research CentreHamilton

Report date December 1995

Assigned to Stuart Yeates, Research programmer

Data location /home/ml/datasets/Summer1995/REPORT/original.arff/home/ml/datasets/Summer1995/REPORT/results.arff

3.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo find which treatments of castration give the heaviest bulls with the least violentbehaviour.

Summary of original research resultsThe original research results are currently unknown.

3.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo find which treatments of castration give the heaviest bulls with the least violentbehaviour, determine differences between different classes of bulls, and discover arelationship between testosterone level and class.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information. The datasetis very ‘wide’, with more attributes than instance.

Instance informationAll instances contain some missing values and noise. Most instances have missingvalues for the first one or two attributes in the time series. There are no scrotalcircumference or testes length present for group seven.

Original dataset : 90 instances.

Page 17: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

14

Final dataset : 90 instances.

Attribute informationThere were a number of attributes contained within the original dataset. Theseattributes can be grouped into eight categories. These categories are :

1. tag (unique identifier)type : enumeratedvalues : 1 - 98missing : 0

2. group (treatment group)type : enumeratedvalues : 1,2 immunised at 4, 4½, and 7½ months

3,4 entire bulls 5,6 immunised at 7½, and 8 months of age 7 steer (castrated at 2 months of age) 8,9 immunised at 2, 2½, 4, and 7½ months

missing : 03. origin (farm of bull)

type : enumeratedvalues : Candy, McFarlane, Ferguson, Clarkemissing : 0

4. legwear (riding behaviour of different dates)type : realvalues : 0.0 - 4.0missing : 1

5. scrotal (scrotal circumference at different dates)type : realvalues : 10.0 - 37.0missing : (on average) 10

6. testes (testes length on different dates)type : realvalues : 5.0 - 17.0missing : (on average) 10

7. testos (testosterone level on different dates)type : realvalues : 0.042 - 27.77missing : (on average) 2

8. wt (weight on different dates)type : realvalues : 58.5 - 429.0missing : (on average) 5

Class informationTwo classes were used to classify the data. These were :

wt_final - based on last weight data point in attribute ‘Weight’1. (lightest) to 6. (heaviest)

group11. to 9.

Page 18: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

15

The distribution of the classes are :wt_final1. 02. 233. 254. 195. 186. 5

group1Each value for New_Treatment_Groups has 10 instances.

Analysis by 1Rw produced the following results :wt_finaldefault class : 3 with 25/90 accuracybest hypothesis : tag1 with 100% accuracy

group1default class : 1 with 10/90 accuracybest hypothesis : tag1 with 100% accuracy

Data analysis procedure

1. C4.5 was used with ‘group1’ asthe class with the testosteronelevel attributes.

2. C4.5 was run using ‘wt_final’as the class with thetestosterone level attributes.

3. C4.5 was run using ‘group1’ asthe class with the weightattributes.

Results

1. The simplified decision tree was :size : 23 (nodes) with 15% errors.

2. The simplified decision tree was :size : 17 with 40% errors.

3. The simplified decision tree was :size : 33 with 40% errors

3.3 Discussion of resultsThe resulting trees indicate strong links to testes length and testosterone which in turn arestrongly linked to the final weight. The decision trees were overfitted in comparison to thedata producing trees which correctly classify all of the instances in the training set but classifyunseen examples relatively poorly.

3.4 ConclusionThe dataset was not very suitable to machine learning due to the time series nature of the data.

Page 19: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

16

Follow up notesJenny Jago commented that machine learning did not find as many relationships aswere expected.

Page 20: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

17

4. EUCALYPTUS SOIL CONSERVATION

Data source Bruce Bulloch128 Cook StreetPalmerston North

Report date January 1996

Assigned to Kirsten Thomson, Research programmer

Data location /home/ml/datasets/Summer1995/eucalyptus/REPORT/original.arff/home/ml/datasets/Summer1995/eucalyptus/REPORT/results.arff

4.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo determine which seedlots in a species are best for soil conservation in seasonallydry hill country. Determination is found by measurement of height, diameter by height,survival, and other contributing factors.

Summary of original research resultsOn the basis of the collected data (1991) larger growing species seem more suited todry hill country areas, such as Pakaraka and Kahuiti. Domain knowledge allowed theresearcher to determine that the larger trees would serve best inconservation/production/agroforestry regimes, the smaller at wider spacings inconservation/pastoralism regimes. A further note to the study, stated that provenancecomparisons within species generally support the findings of more extensive geneticimprovement trials focused on the eucalypts with most potential for timber production.

4.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

Machine learning objectiveTo contrast seedlots and determine if one within a species is better than another(within the experimental guidelines), ie. dry hill country. This is to be achieved bycontrasting relationships and determining which attributes contribute most to a good orbetter result.

Page 21: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

18

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

The original data was contained in two datasets. The first describing the site andlocation details, the other eucalyptus growth, in accordance to the different areas.Attributes one - 10 contain the species details. Attributes 11 - 21 contain the site andlocation details.

It is important to note that eucalypt trial methods have changed over time; earlier trialsincluded mostly 15 - 30cm tall seedlings grown in peat plots and the later trials haveincluded mostly three replications of eight trees grown. This change may contribute toless significant results.

Experimental data recording procedures which require noting include :• instances with no data recorded due to experimental recording procedures require

that the absence of a species from one replicate at a site was treated as a missingvalue, but if absent from two or more replicates at a site the species was excludedfrom the site’s analyses.

• missing data for survival, vigour, insect resistance, stem form, crown form andutility especially for the data recorded from Morea Station; this could indicate thedeath of species in these areas or a lack in collection of data.

Instance informationA number of instances contained missing values and noise. The missing values usuallyrepresent a plant dying during the time of the experiment. Unknown values arerepresented by a ‘?’. The factors present are only a representation of all the featuresrequired to describe eucalyptus planting.

Original dataset : 736 instances.Final dataset : 736 instances.

Attribute informationNumber of attributes : 20.

The attributes are :1. Sp (species)

type : enumeratedvalues : co, fr,...........,temissing : 0

2. PMCNo (seedlot number)type : integervalues : 1.0 - 3,275.0missing : 7

3. DBH (best diameter base height, cm)type : realvalues : 0.58 - 42,085.0missing : 1

Page 22: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

19

4. Ht (m)type : realvalues : 1.12 - 21.79missing : 0

5. Surv (survival)type : integervalues : 1.0 - 100.0missing : 94

6. Vig (vigour)type : realvalues : 0.5 - 5.0missing : 69

7. Ins_res (insect resistance)type : realvalues : 0.0 - 4.5missing : 69

8. Stem Fm (stem form)type : realvalues : 0.0 - 5.0missing : 0

9. Crown Fm (crown form)type : realvalues : 0.0 - 0.5missing : 0

10. Brnch Fm (branch form)type : realvalues : 0.0 - 5.0missing : 69

11. Utility (utility rating)type : realvalues : 0.0 - 5.0missing : 94

12. Name (name of site;)type : enumerated (15)values : Clydebank, Craggy Range Road,..........,Wimbledon Speciesmissing : 0

13. Abbreviation (site abbreviation)type : enumerated (15)values : Cly, Cra,...............,WSpmissing : 0

14. Locality (where the site is in the North Island)type : enumeratedvalues : Central_Hawkes_Bay, Northern_Hawkes_Bay,....,

South_Wairarapamissing : 0

15. Map Ref (map location in the North Island, NZMS1)type : enumeratedvalues : N135_382/137, N116_848/985,...........,N151_922/226missing : 0

Page 23: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

20

16. Latitude approximation (South - deg.,min)type : enumeratedvalues : 29_38, 39_00,.......... ...,82_32missing : 0

17. Altitude (m)type : integervalues : 70 - 300missing : 0

18. Rainfall (mm pa)type : integervalues : 850 - 1,750missing : 0

19. Frosts (deg.C)type : integervalues : -3.0 - -2.0missing : 0

20. Year (year of planting)type : integervalues : 1980 - 1986missing : 0

Class informationThere are two class values created for this dataset from existing attributes. These were:

New_Utility - based on existing utility values1. none2. low3. average4. good5. best

Bulk - DBH * DBH * HtEnumerated, with many values.

The distribution of the classes are :New_Utility1. none 1802. low 1073. average 1304. good 2145. best 105

BulkThere is one class value for every instance.

Analysis by 1Rw produced the following results :New_Utilitydefault class : good with 214/736best hypothesis : ‘Vig’ with 50.8152% accuracy

Page 24: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

21

Data analysis procedureThe two data sets were combinedto create on dataset with attributesfrom both.

The original utility measurementwas categorised into a new utilityrating :

• none < 0.1• low < 1.48• average < 2.65• good < 3.83• best < 5.00

A number of tests were run on thedata :1. C4.5 was used with

‘New_Utility’ as the class withthe attributes :

‘Species’‘PMCNo’

2. C4.5 was used with‘New_Utility’ as the class withthe attributes :

‘Species’‘PMCNo’‘DBH’‘Ht’‘Surv’‘Vig’‘Ins_res’‘Stem_Fm’‘Crown_Fm’‘Branch_Fm’

Results

1. The simplified tree had :size : 62 (nodes) with 47.7% errorsdominant attributes : ‘Species’

Species divided the data more than theseed lot number, since many of speciesindividuals were all in one class.

2. The simplified tree had :size : 234 with 14.7% errorsdominant attributes are ‘Vigour’,‘Species’ and ‘PMCNo’.

3. C4.5 was used with‘New_Utility’ as the classwith the attributes with theattributes above including :

‘Rep’‘Locality’‘Map_Ref’‘Latitude’‘Altitude’‘Rainfall’‘Frosts’

3. The simplified tree had :size : 227 with 7.7% errors.dominant attributes are ‘Year’

dividing the data at 1983, and‘Vigour’, ‘Survival’ and‘Height’

Page 25: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

22

A new attribute ‘Bulk’ was createdbased on the ‘DBH’*’DBH’*’Ht’attributes. This created may values,generally, each instance had it’sown class value.

4. C4.5 was used with ‘Bulk’ asthe class with the attributes withall other attributes except :

‘Utility’‘DBH’‘Height’.

The ‘Species’ attribute was altered.The values ‘ma’ were changed to‘mn’ (there was an error in thedata). The instances for MoreaStation and Wensleydale weredeleted from the dataset (they hadno survival rates, and wereirrelevant to the outcome). The‘PMCNo’ was changed to anenumerated value.

5. C4.5 was used with‘New_Utility’ as the class with :

‘PMCNo’ (enumerated)‘Species’

6. C4.5 was used with‘New_Utility’ as the class with :

‘PMCNo’‘Species’‘Site’

4. The simplified tree has :size : 151 with 26.5% errorsdominant attributes are ‘Year’ at

1983, and ‘Vigour’ and‘Species’.

The last three decision trees used vigour asone of the first dividers of the data. In alltrees, the data was divided firstly at vigour2.3 and then at vigour 1.3 where thoseinstances with vigour less than or equal to1.3 had a utility rating of ‘none’.

There are missing data values for survival,vigour, insect resistance, stem form, crownform, branch form and utility especiallyfrom data from Morea Station which mayindicate death of species in these areas or alack in collection of data.

No data was recorded for 1984 and 1985and very little data was recorded for 1986which explains the first division in two ofthe decision trees at year 1983 where thosegreater than 1983 give a utility rating of‘none’.

5. The simplified tree has :size : 94 with 50.1% errorsdominant attributes are ‘PMCNo’

6. The simplified tree has :size : 266 with 42.9% errorsdominant attributes are ‘PMCNo’

then ‘Abbrev’

Page 26: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

23

7. C4.5 was used with‘New_Utility’ as the class with :

‘PMCNo’‘Species’‘DBH’‘Height’‘Surv’‘Vigour’‘Ins_res’‘Stem_Fm’‘Crown_Fm’‘Branch_Fm’

8. C4.5 was used with‘New_Utility’ as the class withthe attributes above excluding‘Species’.

9. C4.5 was used with‘New_Utility’ as the class withthe attributes above including :

‘Rep’‘Locality’‘Map_ref’‘Latitude’‘Altitude’‘Rainfall’‘Frosts’‘Year’

Instances with a ‘New_Utility’rating of ‘good’ and ‘best’ werecreated into a new dataset.

10. C4.5 was used with‘New_Utility’ as the class onthis new dataset with all of theattributes used above in 9.

7. The simplified tree has :size : 126 with 18.9% errorsdominant attributes are ‘Vig’,

‘Surv’ and ‘PMCNo’.

8. The simplified tree has :size : 128 with 31.8% errorsdominant attributes are ‘Vig’,

‘Surv’ and ‘PMCNo’.

9. The simplified tree has :size : 141 with 31.5% errorsdominant attributes are ‘Vig’,

‘Surv’ and ‘PMCNo’.

10. The simplified tree has :size : 17 with 20.7% errorsdominant attributes are ‘Vig’ and

‘Crown_Fm’ .

Page 27: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

24

11. C4.5 was used with‘New_Utility’ as the class withon this new dataset with :

‘Replicate’‘Locality’‘Map_ref’‘Latitude’‘Altitude’‘Rainfall’‘Frosts’‘Year’

The instances with ‘none’ and ‘low’have been amalgamated into a‘lower’ value. Those above thesevalues have stayed the same.

12. C4.5 was used with‘New_Utility’ as the class withthe attributes above including :

‘PMCNo’‘Species’‘DBH’‘Height’‘Surv’‘Vigour’‘Ins_res’‘Stem_Fm’‘Crown_Fm’‘Branch_Fm’

13. C4.5 was used with‘New_Utility’ as the classwith:

‘Replicate’‘Locality’‘Map_ref’‘Latitude’‘Altitude’‘Rainfall’‘Frosts’‘Year’

11. The simplified tree has :size : 10 with 27.9% errorsdominant attributes are ‘Locality’

and ‘Rep’.

12. The simplified tree has :size : 139 with 20.8% errorsdominant attributes are ‘Vig’ and

‘PMCNo’.

13. The simplified tree has :size : 29 with 51.7% errorsdominant attributes are ‘Latitude’.

Page 28: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

25

The results are presented at the end of this analyses.

4.3 Discussion of resultsDue to initial analysis performed with ‘PMCNo’ as an integer (this was incorrect, and can beequated to comparing two colours ie. is one colour less than another), the first four resultshave been discarded. The proper type of ‘PMCNo’ is as an enumeration. Therefore, theresults from five to 13 are more correct. From these the best results are where :1. size : 126 with 18.9% errors (no. 7)

for attributes ‘PMCNo’, Species’ and site details2. size : 17 with 20.7% errors (no. 10)

for all tree details, but on the smaller dataset of only good and best results for‘New_Utility’

3. size : 139 with 20.8% errors (no. 12)for all attributes, but none and low outcome have been amalgamated into one category.

4.4 ConclusionIdeally, trees and rules found from C4.5 analysis should be smaller and more accurate, forexample, less than 20 nodes and 10 percent errors. The best decision trees, listed above, haveerror rates above 10 percent. The first has the lowest error rate found, the second and lasthave higher error rates. These error rates may be due to the fact that data was missing from anumber of attributes. Some of these missing values may be unknown or unmeasured values,others may be missing (or unable to be measured).

Machine learning analyses looks for relationships or patterns in the data. Some data, may bedifferent from an established pattern (found from other data within the dataset). Though thedata may be correct (determined by domain knowledge), the differentiation may not berecognised by the algorithm used, consequently a higher error count is attributed to. In thiscase domain knowledge and researcher input is important to determine if the error count isfeasible.

The large number of nodes in most of the trees can be attributed by the large number ofattributes and large number of values within each of these attributes. The tree with thesmallest nodes (size 17) was found from the smallest dataset with a smaller range of attributes(tree information only).

The results gained from machine learning seem interesting. Because of the higher number oferrors, domain knowledge is required for further analysis of the results. The trees show whichattributes and values contribute to good eucalyptus trees for soil conservation.

Follow up notesBruce Bulloch was very enthusiastic about the results and would like to work somemore with machine learning on his dataset.

Page 29: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

26

Reference : Bulluch B. T., (1992) Eucalyptus Species Selection for Soil Conservation inSeasonally Dry Hill Country - Twelfth Year Assessment New Zealand Journal of ForestryScience 21(1): 10 - 31 (1991)

Page 30: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

27

Graph 1 : Result 7V

ig

Vig

<=

2.3

PMC

no

> 2

.3

none

(47

.4/1

.4)<

= 1

.3

Sp

> 1

.3

low

(3.

6/1.

8)

= c

o

low

(5.

0/2.

3)

= f

r

low

(1.

0/0.

8)

= m

a

none

(4.

5/1.

2)

= n

d

low

(1.

0/0.

8)

= n

i

none

(5.

6/1.

2)

= p

u

low

(0.

0)

= s

i

low

(1.

0/0.

8)

= m

n

none

(3.

0/1.

1)

= a

g

aver

age

(1.

0/0.

8)

= b

xs

low

(4.

0/3.

1)

= e

l

low

(4.

0/3.

1)

= f

a

low

(2.

0/1.

8)

= jo

low

(0.

0)

= r

o

low

(2.

0/1.

0)

= n

c

low

(0.

0)

= c

r

low

(2.

0/1.

8)

= p

a

none

(1.

1/0.

8)

= r

a

none

(2.

1/1.

0)

= te

DB

H

= o

b

Vig

= o

v

Ins_

res

= r

d

Brn

ch_F

m

= b

r

Ht

= k

a

DB

H

= r

e

Brn

ch_F

m

= s

m

DB

H

= a

m

none

(2.

0/1.

0)

<=

8

low

(2.

0/1.

0)

> 8

low

(9.

0/2.

4)

> 1

.6

Surv

<=

1.6

low

(3.

0/2.

1)

<=

94

none

(3.

0/1.

1)

> 9

4

none

(4.

0/1.

2)

> 2

.5 Su

rv<=

2.5

none

(2.

0/1.

0)<=

38

Surv> 3

8

low

(9.

0/2.

4)<=

94

none

(3.

0/2.

1)

> 9

4

none

(6.

0/2.

3)

<=

3.1

low

(5.

0/1.

2)

> 3

.1

none

(6.

0/2.

3)

<=

7.6

7

low

(4.

0/1.

2)

> 7

.67

low

(3.

0/1.

1)

<=

8.8

3

aver

age

(2.

0/1.

8)

> 8

.83

none

(3.

0/1.

1)

<=

2.5

low

(3.

0/1.

1)

> 2

.5

good

(2.

0/1.

8)

<=

9.3

none

(3.

0/1.

1)

> 9

.3

none

(30

.6/1

.4)

> 2

751

Surv

<=

275

1

none

(20

.7/2

.3)

<=

5

Vig

> 5

Sp

<=

3

Cro

wn_

Fm

> 3

low

(2.

0/1.

8)

= m

a

low

(2.

0/1.

8)

= s

i

aver

age

(0.

0)

= m

n

low

(2.

0/1.

0)

= a

g

low

(3.

0/1.

1)

= e

l

low

(3.

0/1.

1)

= jo

low

(3.

0/1.

1)

= s

m

low

(2.

0/1.

8)

= r

o

low

(2.

0/1.

8)

= n

c

none

(1.

0/0.

8)

= p

a

none

(2.

3/1.

0)

= r

a

none

(1.

3/0.

9)

= te DB

H

= c

o DB

H= f

r

DB

H

= n

d

Ht

= n

i

Stem

_Fm

= o

b

Brn

ch_F

m

= o

v

Ht

= p

u

Ins_

res

= r

d

Surv

= b

xs

Stem

_Fm

= b

r

Ht

= f

a

Ht

= k

a

Surv

= r

e

DB

H

= a

m

DB

H

= c

r

aver

age

(8.

0/2.

4)

<=

15.

31

none

(2.

3/1.

9)

> 1

5.31

good

(4.

0/2.

2)

<=

8.8

3

aver

age

(3.

0/2.

1)

> 8

.83

none

(3.

0/2.

1)

> 2

4.95

Ht

<=

24.

95

Surv

<=

5.0

2

Vig> 5

.02

low

(3.

0/2.

1)

<=

85

good

(2.

0/1.

0)

> 8

5

aver

age

(4.

0/1.

2)

<=

2.6

DB

H

> 2

.6

aver

age

(4.

0/2.

2)

<=

7.7

PMC

no

> 7

.7

Brn

ch_F

m<=

257

5

Ht> 2

575

good

(11

.1/1

.5)<

= 3

.4 D

BH>

3.4

good

(3.

0/1.

1)<=

13.

26

aver

age

(3.

1/2.

2)

> 1

3.26

aver

age

(3.

0/1.

1)

<=

10.

53

good

(2.

0/1.

0)

> 1

0.53

low

(3.

0/2.

1)

<=

8.7

5

DB

H

> 8

.75

good

(3.

0/1.

1)

<=

20.

57 av

erag

e (

2.0/

1.0)

> 2

0.57

aver

age

(4.

0/2.

2)

<=

3.7

good

(2.

0/1.

0)

> 3

.7 go

od (

2.0/

1.8)

<=

2.4

DB

H

> 2

.4

aver

age

(7.

0/1.

3)

<=

10.

6

Stem

_Fm

> 1

0.6

best

(3.

0/2.

1)> 3

.4

DB

H

<=

3.4

good

(2.

0/1.

0)<=

11.

2

Stem

_Fm

> 1

1.2

aver

age

(7.

0/3.

4)<=

3.2

good

(2.

0/1.

0)

> 3

.2

aver

age

(4.

0/1.

2)

<=

8.4

2

good

(8.

3/4.

8)

> 8

.42

aver

age

(8.

0/3.

4)

<=

2.6

low

(4.

0/1.

2)

> 2

.6

low

(3.

0/1.

1)

<=

46

Ht

> 4

6

aver

age

(4.

0/1.

2)

<=

9.5

2

good

(2.

0/1.

0)

> 9

.52

aver

age

(4.

0/3.

1)

> 3

.4

Cro

wn_

Fm

<=

3.4

low

(5.

0/1.

2)

<=

3.4

aver

age

(4.

0/2.

2)

> 3

.4 lo

w (

4.0/

2.2)

<=

5.3

5

PMC

no

> 5

.35

aver

age

(7.

0/1.

3)

> 1

825

DB

H

<=

182

5

good

(2.

0/1.

0)<=

11.

62 be

st (

2.0/

1.8)

> 1

1.62

none

(2.

5/1.

1)

<=

4.1

low

(2.

5/1.

5)

> 4

.1

good

(2.

0/1.

8)

<=

10

Brn

ch_F

m

> 1

0

aver

age

(10

.0/2

.4)

<=

3.4

DB

H

> 3

.4

good

(4.

0/1.

2)

> 1

0.9

Ht

<=

10.

9

aver

age

(6.

0/2.

3)<=

10.

53 go

od (

2.0/

1.0)

> 1

0.53

aver

age

(5.

0/1.

2)

<=

11.

66

DB

H

> 1

1.66

best

(2.

0/1.

0)

<=

13.

67 go

od (

11.3

/5.0

)

> 1

3.67

low

(5.

0/1.

2)

<=

14.

69

aver

age

(2.

0/1.

0)

> 1

4.69

Ht<

= 2

.8

Vig

> 2

.8

good

(57

.7/3

0.8)

> 6

.76

PMC

no

<=

6.7

6

aver

age

(4.

0/1.

2)

<=

257

5

low

(3.

0/1.

1)

> 2

575

Sp

<=

4.2

Cro

wn_

Fm

> 4

.2

good

(11

.9/3

.5)

= c

o

good

(19

.0/7

.0)

= f

r

good

(0.

0)

= m

a

good

(7.

0/1.

3)

= n

i

good

(1.

0/0.

7)

= r

d

good

(3.

0/2.

1)

= s

i

good

(1.

0/0.

7)

= m

n

good

(0.

0)

= a

g

good

(0.

0)

= b

xs

best

(1.

0/0.

8)

= b

r

aver

age

(3.

0/2.

1)

= e

l

aver

age

(1.

0/0.

8)

= jo

good

(0.

0)

= k

a

good

(0.

0)

= s

m

good

(0.

0)

= r

o

good

(0.

0)

= n

c

good

(0.

0)

= c

r

good

(2.

0/1.

8)

= p

a

none

(1.

6/0.

9)

= r

a

none

(0.

9/0.

7)

= te

PMC

no

= n

d

Brn

ch_F

m

= o

b

Vig

= o

v

DB

H

= p

u

Surv

= f

a

DB

H

= r

e

PMC

no

= a

m

good

(6.

1/1.

3)> 2

575

Ht

<=

257

5

best

(2.

9/2.

0)> 1

2.15

Vig<

= 1

2.15

good

(3.

1/1.

2)<=

3.3

Brn

ch_F

m

> 3

.3

good

(3.

1/1.

2)

<=

2.6

best

(10

.4/4

.0)

> 2

.6

best

(3.

0/2.

1)

<=

2.6

Ins_

res

> 2

.6

best

(3.

0/2.

1)

<=

2.8

good

(12

.0/2

.5)

> 2

.8

good

(4.

0/3.

1)

<=

3.7

DB

H> 3

.7

good

(2.

0/1.

0)

> 2

7.4

Cro

wn_

Fm

<=

27.

4

good

(2.

0/1.

0)

<=

3.1

best

(4.

0/1.

2)

> 3

.1

best

(5.

0/2.

3)

<=

19.

67

good

(3.

8/2.

9)

> 1

9.67

best

(2.

0/1.

0)

<=

55

good

(6.

0/1.

2)

> 5

5

best

(3.

0/2.

1)

> 2

4.95

Brn

ch_F

m

<=

24.

95

PMC

no

<=

3.7

Surv

> 3

.7

good

(12

.7/2

.1)>

208

8 PMC

no<=

208

8

good

(2.

1/1.

1)<=

152

5 best

(2.

1/1.

1)

> 1

525

good

(2.

0/1.

0)

<=

55

best

(4.

0/1.

2)

> 5

5

good

(5.

1/1.

3)

<=

197

8

best

(3.

8/2.

9)

> 1

978

DB

H<=

3.4

Stem

_Fm

> 3

.4

good

(19

.9/6

.9)

<=

38.

79 be

st (

3.0/

1.1)

> 3

8.79

good

(3.

1/1.

2)

<=

3.2

best

(38

.5/6

.8)

> 3

.2

Page 31: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

28

Graph 2 : Result 10Y

ear

none

(69

.0/1

.4)

> 1

983

Lat

itude

<=

198

3

good

(30

.0/1

9.3)

= 3

9__3

8

good

(24

.0/1

5.1)

= 3

9__0

0

good

(22

.0/1

1.1)

= 4

0__1

1

best

(70

.0/5

0.1)

= 3

9__5

0

good

(64

.0/3

3.3)

= 4

0__3

6

good

(53

.0/2

6.0)

= 4

1__0

8

good

(55

.0/3

1.0)

= 4

0__0

0

good

(0.

0)

= 3

9__4

3

good

(0.

0)

= 8

2__3

2

Abb

rev

= 4

0__5

7

Rep

= 4

1__1

2

Rep

= 4

1__1

6

low

(0.

0)

= C

ra

low

(0.

0)

= C

ly

low

(0.

0)

= N

ga

low

(0.

0)

= W

ai

low

(0.

0)

= W

ak

low

(45

.0/3

3.5)

= K

82

low

(0.

0)

= W

Sp

low

(0.

0)

= L

on

low

(0.

0)= P

uk

low

(0.

0)

= P

aw

low

(0.

0)

= M

or

low

(0.

0)

= W

en

low

(0.

0)

= W

Sh

Rep

= K

81

Rep

= K

83

Rep

= K

81a

low

(19

.0/1

2.9)

<=

1

best

(46

.0/3

6.4)

> 1

low

(18

.0/1

3.7)

> 2

Rep

<=

2

aver

age

(14

.0/1

0.6)<

= 1

good

(17

.0/1

2.7)

> 1

low

(14

.0/1

0.6)

<=

2

aver

age

(19

.0/1

1.0)

> 2

good

(24

.0/1

7.0)

<=

1

Rep

> 1

none

(25

.0/1

.3)

<=

2

low

(24

.0/1

8.9)

> 2

aver

age

(26

.0/1

7.2)

<=

1

good

(58

.0/4

2.8)

> 1

Page 32: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

29

Graph 3 : Result 12Y

ear

none

(69

.0/1

.4)

> 1

983

Vig<=

198

3

Vig

<=

2.3

Surv

> 2

.3

none

(43

.0/1

.4)<

= 1

.3

Ht>

1.3

Surv

<=

6.8

3 PMC

no> 6

.83

none

(11

.2/1

.5)

<=

14 St

em_F

m

> 1

4

none

(6.

0/1.

2)

<=

1

Brn

ch_F

m

> 1

low

(42

.8/1

5.7)

> 2

.1 D

BH<

= 2

.1

none

(5.

0/1.

2)

<=

6.2

PMC

no> 6

.2

low

(2.

0/1.

0)<=

257

3 none

(2.

0/1.

0)

> 2

573

none

(5.

0/2.

3)

> 2

568

Alti

tude

<=

256

8

aver

age

(2.

0/1.

0)

> 2

20 D

BH<

= 2

20

low

(26

.0/4

.9)

> 8

DB

H<=

8

low

(2.

0/1.

8)

<=

7.2

2

aver

age

(2.

0/1.

0)

> 7

.22

none

(19

.8/2

.2)

<=

5

Vig

> 5

PMC

no<=

3

Cro

wn_

Fm

> 3

Stem

_Fm

<=

136

2

Ht

> 1

362

good

(5.

0/3.

2)

> 3

.1

Stem

_Fm

<=

3.1

Ht

<=

1

Vig>

1

none

(2.

5/1.

1)

<=

4.1

low

(2.

5/1.

5)

> 4

.1

low

(10

.0/2

.4)

<=

2.8

PMC

no

> 2

.8

aver

age

(10

.0/2

.4)

<=

111

3

DB

H

> 1

113

low

(15

.0/5

.8)

<=

14.

6

aver

age

(3.

0/1.

1)

> 1

4.6

low

(9.

0/1.

3)

<=

3.7

4

Ht

> 3

.74

Surv<

= 1

0.25

DB

H

> 1

0.25

Yea

r

<=

60

Cro

wn_

Fm

> 6

0

DB

H

<=

198

0

PMC

no> 1

980

aver

age

(5.

4/2.

7)

<=

11.

3

good

(2.

8/1.

4)

> 1

1.3

low

(2.

0/1.

0)<=

152

5

Surv>

152

5

DB

H

<=

14

Ht>

14

low

(2.

0/1.

0)

<=

9.3

aver

age

(5.

0/2.

3)

> 9

.3

aver

age

(22

.0/2

.5)

> 5

.02

Rep

<=

5.0

2

low

(2.

0/1.

0)

<=

1

aver

age

(4.

0/1.

2)

> 1

PMC

no<=

3.2

Ins_

res

> 3

.2

good

(2.

6/1.

1)

<=

148

7

Ht> 1

487

good

(3.

0/2.

1)

> 8

.87

Yea

r<=

8.8

7

aver

age

(18

.0/3

.7)

<=

198

2

Rep

> 1

982

aver

age

(2.

0/1.

0)<=

1

low

(2.

0/1.

0)

> 1

DB

H<=

3.7

Rai

nfal

l

> 3

.7

good

(5.

6/1.

2)

> 1

5.11

Stem

_Fm

<=

15.

11

good

(3.

0/1.

1)

<=

2.8

Vig

> 2

.8

Rep

<=

2.7

DB

H

> 2

.7

aver

age

(4.

6/1.

8)

<=

1

low

(2.

0/1.

0)

> 1

good

(2.

0/1.

0)

<=

5.7

5

Ht

> 5

.75

good

(2.

0/1.

0)

> 8

.64

Surv<=

8.6

4

aver

age

(5.

0/1.

2)

<=

94

Ins_

res

> 9

4

aver

age

(3.

0/1.

1)<=

2.6

good

(5.

0/2.

3)

> 2

.6

good

(5.

0/1.

2)

<=

105

0

Surv

> 1

050

best

(2.

0/1.

0)

<=

94

good

(2.

0/1.

0)

> 9

4

DB

H<=

15.

31

Rai

nfal

l

> 1

5.31

best

(3.

0/1.

1)

> 1

5.2

Rep<=

15.

2

good

(6.

0/1.

2)

<=

2 be

st (

3.0/

2.1)

> 2

Ht<

= 1

080

Cro

wn_

Fm

> 1

080

best

(2.

0/1.

0)<=

10.

73

aver

age

(6.

0/1.

2)

> 1

0.73

aver

age

(2.

0/1.

0)

<=

2.5

Ins_

res

> 2

.5

Rep

<=

2.8

Ht>

2.8

aver

age

(3.

0/1.

1)

<=

1 In

s_re

s> 1

good

(5.

0/1.

2)

<=

2.6

aver

age

(2.

0/1.

0)

> 2

.6

good

(16

.0/3

.7)

<=

17.

49

best

(3.

0/2.

1)

> 1

7.49

Ins_

res

<=

2.8

Vig

> 2

.8

PMC

no

<=

2.1

Surv> 2

.1

aver

age

(2.

0/1.

0)

<=

257

5

low

(3.

0/1.

1)

> 2

575

Ht<

= 9

4

Brn

ch_F

m

> 9

4

aver

age

(5.

0/1.

2)

<=

7.3

Stem

_Fm

> 7

.3

good

(14

.8/4

.7)

> 2

.5

PMC

no

<=

2.5

best

(2.

0/1.

8)> 2

569

PMC

no

<=

256

9

aver

age

(3.

0/1.

1)

<=

125

9

Ht

> 1

259

aver

age

(2.

0/1.

0)

> 1

8.59

Ht

<=

18.

59

good

(10

.0/1

.3)

> 1

2.82

PMC

no

<=

12.

82

good

(2.

0/1.

0)

> 2

560

DB

H

<=

256

0

good

(2.

0/1.

0)

<=

12.

79

Vig> 1

2.79

aver

age

(4.

8/1.

2)> 3

.8

PMC

no

<=

3.8

good

(2.

0/1.

0)

<=

208

8 aver

age

(2.

0/1.

0)

> 2

088

best

(4.

2/1.

4)

<=

2.2

good

(3.

0/2.

1)

> 2

.2

Cro

wn_

Fm<=

4.5

Ht

> 4

.5

Vig

<=

3.2

Ins_

res

> 3

.2

Stem

_Fm

<=

3.7

PMC

no> 3

.7

aver

age

(2.

0/1.

0)

<=

2.6

Rep

> 2

.6

good

(7.

0/1.

3)

> 1

Alti

tude<=

1

aver

age

(2.

0/1.

0)

<=

180

good

(2.

0/1.

0)

> 1

80

Ht

<=

148

7

Rep

> 1

487

aver

age

(3.

0/2.

1)

<=

9.5

2

good

(3.

0/1.

1)

> 9

.52

good

(22

.0/4

.8)

<=

2

Alti

tude

> 2

best

(3.

0/1.

1)

<=

220

good

(2.

0/1.

0)

> 2

20

Alti

tude<=

2.1

Vig

> 2

.1

aver

age

(2.

0/1.

0)

<=

160

best

(3.

0/1.

1)

> 1

60

Cro

wn_

Fm<=

4.3

Stem

_Fm

> 4

.3

Alti

tude

<=

3.9

Ins_

res

> 3

.9

Vig

<=

100

DB

H> 1

00

good

(3.

0/1.

1)

> 3

.9 R

ep

<=

3.9

aver

age

(2.

0/1.

0)

<=

1 be

st (

2.0/

1.0)

> 1

best

(2.

0/1.

0)

> 4

1.87

Ins_

res

<=

41.

87

good

(41

.9/4

.9)

> 2

.8

Brn

ch_F

m

<=

2.8

good

(2.

0/1.

0)

<=

2.9

best

(7.

0/2.

4)

> 2

.9

good

(4.

0/2.

2)

<=

2.6

Map

_Ref

> 2

.6

good

(4.

0/13

7.0)

= N

135_

382/

137

good

(3.

8/98

5.0)

= N

116_

848/

985

good

(3.

0/58

6.0)

= N

145_

874/

586

best

(4.

0/95

7.0)

= N

142_

377/

957

best

(1.

0/30

0.0)

= N

162_

081/

300

good

(2.

0/62

5.0)=

N15

8_34

3/62

5

good

(2.

0/22

1.0)

= N

151_

912/

221

good

(0.

0)

= N

141_

295/

063

good

(0.

0)

= N

98_5

39/5

67

good

(0.

0)

= N

151_

922/

226

Surv=

N15

8_34

4/62

6

Stem

_Fm

= N

162_

097/

424

Rep

= N

166_

063/

197

PMC

no

= N

146_

273/

737

good

(3.

0/1.

1)

<=

43 PM

Cno> 4

3

best

(6.

0/1.

2)<=

208

8

Brn

ch_F

m

> 2

088

good

(3.

0/1.

1)

<=

3.7

best

(2.

0/1.

0)

> 3

.7

best

(2.

0/1.

0)

<=

2.6

good

(3.

0/1.

1)

> 2

.6

good

(3.

0/2.

1)

<=

2

best

(2.

0/1.

0)

> 2

good

(2.

0/1.

0)

> 2

575

Vig

<=

257

5

good

(3.

0/2.

1)

<=

3.3

best

(5.

0/1.

2)

> 3

.3

good

(3.

0/1.

1)

<=

3.4

best

(12

.9/1

.3)

> 3

.4

best

(16

.0/1

.3)

> 1

3.09

DB

H

<=

13.

09

good

(3.

0/1.

1)

> 2

1.8

PMC

no

<=

21.

8

best

(2.

0/1.

0)

> 2

435

PMC

no

<=

243

5

best

(6.

0/2.

3)

<=

178

6

good

(3.

0/1.

1)

> 1

786

Page 33: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

30

5. GRASS GRUBS AND DAMAGE RANKING

Data source R. J. TownsendAgResearchLincoln

Date received January, 1996

Assigned to Colleen Burrows, Research programmer

Data location /home/ml/datasets/Summer1995/grass_grub/REPORT/ggdr_orig.arff/home/ml/datasets/Summer1995/grass_grub/REPORT/ggdr.arff

5.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesGrass grubs are one of the major insect pests of pasture in Canterbury and can causesevere pasture damage and economic loss. Pastoral damage may occur periodicallyover wide ranging areas. Grass grub populations are often influenced by biotic factors(diseases) and farming practices (such as irrigation and heavy rolling). The objectiveof the report was to report on grass grub population and damage levels to provideobjective estimates of the annual losses caused by grass grubs.

Summary of original research resultsTwo studies were performed. The first from 1974 - 1985 which estimated the meanpopulation density of grass grubs in the month of August ranged from 42 - 109/m2.The highest densities were recorded for 1971 - 1981. The second study, 1986 - 1992reported that the mean population density in September ranged from 37 - 114/m2, withthe highest density occurring in 1989. Grass grub population density inAugust/September was compared with weather patterns and a significant correlationwas found with rainfall the preceding November. Average pasture damage over thecomplete period (1974 - 1992) was estimated as 8%. Peaks of 14, 20 and 12 %damage occurred in 1976, 1977 and 1981 in the first study and 15 and 18% damagepeaks occurred in 1989 and 1990 during the second study period. Significantrelationships were found between damage and grass grub density and between damageand autumn rainfall.

5.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

Page 34: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

31

ObjectiveTo find a relationship between grass grub number, irrigation, and damage ranking forthe period between 1986 and 1992.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Instance informationA few instances, especially in ‘damage_rankRJT’ and ‘dry_or_irr’, contained missingvalues and noise. The factors present are only a representation of all the featuresrequired to describe damage caused by grass grubs.

Original dataset : 173 instances.Final dataset : 155 instances.

Attribute informationNumber of attributes : nine.

The attributes are :1. Year_Zone

type : enumerated (20 values)values : 0c, 0f, 0m,..................9c, 9f, 9mmissing : 0

2. Yeartype : enumeratedvalues : 1986-1992missing : 0

3. striptype : integervalues : 1.0 - 10.0missing : 0

4. pk (paddock)type : integervalues : 0.0 - 5.0missing : 0

5. damage_rankRJT (R. J. Townsend’s ranking)type : integervalues : 0.0 - 5.0missing : 17

6. damage_rankALLtype : enumeratedvalues : 0.0 - 5.0missing : 5

7. GG_per_m2 (grass grubs per metre square)type : realvalues : 0.0 - 708.0missing : 12

8. dry_or_irrtype : enumeratedvalues : D (dryland), O (irrigated overhead), B (irrigated border dyke)

Page 35: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

32

missing : 69. zone

type : enumeratedvalues : F (foothills), M (midplain), C (coastal)missing : 0

Class informationThere has been one class created for this dataset.

GG_new1. low2. average3. high4. veryhigh

The distribution for the classes are :1. low 492. average 413. high 464. veryhigh 19

Data analysis procedureThe new class, GG_new, wasdetermined from the attributeGG_per_m2, calculating :

• low < 60• average < 130• high < 280;• veryhigh > 280

In all of the following C4.5 runs,the attributes ‘year’, ‘strip’, and‘paddock’ were not used. Theywere unable to predict any otherinstance than those within thetraining set.

Tests on the training set were :1. C4.5 was used with the class

GG_new and attributes:‘damage_rankRJT’‘damage_rankALL ‘‘dry_or_irr’‘zone’

2. C4.5 was run with GG_new asthe class and attributes :

‘dry_or_irr’‘zone’

Results

1. The simplified (pruned) decision treewas :

size : 15(nodes) with 43.2% errorsdominant attributes :

‘damage_rankRJT’‘damage_rankALL’

2. The simplified decision tree was :size : 7 with 54.8% errors.dominant attributes :

‘zone’‘dry_or_irr’

Page 36: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

33

The data was split so that thoseirrigated (O or B) are classified asaverage, then of the dry plots, thefoothills have low grass grubs andthe coastal have high grass grubs.

3. C4.5 was then run with‘damage_rankRJT’ as the classand attributes :

‘damage_rankALL’‘dry_or_irr’‘zone’‘GG_new’

4. C4.5 was then run with‘damage_rankRJT’ as the classand attributes :

‘GG_per_m2’‘dry_or_irr’‘zone’

5. C4.5 was run with‘damage_rankALL’ as the classwith attributes :

‘damage_rankRJT’‘dry_or_irr’‘zone’‘GG_new’

6. C4.5 was run with‘damage_rankALL’ as the classwith attributes :

‘GG_per_m2’‘dry_or_irr’‘zone’

3. The simplified decision tree was :size : 21 with 39.4% errorsdominant attributes :

‘damage_rankALL’‘GG_new’‘dry_or_irr’.

4. The simplified decision tree wassize : 60 with 43.2% errorsdominant attributes :

‘GG_per_m2’‘dry_or_irr’ ‘zone’

5. The simplified decision tree wassize : 10 with 40.6% errors.dominant attributes :

‘damage_rankRJT’‘GG_new’

6. The simplified decision tree wassize : 59 with 43.2% errorsdominant attributes :

‘GG_per_m2’

The three best results are presented at the end of this analyses.

5.3 Discussion of resultsSmall decision trees were created that show that the damage ranking of both RJT and ALLwere related to the number of grass grubs. The zones and irrigation methods did not seem toplay a consistent role in determining either the number of grass grubs when used with thedamage rank attributes. However, when GG_new was used as the class with only ‘zone’ and‘dry_or_irr’, C4.5 was able to separate the irrigated paddocks from the dry paddocks. Wheneither of the damage rank attributes were used as a class, the other damage rank attribute wasthe most contributing one to the tree. This demonstrates that the rankings are similar. When

Page 37: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

34

using one of the damage rank attributes as the class without the other damage rank attributespresent, the tree is very large with the number of grass grubs playing the most significant rolein determining the rank. In all decision trees, there are a large number of errors whichquestions the validity of the trees.

5.4 ConclusionOn the outset this dataset seemed to be quite favourable to machine learning since it hasattributes which can be easily used as a class without any discretisation. However, eventhough the decision trees that were created were generally quite small they had a high numberof errors. The high error counts are more likely to be due to the number of missing values for‘damagerankRJT’ and ‘damagerankALL’. The smaller trees can be accounted for by thenumber of attributes used in the dataset. In general, the smaller number of attributes producea smaller tree (depending on the information contained within each dataset). Smaller errorcounts may have been found if all the types were enumerated into groups of between five toseven values.

Reference : Townsend R. J., Jackson T. A., Pearson J. F., French R. A. (1993) Grass GrubPopulation Fluctuations and Damage in Canterbury, Proc. 6th AustralasianGrasslands Invert. Ecol. Conf. 1993, R. A. Prestidge, Ed.)

Page 38: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

35

Graph 1 : Result 5

dam

age_

rank

RJT

0 (2

2.0/

8.1)

= 0

1 (3

6.0/

15.6

)

= 1

3 (3

4.0/

17.5

)= 3

4 (1

6.0/

6.9)

= 4

4 (1

2.0/

8.6)

= 5

GG

_new

= 2

1 (1

2.0/

7.7)

= lo

w

2 (8

.0/5

.4)=

high

2 (1

1.0/

6.6)

= av

erag

e

1 (4

.0/2

.2)

= ve

ryhi

gh

Page 39: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

36

Graph 2 : Result 2

zone

low

(43

.0/1

8.0)

= M dr

y_or

_irr

= F

dry_

or_i

rr

= C

low

(69

.0/4

9.0)

= D

high

(2.

0/1.

0)

= O

low

(0.

0)

= B

high

(28

.0/1

2.0)

= D

aver

age

(11

.0/5

.0)

= O

aver

age

(2.

0)

= B

Page 40: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

37

Graph 3 : Result 1da

mag

e_ra

nkR

JT

low

(22

.0/7

.0)

= 0

high

(34

.0/2

1.4)

= 3

high

(16

.0/9

.8)= 4

dam

age_

rank

AL

L

= 1

zone

= 2

zone

= 5

low

(6.

0/2.

3)

= 0

low

(5.

0/4.

1)

= 2

aver

age

(1.

0/0.

8)

= 3

aver

age

(1.

0/0.

8)= 4

low

(0.

0)

= 5

zone

= 1

aver

age

(13

.0/8

.7)

= F

low

(5.

0/2.

3)

= M

aver

age

(5.

0/3.

2)

= C

low

(10

.0/3

.5)

= M

aver

age

(10

.0/6

.5)

= C

dam

age_

rank

AL

L

= F

high

(0.

0)

= 0

very

high

(6.

0/4.

3)

= 1 high

(7.

0/5.

3)

= 2

aver

age

(1.

0/0.

8)

= 3

very

high

(1.

0/0.

8)

= 4

high

(0.

0)

= 5

very

high

(5.

0/3.

2)= F

high

(4.

0/3.

1)

= M

high

(3.

0/1.

1)

= C

Page 41: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

38

6. GRASS GRUBS AND RAINFALL

Data source David SavilleAgResearchLincoln

Date received December 1995

Assigned to Colleen Burrows, Research programmer

Data location /home/ml/datasets/Summer1995/grass_grub/REPORT/original.arff/home/ml/datasets/Summer1995/grass_grub/REPORT/ggr.arff

6.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesGrass grubs are one of the major insect pests of pasture in Canterbury and can causesevere pasture damage and economic loss. Pastoral damage may occur periodicallyover wide ranging areas. Grass grub populations are often influenced by biotic factors(diseases) and farming practices (such as irrigation and heavy rolling). The objectiveof the report was to report on grass grub population and damage levels to provideobjective estimates of the annual losses caused by grass grubs.

Summary of original research resultsTwo studies were performed. The first from 1974 - 1985 which estimated the meanpopulation density of grass grubs in the month of August ranged from 42 - 109/m2.The highest densities were recorded for 1971 - 1981. The second study, 1986 - 1992reported that the mean population density in September ranged from 37 - 114/m2, withthe highest density occurring in 1989. Grass grub population density inAugust/September was compared with weather patterns and a significant correlationwas found with rainfall the preceding November. Average pasture damage over thecomplete period (1974 - 1992) was estimated as 8%. Peaks of 14, 20 and 12 %damage occurred in 1976, 1977 and 1981 in the first study and 15 and 18% damagepeaks occurred in 1989 and 1990 during the second study period. Significantrelationships were found between damage and grass grub density and between damageand autumn rainfall.

Page 42: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

39

6.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo find relationships between the number of grass grubs present and the amount ofrain that occurred in November, Summer, and Autumn or the percentage damage to anarea and the amount of rain that occurred in November, Summer, and Autumn.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Instance informationThere were no missing values. The factors present are only a representation of all thefeatures required to describe grass grubs in relation to rain or percentage damage inrelation to rain in the months of November, Summer, and Autumn.

Original dataset : 19 instances.Final dataset : 19 instances.

Attribute informationNumber of attributes : six.

The attributes are :1. year

type : enumeratedvalues : one value for every instance represented by yearmissing : 0

2. gg_per_m2 (grass grubs per metre square)type : realvalues : 37.0 - 114.0missing : 0

3. pct_damage (percent damage)type : realvalues : 2.8 - 19.9missing : 0

4. nov_raintype : realvalues : 12.0 - 119.0missing : 0

5. summer_raintype : realvalues : 98.0 - 308.0missing : 0

6. autumn_raintype : realvalues : 107.0 - 365.0missing : 0

Page 43: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

40

Class informationTwo class values were created for this dataset

‘gg_new’1. low2. below_avg3. above_avg4. high

‘pct_dam_new’1. low2. below_avg3. above_avg4. high

The distribution of the classes are :‘gg_new’1. low 42. below_avg 43. above_avg 54. high 6

‘pct_dam_new’1. low 52. below_avg 63. above_avg 34. high 5

Analysis with 1Rw produced the following results :‘gg_new’default class : ‘high’ with 6/19best hypotheis : ‘Year’ with 100% accuracy.

‘pct_dam_new’default class : ‘below_avg’ with 6/19best hypothesis : ‘Year’ with 100% accuracy.

Data analysis procedure

Two new enumerated attributeswere made

‘gg_new’ was created from‘gg_per_m2’ with :

• low < 50• below_avg < 75• above_avg < 90• high > 90

Results

Page 44: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

41

‘pct_dam_new’ was createdfrom ‘pct_damage’ with :

• low < 5.5• below_avg < 7.2• above_avg < 10• high > 10

1. C4.5 was run with ‘gg_new’ asthe class and attributes

‘pct_damage’‘nov_rain’‘summer_rain’‘autumn_rain’.

1. The simplified decision tree wassize 7 (nodes) 26.3% errorsdominant attributes were

‘autumn_rain’ (dividing at 165)and ‘pct_damage’ (dividing at8.9 and at 5.2).

2. C4.5 was run with ‘gg_new’ asthe class and attributes :

‘nov_rain’‘summer_rain’‘autumn_rain’.

3. C4.5 was run with‘pct_dam_new’ as the class andattributes :

‘gg_per_m2’‘nov_rain’,‘summer_rain’‘autumn_rain’.

4. C4.5 was run with‘pct_dam_new’ as the class andattributes :

‘nov_rain’,‘summer_rain’‘autumn_rain’.

2. The simplified tree hadsize : 11 26.3% errorsdominant attribute :

‘autumn_rain’

3. The simplified decision tree wassize : 11 21.15% errorsdominant attributes :

‘gg_per_m2’‘nov_rain‘autumn_rain’

4. The simplified decision tree wassize : 9 26.3% errorsdominant attribute :

‘autumn_rain’

The three best results are presented at the end of this analyses.

6.3 Discussion of resultsGrass grubs per metre square and percent damage are related as each appears in the tree of theother at a high position. The trees are not very accurate (21.1 and 26.3% errors) which isprobably due to the small number of instances available.

Page 45: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

42

6.4 ConclusionThe errors remained consistent for three decision trees which may indicate that splitting (errorlevels) occurs only on one attribute. Presenting the ‘rain’ values as enumerated types betweenfive and seven values may have achieved fewer errors. No data was missing so the datasetmade a good training set. However, the small number of instances in the dataset produceresults which are too general. A larger dataset would make the results more feasible. Thesmall number of attributes probably contributed to the small decision trees which were easy toread.

Reference : Townsend R. J., Jackson T. A., Pearson J. F., French R. A. (1993) Grass GrubPopulation Fluctuations and Damage in Canterbury, Proc. 6th AustralasianGrasslands Invert. Ecol. Conf. 1993, R. A. Prestidge, Ed.)

Page 46: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

43

Graph 1 : Result 3

GG

_per

_m2

high

(3.

0/1.

1)> 9

6

GG

_per

_m2

<=

96

GG

_per

_m2

<=

62

Nov

_Rai

n

> 6

2

low

(4.

0/2.

2)

<=

46

abov

e_av

g (

3.0/

2.1)

> 4

6

belo

w_a

vg (

5.0/

2.3)

> 5

1

Aut

umn_

Rai

n

<=

51

high

(2.

0/1.

0)

<=

175

abov

e_av

g (

2.0/

1.8)

> 1

75

Page 47: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

44

Graph 2 : Result 1

Aut

umn_

Rai

n

Pct_

Dam

age<=

165

Pct_

Dam

age

> 1

65

belo

w_a

vg (

5.0/

1.0)

<=

8.9

high

(4.

0/1.

0)

> 8

.9

low

(4.

0/1.

0)

<=

5.2

abov

e_av

g (

6.0/

2.0)

> 5

.2

Page 48: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

45

Graph 3 : Result 4

Aut

umn_

Rai

n

low

(2.

0)> 3

47

Nov

_Rai

n

<=

347

low

(3.

0/1.

0)> 7

5

Nov

_Rai

n

<=

75

belo

w_a

vg (

6.0/

2.0)

> 5

9

Nov

_Rai

n

<=

59

belo

w_a

vg (

2.0)<=

30

high

(6.

0/2.

0)

> 3

0

Page 49: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

46

7. GROWER QUESTIONNAIRE

Data source Matthew LaurensonHort ResearchBatchelor Research CentrePalmerston North

Report date January 1996

Assigned to Colleen Burrows, Research programmer

Data location /home/ml/datasets/Summer1995/survey/spotchec.arff

7.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesThe original objective differs from the machine learning objective quite significantly.The original objective was to collect data about grower practices and weatherconditions with regard to fruit size and quality and to predict from this data thesoftware buying intentions of either growers or consultants in this field.

The class attribute should indicate the person filling out survey (grower or consultant)and the other attributes should describe how much money, out of $100, would beallotted for software concerning the various issues implied by the attribute name.

The data was collected via a survey.

Summary of original research resultsThe original research results are currently unknown.

7.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo find some relationships which would indicate that the respondent was either agrower or a consultant depending on the answers given in the survey.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Page 50: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

47

Instance informationNone of the instances contained missing values. The factors present are only arepresentation of all the features required to describe software buying intentions ofeither growers or consultants.

Original dataset : 22 instances.Final dataset : 22 instances.

Attribute informationNumber of attributes : 15 (14 actual attributes plus one predefined class).

The attributes are :1. Class

type : enumeratedvalues : G (grower), C (consumer)missing : 0

2. Ascosporetype : integervalues : 0.0 - 30.0missing : 0

3. Experttype : integervalues : 0.0 - 30.0missing : 0

4. Additional_Elementstype : integervalues : 0.0 - 50.0missing : 0

5. Replantingtype : integervalues : 0.0 - 0.0missing : 0

6. Fireblighttype : integervalues : 0.0 - 25.0missing : 0

7. ERMtype : integervalues : 0.0 - 35.0missing : 0

8. Chemical_Thinningtype : integervalues : 0.0 - 40.0missing : 0

9. Fruit_Sizetype : integervalues : 0.0 - 25.0missing : 0

Page 51: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

48

10. GDD_Calctype : integervalues : 0.0 - 22.0missing : 0

11. Forecasttype : integervalues : 0.0 - 100.0missing : 0

12. Weather_datatype : integervalues : 0.0 - 45.0missing : 0

13. Frosttype : integervalues : 0.0 - 18.0missing : 0

14. Nutritiontype : integervalues : 0.0 - 25.0missing : 0

15. Safetytype : integervalues : 0.0 - 12.0missing : 0

Class informationFor both datasets there are three class values.

1. G (grower)2. C (consumer)

The distribution of the classes are :1. G (grower) 162. C (consumer) 6

1Rw analysis on the dataset produced the following results :default class : ‘G’ with 16/22best hypothesis : ‘ERM’ with 81% accuracy.

Data analysis procedure

1. C4.5 was run using the ‘class’attribute as the class with allother attributes.

Results

1. The simplified decision tree was :size : 9 (nodes) with 4.5% (error)dominant attributes :c‘Ascospore’‘Chemical_Thinning’‘Weather_data’‘GDD_Calc’.

Page 52: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

49

The results are presented at the end of this analyses.

7.3 Discussion of resultsA small decision tree that accurately describes the buying patterns of growers and consultantswas created.

7.4 ConclusionThis data set had a class value that is already enumerated which makes it easy to use withmachine learning. Both the results and the tree size were suitable for machine learning.However, the size of the data set may indicate bias in the results. A larger dataset mayproduce significantly different results. The error count may be contributed to an answer thatwas not consistent with other relationships formed with that particular attribute (GDD_calc).

Page 53: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

50

Graph 1 : Result 1

ERM

G (1

8.0/

4.8)<=

20

C (4

.0/2

.2)

> 20

Page 54: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

51

8. PASTURE PRODUCTION

Data source Dave BarkerAgResearch GrasslandsPalmerston North

Report date December, 1995

Assigned to Stephen Garner, Research programmer

Data location /home/ml/datasets/Summer1995/pasture_production/REPORT/results.arff

8.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo predict pasture production from a variety of biophysical factors. Vegetation andsoil variables areas of grazed North Island hill country with different management(fertiliser application/stocking rate) histories (1973 - 1994) were measured andsubdivided into 36 paddocks. Nineteen vegetation (including herbage production); soilchemical, physical and biological; and soil water variables were selected as potentiallyuseful biophysical indicators.

Summary of original research resultsAnalysis of the results for these variables suggested that pasture botanical composition(especially content of high-fertility responsive grasses and of herbaceous weed species)and earthworm mass/unit area explained most of the variance of the produced datamatrix. These variables were also highly correlated with herbage production, anindicator of likely economic performance.

8.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo predict pasture production from a variety of biophysical factors.

The original dataset has been sent but also includes a new variable, leaf phosphorousconcentration (ug/g). The data provider requested that analysis be performedincluding this attribute as a separate test.

Page 55: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

52

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Instance informationThe dataset is small and contains no missing values. The factors present are only arepresentation of all the features required to describe pasture production.

Final dataset : 36 instances.

Attribute informationNumber of attributes : 25 (24 actual attributes plus one predefined class).

The attributes are :1. paddock_id (paddock identification number)

type : integervalues : 1.0 - 36.0missing : 0

2. pasture-prod-num (pasture production)type : integervalues : 3067.0 - 11,904.0missing : 0

3. pasture-prod-class (class variable)type : enumeratedvalues : LO, MED, HImissing : 0

4. Fertilisertype : enumeratedvalues : LL, LN, HN, HHmissing : 0

5. Slopetype : integervalues :7.0 - 33.0missing : 0

6. Aspect (deviation from north-west)type : integervalues : 17.0 - 172.0missing : 0

7. OlsenPtype : integervalues : 5.0 - 42.0missing : 0

8. MinNtype : integervalues : 162.0 - 409.0missing : 0

9. TStype : integervalues : 175.0 - 655.0missing : 0

Page 56: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

53

10. Ca:Mg (Calcium Magnesium ratio)type : realvalues : 2.22 - 6.36missing : 0

11. LOM (g/100g)type : realvalues : 1.3 - 3.7missing : 0

12. NFIX meantype : realvalues : 0.012 - 0.229missing : 0

13. Eworms (main 3 spp - g/m2)type : realvalues : 0.0 - 285.7missing : 0

14. Eworms (number of spp)type : integervalues : 1.0 - 5.0missing : 0

15. KUnSat (mm/hr)type : realvalues : 4.4 - 57.3missing : 0

16. OMtype : realvalues : 5.5 - 11.7missing : 0

17. Air-Permtype : realvalues : 2.63e-13 - 1.03e-11missing : 0

18. Porositytype : realvalues : 0.126 - 0.212missing : 0

19. HFRG% (mean)type : realvalues : 1.31 - 57.26missing : 0

20. legume-yield (kgDM/ha)type : realvalues : 26.4 - 642.7missing : 0

21. OSPP% (mean)type : realvalues : 1.19 - 19.07missing : 0

Page 57: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

54

22. Jan-Mar-mean-TDRtype : realvalues : 18.0 - 39.3missing : 0

23. Annual-Mean-Runoff (mm)type : realvalues : 578.9 - 893.5missing : 0

24. root-surface-area (m2/m3)type : realvalues : 56.2 - 520.6missing : 0

25. Leaf-P (ppm)type : realvalues : 1162.0 - 3993.0missing : 0

Class informationThe datasets contained one class (pasture-prod-class) which has three class values :

1. LO (12 lowest values)2. MED (12 intermediate values)3. HI (12 highest values)

The class values were assigned arbitrarily by the data provider.

The distribution of the classes are :1. LO 122. MED 123. HI 12

Analysis with 1Rw produced the following results :default class : ‘LO’ with 12/36best hypothesis : ‘pasture-prod-num’ with 100% accuracy

Data analysis procedure

Two original attributes werealtered; ‘Ca:Mg’ was multiplied by20 and numbers in ‘AirPerm’ wereconverted from scientific notationto decimal notation.

Results

Page 58: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

55

1. C4.5 was run using ‘pasture-prod-class’ as the class with allattributes except :

‘paddock_id’,‘pasture-prod-num’‘Air-Perm’‘Leaf-P’

1. The decision and simplified trees were :size : 9 with 2.8% errors.dominant attributes :

‘HFRG%mean’,‘Leaf-P’,‘legume-yield’‘Eworms-main-3’

2. C4.5 was run using ‘pasture-prod-class’ as the class with allattributes except :

‘paddock_id’,‘pasture-prod-num’‘Air-Perm’(‘Leaf-P’ was included this

time)

2. The decision and simplified trees were :size : 9 with 2.8% errors.dominant attributes :

‘HFRG%mean’‘NFIX-mean’‘Eworms-main-3’‘legume-yield’.

The results are presented at the end of this analyses.

8.3 Discussion of resultsSmall decision trees were produced that describe possible ways of classifying pastureproduction. It is interesting that when ‘Leaf-P’ is removed, the resulting tree is quite similarwith ‘NFIX-mean’ almost replacing ‘Leaf-P’ with ‘Eworms-main-3’ and ‘legume-yield’swapping positions.

8.4 ConclusionThe type of data was suitable for machine learning analyses, but the size of the dataset was toosmall to get any results that can be definitely accurate. The results that have been found couldbe too pronounced. Analysis with more instances could create a different result.

Follow up notesDave Barker felt that the classification was good.

Reference : Lambert M. G., Barker D. J., MacKey A. D., Springett J. A. (1995) Biophysicalindicators of sustainability of North Island hill pasture systems. Proceeding of the NewZealand Grassland Association, Vol 57.

Page 59: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

56

Graph 1 : Result 1

HFR

G-p

ct-m

ean

HI

(12

.0)> 2

8.96

NFI

X-m

ean

<=

28.

96

ME

D (

7.0)>

0.0

65 E

wor

ms-

mai

n-3

<=

0.0

65

ME

D (

2.0)>

159

legu

me-

yiel

d

<=

159

LO

(13

.0/1

.0)

<=

267

.7 M

ED

(2.

0)

> 2

67.7

Page 60: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

57

Graph 2 : Result 2

HFR

G-p

ct-m

ean

HI

(12

.0)> 2

8.96

Lea

f-P

<=

28.

96

ME

D (

8.0)>

202

5

legu

me-

yiel

d

<=

202

5

ME

D (

2.0)>

267

.7 E

wor

ms-

mai

n-3

<=

267

.7

LO

(11

.0)<

= 1

19 ME

D (

3.0/

1.0)

> 1

19

Page 61: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

58

9. PEA SEED COLOUR

Data source John McCallumCrop & Food ResearchChristchurch

Report date January 1996

Assigned to Stuart Yeates, Research programmer

Data location /home/ml/datasets/Summer1995/pea/REPORT/original.arff/home/ml/datasets/Summer1995/pea/REPORT/results.arff

9.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo optimise a pea transformation method (ie. putting foreign DNA into them) byworking out the optimum stage for taking pods. An objective method for getting thebest pods is sought. This is based on going out to the field and getting a big pile ofpods and classifying them into either ‘yes’ or ‘no’ piles. Video image analyses is notsuitable and the pods should not have to be opened.

Summary of original research resultsA dataset has been produced from the methods used above. Any analysis results arenot known at this particular time.

9.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo classify pea pods as ‘good’ or ‘bad’ using attributes about the visual aspects of thepods. The results from machine learning will be compared to the more conventionalanalysis procedures such as statistical analysis. The results gained from machinelearning will be used to extract information anout the rules used by judges to classifythings (like peapods).

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Instance information

Page 62: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

59

There are no missing values. The factors present are only a representation of all thefeatures required to describe classification or pea seed colour.

Original dataset : 51 instances.Final dataset : 51 instances.

Attribute informationNumber of attributes : 15 (14 actual attributes plus one predefined class).

The attributes are :1. Code (id number for each pod)

type : enumeratedvalues : 0 - 50missing : 0

2. Status (visual classification)type : enumeratedvalues : 1 (yes), 0 (too young)missing : 0

3. Shapetype : realvalues : 67.86 - 81.16missing : 0

4. Heighttype : realvalues : 163.0 - 335.0missing : 0

5. Lengthtype : realvalues : 278.0 - 553.61missing : 0

6. Breadthtype : realvalues : 82.16 - 167.26missing : 0

7. Width (pod width)type : realvalues : 181.0 - 471.0missing : 0

8. Diam45 (pod diameter)type : realvalues : 210.01 - 542.35missing : 0

9. Diam135 (pod diameter)type : realvalues : 70.71 - 388.91missing : 0

10. Red (tristimulus computer RGB measures of pod colour)type : realvalues : 166.64 - 178.81missing : 0

Page 63: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

60

11. Green (tristimulus computer RGB measures of pod colour)type : realvalues : 46.75 - 59.52missing : 0

12. Blue (tristimulus computer RGB measures of pod colour)type : realvalues : 46.75 - 59.52missing : 0

13. Y (transform of red)type : realvalues : 133.831 - 149.339missing : 0

14. U (transform of green)type : realvalues : -99.7988 - -81.3821missing : 0

15. V (transform of blue)type : realvalues : 21.1393 - 29.4712missing : 0

Class information‘Status’ is only one class value :

1. 0 (too young)2. 1 (yes)

The distribution of the classes are :1. 162. 35

Analysis with 1Rw indicated the following results :default class : ‘1’ with 35/51best hypothesis : ‘Shape’ with 80% accuracy.

Data analysis procedure1. C4.5 was run using ‘Status’ as

the class and all attributesexcept ‘Code’.

Results1. The simplified decision tree was :

size : 7 nodes with 18% errorsdominant attributes are :

‘v’‘Blue’‘Width’‘u’‘Diam’

The results are presented at the end of this analyses.

Page 64: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

61

9.3 ConclusionC4.5 was able to find a small decision tree with few errors from this data, mainly because ithas a clearly defined goal that is approachable from a machine learning point of view. Also,the class attribute was given as an enumerated (binary) value so (no false classes needed to becreated). There was no missing data, which made the level of noise and errors low.

Page 65: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

62

Graph 1 : Result 1v

1 (

16.0

)> 2

4.71

39

Blu

e

<=

24.

7139

1 (

9.0)

> 5

3.23

Wid

th

<=

53.

23

1 (

3.0)

<=

335

u> 3

35

1 (

3.0)> -

84.3

158

u

<=

-84

.315

8

1 (

2.0)<=

-90

.897

8

Wid

th

> -

90.8

978

0 (

12.0

)> 3

73

Dia

m13

5

<=

373

0 (

4.0)<=

156

.27

1 (

2.0)

> 1

56.2

7

Page 66: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

63

10. SLUGS

Data source Neil CoxAgResearch RuakuraHamilton

Date received October 1995

Assigned to Colleen Burrows, Research programmerJames Littin, Research programmer

Data location /home/ml/datasets/Summer1995/slug/REPROT/origianl.arff/home/ml/datasets/Summer1995/slug/REPORT/s9_results.arff/home/ml/datasets/Summer1995/slug/REPORT/s10_results.arff

10.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo detect in the data when a new bucket of slugs was used and when the weightmeasurements were taken wrong.

Summary of original research resultsThe results of the original research are currently unknown.

10.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo detect in the data when a new bucket of slugs was used and when the weightmeasurements were taken wrong. There were two problems in the dataset that we triedto detect with the machine learning tools :

1. Two buckets of slugs were used; larger slugs were supposedly measuredfirst. Could we detect the trend of slugs getting smaller gradually and thenan abrupt increase when a new bucket was used

2. We were informed that for part of the experiment there was supposedlysome muck on the scale to make the values read higher than the actual slugweight

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Page 67: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

64

Instance informationThe data provided by the dataset contained no errors or obvious noise.

Original dataset : 100 instances.Final datasets : 100 instances.

Attribute informationNumber of attributes : two.

The attributes are :1. Length

type : realvalues : 10 - 94missing : 0

2. Weighttype : realvalues : 0.02-13.62missing : 0

A number of derived attributes were created. These attributes are :3. No (order of slug taken)

type : integervalues : 0.0 - 99.0missing : 0

4. Weight_enum (division at mean)type : enumeratedvalues : heavy, lightmissing : 0

5. Weight_enum2 (division at 0.6 and 1.4 of normalised weight)type : enumeratedvalues : verylight, light, heavymissing : 0

6. Length_enum (division at 0.6 and 1.4 of normalised length)type : enumeratedvalues : short, medium, longmissing : 0

7. w/13 (weight/length3, density)type : realvalues :missing :

8. w/13_enum (density)type : enumeratedvalues : small, bigmissing : 0

9. w/13_enum2 (density)type : enumeratedvalues : small, medium, largemissing : 0

Page 68: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

65

Class informationA number of class values were derived from the given dataset.

weight_enum1. heavy2. light

weight_enum21. heavy2. light3. verylight

length_enum1. long2. medium3. short

w/13_enum1. small2. big

w/13_enum21. small2. medium3. large

The distribution of the classes are :weight_enum1. heavy 312. light 69

weight_enum21. heavy 282. light 83. verylight 64

length_enum1. long 262. medium 403. short 34

w/13_enum1. small 662. big 34

w/13_enum21. small 182. medium 683. large 14

Page 69: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

66

Analysis with 1Rw produced the following results :weight_enumdefault class : ‘light’ with 69/100best hypothesis : ‘weight’ with 100% accuracy

weight_enum2default class : ‘verylight’ with 64/100best hypothesis : ‘weight’ with 100% accuracy

length_enumdefault class : ‘medium’ with 40/100best hypothesis : ‘length’ with 100% accuracy

w/13_enumdefault class : ‘small’ with 66/100best hypothesis : ‘length’ with 76% accuracy

w/13_enum2default class : ‘medium’ with 68/100best hypothesis : ‘length’ with 75% accuracy.

Data analysis procedure

The attribute ‘weight’ wasnormalised to make the mean at 1.0and a new attribute, ‘weight_enum’was created with a division at themean.

1. C4.5 was used with‘weight_enum’ as the class andthe ‘No’ (the order in which theslugs were measured) as theonly attribute.

Results

1. The simplified decision tree wassize 13 (nodes) with 7% errors

The decisions follow the trends found in agraph of weight vs slug number.

A new attribute, ‘weight_enum2’,was created which divided thenormalised weight attribute at 0.6and 1.4.

2. C4.5 was run with this as theclass and ‘No’ as the attribute.

2. The simplified decision tree wassize : 9 with 15% errorsdominant attributes were the lowest

and highest classes.

Page 70: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

67

This followed the curve, not quite asclosely as the previous tree, but it was stillable to predict the main point of where thenew bucket was used (at about slug #67).

Length was then used to try todetect when the bucket waschanged. A normalised attributefor length was created which wasdiscretised at the mean.

3. C4.5 was run using thisattribute, ‘length_enum’, as theclass and ‘No’ as the attribute.

3. A simplified decision tree wassize : 21 with 15% errors

This followed the curves of the graph oflength vs slug number, but it is a muchlarger tree than those found when weightwas used. Again, it found the instancewhere the bucket was changed was at slug67.

The problem of detecting when themuck arrived on the scales wasapproached by creating a newattribute of density, ‘w/l3’ whichwas discretised at the mean of 0.61.

4. C4.5 was used with‘w/l3_enum’ as the class and‘No’ as the only attribute.

4. The simplified decision tree was :size : 25 with 13% errors

A second density attribute wascreated that split the attribute intothree classes (small (less than 0.4),medium (less than 0.9), large(greater than 0.9).

5. C4.5 was run with this attributeas the class and ‘No’ as the onlyother attribute.

5. The simplified decision tree wassize : 11 with 22% errors.

It shows that the density starts out small,and increases to medium and large for therest of the values which could be a sign ofdetection of muck on the scales.

The results are presented at the end of this analyses.

Page 71: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

68

10.3 Discussion of resultsThe decision trees were larger than expected, but they did show what is present in the graphsie. C4.5 was able to pick out where the changes in data occurred.

10.4 ConclusionAlthough we were able to detect changes in the data, it is probably much easier to plot thevalues on a graph and use that for analysis. Since there are only two attributes, graphical orstatistical analysis would not be difficult.

Page 72: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

69

Graph 1 : Result 1

No

heav

y (

11.0

/1.3

)

<=

10

No

> 1

0

No

<=

66

No

> 6

6

light

(19

.0/1

.3)

> 4

7

No<

= 4

7

light

(34

.0/7

.1)

<=

44

heav

y (

3.0/

1.1)

> 4

4

heav

y (

12.0

/3.6

)

<=

78

No

> 7

8

light

(19

.0/1

.3)

<=

97

heav

y (

2.0/

1.0)

> 9

7

Page 73: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

70

Graph 2 : Result 2

No

heav

y (

11.0

/1.3

)

<=

10

No

> 1

0

heav

y (

3.0/

2.1)> 9

6

No

<=

96

very

light

(56

.0/1

3.7)

<=

66

No

> 6

6

heav

y (

12.0

/3.6

)<=

78

very

light

(18

.0/2

.5)

> 7

8

Page 74: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

71

11. SQUASH HARVEST

Data source Winna HarveyCrop & Food ResearchChristchurch

Report date February, 1996

Assigned to Kirsten Thomson, Research programmer

Data location /home/ml/datasets/Summer1995/Squash/REPORT/stored_results.arff/home/ml/datasets/Summer1995/Squash/REPORT/unstored_results.arff

11.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesThe purpose of the experiment was to determine the changes taking place in squashfruit during maturation and ripening so as to pinpoint the best time to give the bestquality at the market place (Japan). The squash is transported to Japan by refrigeratedcargo vessels (14oC) and takes three to four weeks after harvesting to reach themarket. Evaluations were carried out at a stage representing the quality inspectionstage prior to export and also at the stage it would reach on arriving at the marketplace.

Summary of original research resultsThese are unknown at the present time.

11.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo determine which pre-harvest variables contribute to good tasting squash afterdifferent periods of storage time. This is determined by whether a particular squashfell into the categories of unacceptable, acceptable, or excellent - based on the measureof acceptability.

Page 75: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

72

Dataset descriptionThe dataset descriptions include instance, attribute, and class information. The originaldataset contained four different categories for which data was collected. It was moremeaningful to divide the original dataset into these four datasets.

The four datasets are :1. stored training - stored fruit with an acceptability (sensory) rating2. unstored training - unstored fruit with an acceptability (sensory) rating3. stored testing - stored fruit without an acceptability (sensory) rating4. unstored testing - unstored fruit without an acceptability (sensory) rating.

Only the training sets have been analysed further. Inadequate information is providedto perform analysis on the testing sets.

Instance informationA high number of instances contained missing values and noise. The factors presentare only a representation of all the features required to describe

Original dataset : 261 instances.Unstored training : 52 instances.Stored training : 52 instances.

Attribute informationNumber of attributes : (original dataset) 24 attributes.Number of attributes : (unstored training dataset) 24 attributes.Number of attributes : (stored training dataset) 24 attributes.

The attributes are :Stored training1. site

type : enumeratedvalues : P, HB, LINCmissing : 0

2. daf (days after flowering)type : enumeratedvalues : 30, 40, 50, 60, 70missing : 0

3. fruitno (individual number of the fruit)type : enumeratedvalues : 1 - 23missing : 0

4. weight (of whole fruit in grams)type : realvalues : 1156.0 - 2872.0missing : 0

5. storewt (weight of fruit after storage)type : realvalues : 1067.0 - 2607.0missing : 0

Page 76: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

73

6. pene (penetrometer - indication of maturity at harvest)type : integervalues : 2.0 - 11.0missing : 0

7. solids_% (a dry matter test)type : integervalues : 13.0 - 30.0missing : 0

8. brix (a refractometer measurement - an indication of sweetness and/or ripeness)

type : integervalues : 7.0 - 15.0missing : 0

9. a* (the a* co-ordinate of the Hunterlab L* a* b* notation of colourmeasurement)

type : integervalues : 10.0 - 29.0missing : 0

10. egdd (the heat accumulation above a base of 8oC from emergence of the plant to harvest of the fruit)type : realvalues : 601.0 - 953.0missing : 0

11. fgdd (the heat accumulation above a base of 8oC from flowering to harvest)type : realvalues : 190.0 - 542.0missing : 0

12. groundspot_a* (number indicating colour of skin where the fruit rested on the ground)

type : integervalues : 7.0 - 19.0missing : 1

13. glucose (mg/100 grams fresh weight)type : integervalues : 4.0 - 24.0missing : 1

14. fructose (mg/100 grams fresh weight)type : integervalues : 4.0 - 20.0missing : 1

15. suctose (mg/100 grams fresh weight)type : integervalues : 4.0 - 46.0missing : 1

16. total (mg/100 grams fresh weight)type : integervalues : 29.0 - 70.0missing : 1

Page 77: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

74

17. glucose+fructose (mg/100 grams fresh weight)type : integervalues : 9.0 - 44.0missing : 1

18. starch (mg/100 grams fresh weight)type : integervalues : 27.0 - 175.0missing : 1

19. sweetness (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 319.0 - 955.0missing : 0

20. flavour (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 415.0 - 1008.0missing : 0

21. dry/moist (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 188.0 - 949.0missing : 0

22. fibre (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 68.0 - 686.0missing : 0

23. acceptability (taste panel score - mean of 8 panellists; score out to 1500)

type : integervalues : 557.0 - 1224.0missing : 0

24. heat_input_emerg (heat emergence after harvest)type : realvalues : 721.0 - 1087.0missing : 0

25. heat_input_flower (heat input before flowering)type : realvalues : 386.0 - 738.0missing : 0

Unstored training1. site

type : enumeratedvalues : P, HB, LINCmissing : 0

2. daf (days after flowering)type : enumeratedvalues : 30, 40, 50, 60, 70missing : 0

Page 78: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

75

3. fruitno (individual number of the fruit)type : enumeratedvalues : 1 - 27missing : 0

4. weight (of whole fruit in grams)type : realvalues : 1064.0 - 2523.0missing : 0

5. storewt (weight of fruit after storage)type : realvalues : N/Amissing : 0

6. pene (penetrometer - indication of maturity at harvest)type : integervalues : 3.0 - 11.0missing : 0

7. solids_% (a dry matter test)type : integervalues : 13.0 - 24.0missing : 0

8. brix (a refractometer measurement - an indication of sweetness and/or ripeness)

type : integervalues : 5.0 - 14.0missing : 0

9. a* (the a* co-ordinate of the Hunterlab L* a* b* notation of colourmeasurement)

type : integervalues : 1.0 - 24.0missing : 0

10. egdd (the heat accumulation above a base of 8oC from emergence of the plant to harvest of the fruit)type : realvalues : 601.0 - 953.0missing : 0

11. fgdd (the heat accumulation above a base of 8oC from flowering to harvest)type : realvalues : 190.0 - 542.0missing : 0

12. groundspot_a* (number indicating colour of skin where the fruit rested on the ground)

type : integervalues : -9.0 - 17.0missing : 2

13. glucose (mg/100 grams fresh weight)type : integervalues : 1.0 - 17.0missing : 6

Page 79: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

76

14. fructose (mg/100 grams fresh weight)type : integervalues : 1.0 - 15.0missing : 6

15. suctose (mg/100 grams fresh weight)type : integervalues : 3.0 - 39.0missing : 6

16. total (mg/100 grams fresh weight)type : integervalues : 15.0 - 60.0missing : 6

17. glucose+fructose (mg/100 grams fresh weight)type : integervalues : 3.0 - 32.0missing : 6

18. starch (mg/100 grams fresh weight)type : integervalues : 44.0 - 234.0missing : 6

19. sweetness (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 225.0 - 957.0missing : 0

20. flavour (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 350.0 - 1002.0missing : 0

21. dry/moist (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 151.0 - 882.0missing : 0

22. fibre (taste panel score - mean of 8 panellists; score out to 1500)type : integervalues : 119.0 - 416.0missing : 1

23. acceptability (taste panel score - mean of 8 panellists; score out to 1500)

type : integervalues : 345.0 - 1224.0missing : 0

24. heat_input_emerg (heat emergence after harvest)type : realvalues : 671.0 - 1023.0missing : 0

25. heat_input_flower (heat input before flowering)type : realvalues : 260.0 - 612.0missing : 0

Page 80: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

77

Class informationOnly one class was created, based on acceptability.

1. not_acceptable less than 7502. acceptable more than 750 and less than and including 10003. excellent more than 1000 and less than and incuding 1500

The distribution of the classes for both training files are (these are the files that weworked with) :

Stored training1. not_acceptable 82. acceptable 213. excellent 23

Unstored training1. not_acceptable 242. acceptable 243. excellent 4

Analysis with 1Rw has provided the following results :Stored trainingdefault class : ‘excellent’ with 23/52best hypothesis : ‘total’ with 69% accuracy

Unstored trainingdefault class : ‘acceptable’ with 24/52best hypothesis : ‘sweetness’ with 79% accuracy.

Data analysis procedure

1. C4.5 was run withnew_acceptability’ as the classand with all other attributes in thestored training set

Results

1. The simplified decision tree was :size : 18 (nodes) with 5.8% errorsdominant attributes :

penesolids_%

2. C4.5 was run with‘new_acceptability’ as the classand with all other attributes inthe unstored training set

2. The simplified decision tree was :size : 11 (nodes) with 3.8% errorsdominant attributes :

penesolids_%

Page 81: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

78

3. C4.5 was run with‘new_acceptability’ as the classbut excluding the sensoryattributes for the stored trainingset

3. The simplified decision tree was :size : 18 (nodes) with 5.8% errorsdominant attributes :

sweetnessflavourpene

4. 1Rw was run with‘new_acceptability’ as the classbut excluding the sensoryattributes for the unstoredtraining set

4. The simplified decision tree was :size : 13 (nodes) with 9.6% errorsdominant attributes :

a*fructose, solids_%

The results are presented at the end of this analyses.

11.3 ConclusionBoth the size of the trees and the number of errors are small. The structure of the trees arelogical and easy to follow. The type of data and the results gained from these indicate that thisdataset was a good one for machine learning. However, the results were not what wererequired by the researcher. In this case the ability to gain the required answers was notobtainable. The data may need to be formatted and collected in a way that is more suitable tomachine learning.

Page 82: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

79

Graph 1 : Result 2

swee

tnes

s

pene

<=

496

.5

flav

our

> 4

96.5

ok (

3.0)

<=

3.2

swee

tnes

s

> 3

.2

not_

suita

ble

(19

.0)

<=

431

.3

solid

s_%

> 4

31.3

ok (

2.0)

<=

26.

4

not_

suita

ble

(6.

0/1.

0)

> 2

6.4

ok (

17.0

)

<=

773

.8 ex

celle

nt (

5.0/

1.0)

> 7

73.8

Page 83: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

80

Graph 2 : Result 3

pene

not_

acce

ptab

le (

4.0/

1.2)

<= 3

.8

solid

s_%

> 3.

8

pene

<= 2

7.5

site

> 27

.5

fruc

tose

<= 8

.2 to

tal>

8.2

ok (

12.0

/1.3

)<= 1

6.45

solid

s_%> 16

.45

ok (

3.0/

1.1)<=

19.

9 exce

llent

(2.

0/1.

0)

> 19

.9

ok (

4.2/

2.4)

<= 5

4.96

exce

llent

(18

.8/2

.5)

> 54

.96

not_

acce

ptab

le (

0.0)=

P

exce

llent

(2.

0/1.

0)

= H

B

solid

s_%

= L

INC

not_

acce

ptab

le (

3.0/

1.1)

<= 2

8.7

ok (

3.0/

2.1)

> 28

.7

Page 84: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

81

Graph 3 : Result 1

pene

not_

acce

ptab

le (

4.0/

1.2)

<= 3

.8

solid

s_%

> 3.

8

pene

<= 2

7.5

site

> 27

.5

fruc

tose

<= 8

.2 to

tal>

8.2

ok (

12.0

/1.3

)<= 1

6.45

solid

s_%> 16

.45

ok (

3.0/

1.1)<=

19.

9 exce

llent

(2.

0/1.

0)

> 19

.9

ok (

4.2/

2.4)

<= 5

4.96

exce

llent

(18

.8/2

.5)

> 54

.96

not_

acce

ptab

le (

0.0)=

P

exce

llent

(2.

0/1.

0)

= H

B

solid

s_%

= L

INC

not_

acce

ptab

le (

3.0/

1.1)

<= 2

8.7

ok (

3.0/

2.1)

> 28

.7

Page 85: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

82

Graph 4 : Result 4

a*

fruc

tose

<=

18.

9

solid

s_%

> 1

8.9

ok (

10.3

/2.1

)> 1

0.28

egdd<

= 1

0.28

not_

suita

ble

(22

.9/5

.5)

<=

704

pene

> 7

04

not_

suita

ble

(3.

0/1.

1)

> 9

.9

fruc

tose

<=

9.9

ok (

8.6/

1.3)

<=

9.0

3

not_

suita

ble

(2.

2/2.

0)

> 9

.03

ok (

2.0/

1.0)

<=

21.

5

exce

llent

(3.

0/1.

1)

> 2

1.5

Page 86: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

83

12. VALLEY CATEGORIES

Data source Liddy BakkerMarine and GeoscienceUniversity of WaikatoHamilton

Report date November 1995

Assigned to Stephen Garner, Research programmer

Data location /home/ml/datasets/Summer1995/valley/REPORT/original.arff/home/ml/datasets/Summer1995/valley/REPORT/results.arff

12.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo find and describe clusters of similar sections of valley.

Summary of original research resultsThe original results are currently unknown.

12.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo find and describe clusters of similar sections of valley.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Instance informationA high number of instances contained missing values and noise. The factors presentare only a representation of all the features required to describe valley categories.

Original dataset : 878 instances.Final dataset : 878 instances.

Attribute informationNumber of attributes : 15 (14 actual attributes plus one predefined class).

Page 87: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

84

The attributes are :1. BlockNumber

type : integervalues : 2.0 - 1,539.0missing : 0

2. PercentValleytype : realvalues : 0.0 - 100.0missing : 0

3. FS1+FS7type : realvalues : 0.0 - 100.0missing : 0

4. FS2+FS8type : realvalues : 0.0 - 100.0missing : 0

5. FS3+FS9type : realvalues : 0.0 - 100.0missing : 0

6. GS1+SS1+VS1+GS7+SS7+VS7type : realvalues : 0.0 - 100.0missing : 0

7. GS2+SS2+VS2+GS8+SS8+VS8type : realvalues : 0.0 - 100.0missing : 0

8. GS3+SS3+VS3+GS9+SS9+VS9type : realvalues : 0.0 - 100.0missing : 0

9. GS4+SS4+VS4type : realvalues : 0.0 - 100.0missing : 0

10. GS5+SS5+VS5type : realvalues : 0.0 - 100.0missing : 0

11. GS6+SS6+VS6type : realvalues : 0.0 - 100.0missing : 0

12. FS4type : realvalues : 0.0 - 100.0missing : 0

Page 88: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

85

13. FS5type : realvalues : 0.0 - 100.0missing : 0

14. FS6type : realvalues : 0.0 - 100.0missing : 0

15. classtype : enumeratedvalues : 0, 1, 2, 3, 4, 5, 6missing : 0

Class informationFor the dataset there are six class values.

1. 02. 13. 24. 35. 46. 5

The distribution of the classes are :1. 0 2132. 1 1973. 2 1254. 3 1265. 4 1086. 5 38

Analysis with 1Rw produced the following results :default class : ‘0’ with 213/878best hypothesis : ‘FS2+FS8’ with 58% accuracy.

Data analysis procedure

1. Autoclass was used to cluster theblocks into distinct classes.

Results

1. It came up with seven classes.

Ray Littler (Applied Statistician at theUniversity of Waikato) also came up with asimilar number of classes (six classes) butone of these classes contained almost all ofthe instances and the other classescontained only a few instances.

Page 89: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

86

2. C4.5 was run using ‘class’ asclass and with all attributes

Further data on relative positioningof blocks was obtained and used toplot the blocks and which class theybelong in. There are definite areasthroughout the map where groupsof one class dominate.

2. The rules determine from the tree had a66/34 split on the data.

The test set had about 65% accuracy ofthe rules on the test set.

Some of the 36 classes werecombined to produce only 12classes.

3. This derived data was run onAutoclass

3. Seven new categories of data wereproduced.

These were then used to make a new ruleset and plotted on the map. The mapproduced different areas grouped togetherby similarities in valley category. Thisindicates that differences exist between thecategories produced when 36 classes wereused and when 12 classes were used.

Page 90: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

87

The results are presented at the end of this analyses.

12.3 Discussion of resultsBecause of the nature and objectives of the experiment, the results from the data wereinconclusive.

12.4 ConclusionThis dataset may have been suitable for machine learning. However, the lack of a defined goalmeant that we were unable to come up with feasible solutions. Also, the type of data requiredstrong domain knowledge. This could only come from the researcher. Analysis by machinelearning often require a well-defined question to answer and strong interaction with theresearcher to determine which results are suitable, and which can be built on.

Follow up notesThis is an on-going project, where the researcher will be required to have more input.

Page 91: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

88

Graph 1 : Result 2’F

S2+

FS8’

’Per

cent

Val

ley’

<=

0

’GS1

+SS

1+V

S1+

GS7

+SS

7+V

S7’

> 0

’Per

cent

Val

ley’

<=

6.2

5

’FS4

’> 6

.25

’Blo

ckN

umbe

r’

<=

23.

81

’GS5

+SS

5+V

S5’

> 2

3.81

’2’

<=

3.7

5

’GS6

+SS

6+V

S6’

> 3

.75

’FS3

+FS

9’

<=

0

’GS6

+SS

6+V

S6’

> 0

’FS3

+FS

9’

<=

1.9

42

’GS3

+SS

3+V

S3+

GS9

+SS

9+V

S9’

> 1

.942

’2’

<=

9.0

91

’GS1

+SS

1+V

S1+

GS7

+SS

7+V

S7’

> 9

.091

’2’>

24.

724 ’G

S6+

SS6+

VS6

<=

24.

724

’2’<

= 2

3.61

’6’

> 2

3.61

’0’

<=

5.7

14

’GS2

+SS

2+V

S2+

GS8

+SS

8+V

S8’

> 5

.714

’2’

<=

5.7

15

’0’

> 5

.715

’2’

<=

0.8

62

’5’> 0

.862

’6’

<=

0.9

71 ’GS1

+SS

1+V

S1+

GS7

+SS

7+V

S7’

> 0

.971

’0’

> 1

7.55

7

’GS3

+SS

3+V

S3+

GS9

+SS

9+V

S9’

<=

17.

557

’6’

<=

15.

152

’0’>

15.

152

’GS6

+SS

6+V

S6’

<=

826

’GS3

+SS

3+V

S3+

GS9

+SS

9+V

S9’

> 8

26

’FS2

+FS

8’

<=

0

’Blo

ckN

umbe

r’

> 0

’GS5

+SS

5+V

S5’

<=

4.4

78

’GS3

+SS

3+V

S3+

GS9

+SS

9+V

S9’

> 4

.478

’FS1

+FS

7’

<=

20.

504

’Per

cent

Val

ley’

> 2

0.50

4

’GS4

+SS

4+V

S4’

<=

0.6

94

’GS6

+SS

6+V

S6’

> 0

.694

’GS1

+SS

1+V

S1+

GS7

+SS

7+V

S7’<=

18.

18

’GS4

+SS

4+V

S4’

> 1

8.18

’2’

<=

0.6

47

’6’>

0.6

47

’6’

<=

2.1

39 ’GS4

+SS

4+V

S4’

> 2

.139

’2’

<=

0.6

47

’3’

> 0

.647

’FS3

+FS

9’

<=

20.

834

’FS2

+FS

8’

> 2

0.83

4

’Per

cent

Val

ley’

<=

5.5

56

’GS5

+SS

5+V

S5’

> 5

.556

’5’

<=

2.8

58

’3’>

2.8

58

’1’<

= 1

.802

’3’

> 1

.802

’5’<

= 4

6.75

’FS6

> 4

6.75

’5’

<=

0.3

89

’GS2

+SS

2+V

S2+

GS8

+SS

8+V

S8’

> 0

.389

’1’

<=

5.8

14

’3’

> 5

.814

’3’<

= 5

.077

’1’

> 5

.077

’GS5

+SS

5+V

S5’

<=

2.6

55

’FS2

+FS

8’

> 2

.655

’4’>

54.

75

’Per

cent

Val

ley’

<=

54.

75

’5’

<=

0

’GS6

+SS

6+V

S6’

> 0

’3’>

1.8

75

’FS5

<=

1.8

75

’3’<=

8.0

36

’4’> 8

.036

’3’<

= 1

5.10

4

’4’

> 1

5.10

4

’5’<

= 3

2.75

’GS2

+SS

2+V

S2+

GS8

+SS

8+V

S8’

> 3

2.75

’1’

<=

8.7

71

’4’

> 8

.771

’2’

> 4

.416

’FS6

<=

4.4

16

’Per

cent

Val

ley’

<=

793

’Per

cent

Val

ley’

> 7

93

’2’

<=

0.2

53

’5’

> 0

.253

’FS3

+FS

9’

<=

22.

75

’GS3

+SS

3+V

S3+

GS9

+SS

9+V

S9’

> 2

2.75

’4’>

69.

75

’FS1

+FS

7’

<=

69.

75

’FS1

+FS

7’

<=

5.8

25

’GS1

+SS

1+V

S1+

GS7

+SS

7+V

S7’

> 5

.825

’1’<

= 3

0.77

’FS3

+FS

9’

> 3

0.77

’5’

<=

3.0

3

’1’

> 3

.03

’1’

<=

25.

372

’6’

> 2

5.37

2

’1’

<=

2.4

45

’5’

> 2

.445

’FS4

’<=

1.2

99

’FS5

> 1

.299

’FS3

+FS

9’<=

1.1

36

’GS5

+SS

5+V

S5’

> 1

.136

’1’<

= 2

.89

’FS1

+FS

7’

> 2

.89

’2’

<=

1.9

05

’5’>

1.9

05

’4’<

= 2

.43

’1’

> 2

.43

’4’

<=

2.7

78

’1’

> 2

.778

Page 92: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

89

13. VENISON BRUISING

Data source Jenny JagoAnimal Behaviour and WelfareAgResearchRuakura Research Centre, Hamilton

Report date December 1995

Assigned to Stuart Yeates, Research programmer

Data location /home/ml/datasets/Summer1995/venison/REPORT/original.arff/home/ml/datasets/Summer1995/venison/REPORT/results.arff.gz

13.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo find the factors contributing most to bruising of deer carcasses when transported toto be slaughtered.

Summary of original research resultsThese results are currently unknown.

13.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo find the factors contributing most to bruising of deer carcass. Examine the data todetermine if the distance travelled contributes to bruising.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.The distance attribute has a lot of missing values. The dataset is large with manyattributes.

Instance informationA high number of instances contained missing values and noise. The factors presentare only a representation of all the features required to describe deer bruising.

Original dataset : 21,454 instances.Final dataset : 21,448 instances.

Page 93: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

90

Attribute informationNumber of attributes : 23 (21 actual attributes plus 2 predefined classes).

The attributes are :1. docket (set of slaughter)

type : integervalues : 1244.0 - 3233.0missing : 0

2. month (the month of acquistion of the animal by the slaughter house)type : enumeratedvalues : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12missing : 0

3. day (the month of acquistion of the animal by the slaughter house)type : enumeratedvalues : 1 - 31missing : 0

4. farm (the farm the deer came from)type : integervalues : 1.0 - 501.0missing : 0

5. distance travelled (km)type : integervalues : 24.0 - 434.0missing : 692

6. carriertype : enumeratedvalues : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18missing : 0

7. mixsex (single sex or mixed sex)type : enumeratedvalues : 1, 2, 3, 4missing : 0

8. mixlottype : enumeratedvalues : 1, 2, 3missing : 0

9. bookid (animal id)type : integervalues : 1.0 - 21,500.0missing : 0

10. slaughter-order (order of slaughter for each docket)type : integervalues : 1.0 - 99.0missing : 8

11. sextype : enumeratedvalues : 1, 2missing : 5

Page 94: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

91

12. lot-ordertype : integervalues : 1.0 - 155.0missing : 6

13. hcw (hot carcass weight)type : realvalues : 0.7 - 663.0missing : 55

14. gradetype : enumeratedvalues : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12missing : 7

15. bruisingtype : enumeratedvalues : 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14missing : 5

16. other-damagetype : enumeratedvalues : 0, 1, 2, 3, 4, 5, 6, 7missing : 6

17. gr (measure of fatness)type : enumeratedvalues : 0 - 43missing : 215

18. sltr-day (slaughter day)type : enumeratedvalues : 1 - 31missing : 5

19. sltr-month (slaughter month)type : enumeratedvalues : 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12missing : 5

20. other_damage_codetype : enumeratedvalues : none, deformed,..., othermissing : 0

21. day-of-yeartype : integervalues : 3.0 - 355.0missing : 0

22. sltr-day-of-yeartype : integervalues : 3.0 - 355.0missing : 5

23. days_heldtype : integervalues : -13.0 - 3.0missing : 5

Page 95: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

92

Class informationA number of attributes were used as the class. Bruising(1), Bruising(2), calculatedfrom the bruising attribute, and Grade were all used as classes.

Bruised1. none2. bruised

Bruise_Code1. none2. DH13. DM4. DF15. Old_Scar_Break6. Severe_Bruise7. Condemned_Severe_Bruise8. Emaciated9. More-Than-One-Bruise10. DH211. DF212. Broken-Bone-Haemorage13. Condemned-DOA14. Condemned-Emaciated15. Condemned-Dead-Dying

Grade_Code :1. AP52. AP33. AP44. other5. AD6. AF17. AP28. AP19. unknown10. TBR11. AM12. AF2

The distribution of the classes are :Bruised1. none 19,9112. bruised 1,543

Bruise_Code1. none 19,9112. DH1 1,0363. DM 964. DF1 855. Old_Scar_Break 796. Severe_Bruise 15

Page 96: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

93

7. Condemned_Severe_Bruise 288. Emaciated 449. More-Than-One-Bruise 2810. DH2 11411. DF2 912. Broken-Bone-Haemorage 413. Condemned-DOA 114. Condemned-Emaciated 215. Condemned-Dead-Dying 2

Grade_Code1. AP5 4,2852. AP3 9,3093. AP4 3,0484. other 4995. AD 1,4966. AF1 3227. AP2 1,7378. AP1 1559. unknown 5110. TBR 2811. AM 42412. AF2 100

Analysis with 1Rw produced the following results :Bruised :default class : ‘none’ with 19,910/21,448best hypothesis : ‘farm’ with 93% accuracy.

Bruise_Code :default class : ‘none’ with 19,910/21,448best hypothesis : ‘farm’ with 93% accuracy.

Grade_Code :default class : ‘AP3’ with 9,309/21,448best hypothesis : ‘hcw’ with 88% accuracy.

Data analysis procedure

A new attribute, ‘days_held’, wascreated to combine attributes‘month’, ‘day’, ‘sltr_month’, and‘sltr_day’ to give a value for howmany days held in the slaughterhouse.

An attribute ‘farm_size’ wascreated as the number of deerslaughtered from each farm.

Results

Page 97: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

94

Six instances were removed; onehad errors in the date, and fivecontained many missing values.

1. C4.5 was run using ‘Bruised’ asa class.

Bruising was then made into a newattribute (Bruised).

2. C4.5 was run using ‘Bruised’ asa class.

dominant attribute : origin

Bruising was then made into a newattribute (Bruise_Code) with 15classes.

3. C4.5 was run using ‘Bruising2’as a class.

4. C4.5 was run using‘Grade_Code’ as a class with allattributes.

5. C4.5 was run using‘Grade_Code’ as a class with :

‘sex’‘fat’‘days_held’‘distance_course’‘farmsize’.

6. C4.5 was then run with‘Grade_Code’ as the class withattributes :

‘Bruise_Code’‘Other_damage_code’‘fat’‘days_held’

1. The simplified decision tree many errors

2. The simplified decision tree had lesserrors

dominant attributes : origin

3. The simplified decision tree had moreerrors

4. The simplified decision tree was :size : 434 (nodes) with 32.3% errorsdominant attributes :

‘bruise_code’‘sex’‘gr’‘other_damage_code’‘distance’

5. This simplified decision tree was :size : 46 with 41.9% errorsdominant attributes

‘sex’‘fat’

6. The simplified decision tree was :size : 46 with 43.7% errorsdominant attributes :

‘Bruise_Code’‘other_damage_code’

Page 98: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

95

Rules were previously made byJenny Jago for classifying theanimals by ‘grade’. This was doneusing the attributes ‘gr’ (fat) and‘hcw’.

7. C4.5 was used with ‘Grade’ asthe class with attributes ‘gr’and’hcw’ to find an indication ofhow to classify grade.

7. The simplified tree indicated divisionsbetween the classes at similar values of

‘gr’ and ‘hcw’ as the hand classifieddivisions.

The best result (no. 5) is presented at the end of this analyses.

13.3 Discussion of resultsSeveral attributes were large enumerations, ie. they divide the data from one attribute intoseveral values (eg. attribute ‘farm’ has 501 possible values). For machine learning this seemedbe of little value since as farms usually submit only a single lot to the slaughter-house.

Farm was the attribute most influencing level of bruising, with the other attributes contributingminimally to this class. Sex and Bruise_Code had the most effect on grade. A decision treefor classifying fat (‘gr’) was found to be very similar to the classification techniques done byJenny Jago.

13.4 ConclusionThis dataset appeared to be quite suitable to machine learning since it has a discrete class(bruised or not bruised) and several other discrete attributes that could be used in a decisiontree to describe the classes. However, none of the attributes that were previously found tocontribute to bruising were suggested by the machine learning outputs. The format of thisdataset allows it to be easily used by machine learning, but it didn’t produce any valuableoutcomes.

Follow up notesJenny Jago commented on the results. Her analysis of the results were that machinelearning was able to detect the influence of farm of origin as the main contributingfactor to bruising is not very important because generally, only one lot of animals camefrom each farm. Also, relationships between bruising and gr (fat level), sex of animal,and distance travelled did not show any clear relationships with machine learning, butthey were found to be strongly correlated when using statistical techniques. Jenny washoping that machine learning would be able to back up the relationships already foundby statistics, but this was not done. Perhaps there is too much noise in the data.

Page 99: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

96

Graph 1 : Result 5hc

w

hcw

<=

50

hcw

> 5

0

hcw

<=

45

fat>

45

hcw

<=

35

fat>

35

hcw

<=

21.

6

hcw>

21.

6

AP5

(4.

0/2.

2)

<=

12.

4

AP3

(2.

0/1.

8)

> 1

2.4

AM

(14

.0/8

.8)

<=

25.

6

othe

r (

597.

4/15

9.4)

> 2

5.6

AP5

(49

15.1

/695

.8)

<=

9

fat

> 9

AP5

(21

.3/2

.7)

<=

11

hcw

> 1

1

AM

(3.

0/2.

1)

<=

37 A

F1 (

15.2

/6.0

)

> 3

7

AP4

(32

92.6

/287

.4)

<=

11

fat

> 1

1

AP4

(15

.1/2

.6)

<=

12 A

F1 (

24.1

/9.3

)

> 1

2

fat<

= 6

5

fat

> 6

5

AP3

(10

081.

9/83

5.0)

<=

12

fat

> 1

2

AF1

(18

4.8/

27.6

)<=

20 A

F2 (

30.3

/4.1

)

> 2

0

hcw<

= 1

4

fat

> 1

4

AP2

(18

73.9

/169

.3)

<=

85

hcw

> 8

5

AP1

(16

4.4/

15.5

)

<=

133

.1 AP3

(6.

0/2.

3)

> 1

33.1

AF1

(12

5.2/

12.0

)

<=

20

AF2

(77

.7/1

2.5)

> 2

0

Page 100: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

97

14. WASP NESTS

Data source Andrew WallaceCrop & Food ResearchPrivate Bag 4704Christchurch

Report date January, 1996

Assigned to Stephen Garner, Research programmer

Data location /home/ml/datasets/Summer1995/wasps/W188.arff.gz/home/ml/datasets/Summer1995/wasps/W288.arff.gz/home/ml/datasets/Summer1995/wasps/W89.arff.gz

14.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo record and compare aspects of nests of two wasp species (defined in terms ofanother experiment). This is to be able to improve the understanding of the waspecology as a contribution to biological control. The features recorded are mentionedbelow.

Summary of original research resultsThe results indicated that there was very little to distinguish between the nests of thedifferent species with respect to nest sites and from spring to early summer in nesttraffic, nest size and the number of combs. Some German wasp nests managed tosurvive the winter, but all common wasps had died by late June. Another interestingresult indicated that common wasps tended to have nest entrances favouring themorning sun.

14.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo see by using the features recorded for each of the nests, a model could be inducedto determine the wasp species that built the nest.

Page 101: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

98

Dataset descriptionThe dataset descriptions include instance, attribute, and class information. The originaldataset was made up of three files. These were data from the 1988 period in the filesW188.DAT and W288.DAT, and the data for the 1989 period in W89.DAT. The datain the W188 and W288 data files were combined to produce a new data file, W88, thathad the same attributes as W89 in the same order. To do this, a derived attribute‘traffic_2’ was created from the average of the existing attributes ‘in’ and ‘out’. Thefinal dataset is recorded below.

Instance informationA high number of instances contained missing values and noise. The factors presentare only a representation of all the features required to describe

1988 dataset : 280 instances.1989 dataset : 226 instances.

Attribute informationNumber of attributes : 13 (12 actual attributes plus one predefined class).

W88The attributes are :

1. Species (class)type : enumeratedvalues : vulgaris, germanicamissing : 0

2. Areatype : integervalues : 2.0 - 86.0missing : 5

3. Monthtype : enumeratedvalues : -5 - 7missing : 17

4. Directiontype : enumeratedvalues : 1 - 9 (1 = NE, 2 = N, 3 = UP, 4 = NW, 5 = W, 6 = SW, 7 = S,

8 = SE, 9 = E)missing : 60

5. Traffic_2type : realvalues : 0.0 - 173.0missing : 64

6. Nest_sitetype : enumeratedvalues : 1 - 10 (1 = soil, 2 = compost, 3 = wood, 4 = roots, 5 = rubbish,

6 = hanging, 7 = straw, 8 = debris, 9 = sleeper, 10 =other)

missing : 9

Page 102: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

99

7. Tunnel_lengthtype : realvalues : 0.0 - 150.0missing : 64

8. Widthtype : realvalues : 3.0 - 70.0missing : 64

9. Heighttype : realvalues : 3.0 - 66.0missing : 65

10. Depthtype : realvalues : 2.0 - 70.0missing : 65

11. Cavitytype : enumeratedvalues : 1 - 10missing : 18

12. Layerstype : integervalues : 1.0 - 25.0missing : 54

13. Castestype : enumeratedvalues : 1, 2, 3 (1 = worker, 2 = male, 3 = queen)missing : 58

W89The attributes are :

1. Species (class)type : enumeratedvalues : vulgaris, germanicamissing : 0

2. Areatype : integervalues : 1.0 - 88.0missing : 3

3. Monthtype : enumeratedvalues : 1 - 9missing : 0

4. Directiontype : enumeratedvalues : 1 - 9 (1 = NE, 2 = N, 3 = UP, 4 = NW, 5 = W, 6 = SW, 7 = S,

8 = SE, 9 = E)missing : 77

Page 103: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

100

5. Traffic_2type : realvalues : 0.0 - 109.5missing : 69

6. Nest_sitetype : enumeratedvalues : 1 - 10 (1 = soil, 2 = compost, 3 = wood, 4 = roots, 5 = rubbish,

6 = hanging, 7 = straw, 8 = debris, 9 = sleeper, 10 =other)

missing : 697. Tunnel_length

type : realvalues : 0.0 - 110.0missing : 93

8. Widthtype : realvalues : 1.0 - 120.0missing : 114

9. Heighttype : realvalues : 4.0 - 100.0missing : 114

10. Depthtype : realvalues : 1.0 - 67.0missing : 114

11. Cavitytype : enumeratedvalues : 1 - 10missing : 108

12. Layerstype : integervalues : 1.0 - 25.0missing : 98

13. Castestype : enumeratedvalues : 1, 2, 3 (1 = worker, 2 = male, 3 = queen)missing : 91

When experimenting with the data in machine learning schemes, a limited number ofattributes were used. These were :

• Species - derived from Species• Direction - derived from Direction• Month - decode code to appropriate MONYY format, derived from Month• Castes - derived from Castes• Month_Code - eg Jan, derived from Month• Year_Code - eg YY (88), derived from Month• Nest_Site - derived from Nest_site• Nest_Volume - derived from Width * Height * Depth

Page 104: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

101

Class informationFor both datasets Species is used as the class. Species has two class values.

1. vulgaris2. germanica

The distribution of the classes are :W881. vulgaris 1982. germanica 82

W891. vulgaris 1672. germanica 59

Analysis using 1Rw produced the following results :W88default class : ‘vulgaris’ with 198/280best hypothesis : ‘nest_no’ with 98% accuracy.

W89default class : ‘vulagaris’ with 167/226best hypothesis : ‘month’ with 78% accuracy.

Data analysis procedure

1. C4.5 was run on the 1988 datawith ‘species’ as the class usingall other attributes.

2. C4.5 was run on the 1989 datawith ‘species’ as the class with allother attributes.

The 1988 and 1989 data sets werecombined

3. C4.5 was run with ‘species’ asthe class.

Results

1. The simplified decision tree wassize : 15 (nodes) with 13.2% errorsdominant attributes were

‘month’‘castes’‘depth’

2. The simplified decision tree wassize : 5 with 21.7% errorsdominant attributes

‘month’ (Nov - May, Jun - Sep)‘traffic_2’ (<=7 vs >7)

3. The simplified decision tree wassize : 21 with 16% errorsdominant attributes were

‘month’‘height’‘depth’.

Page 105: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

102

14.3 Discussion of resultsThe main attribute used to determine which species is time of year or month. Species Vespulagermanica nests mainly over the winter, while nests of the species Vespula vulgaris are foundmainly during the summer months.

14.4 ConclusionThe results indicate that the data taken for a different experiment are not compatible with thedata required to run the machine learning experiments required here.

Reference : Donovan B.J., Howie A.M.E., Schroeder N.C., Wallac A.R. and Read P.E.C.(1992) “Comparative characteristics of nests of Vespula germanica (F.) andVespula vulgaris (L.) (Hymenoptera : Vespinae) from Christchurce City, NewZealand” NZ Jouranl of Zoology, 1992, Vol 19: 61 - 71.

Page 106: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

103

15. WHITE CLOVER PERSISTENCE TRIALS

Data source Ian TarbottonAgResearchWhatawhata Research CentreHamilton

Report date January 1996

Assigned to Colleen Burrows, Research programmer

Data location /home/ml/datasets/Summer1995/pasture/REPORT/results1.arff/home/ml/datasets/Summer1995/pasture/REPORT/results2.arff

15.1 Original researchThe original research is discussed in terms of the objectives and subsequent results.

ObjectivesTo determine the mechanisms which influence the persistence of white cloverpopulations in summer dry hill land. In particular reference to the consequence of asevere summer dry period in 1993/1994 and how it impacted on the performance ofthree white clover cultivars in an on-going experiment located at WhatawhataResearch Centre.

Summary of original research resultsThree key results were found; these included a) total white clover content wasdetermined more by environmental differences than plant genetics, b) with time theproportion of resident genotypes contributing to the total population increased, c)resident genotypes appear well adapted to the experimental conditions.

15.2 Machine learningMachine learning is discussed in terms of the machine learning objective, a description of thedataset, the analysis procedure followed, and subsequent results.

ObjectiveTo predict the amount of White Clover in 1994 from the amount of White Clover andother species in the years 1991 to 1994 as well as information on the ‘strata’ where theWhite Clover was being grown.

Dataset descriptionThe dataset descriptions include instance, attribute, and class information.

Page 107: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

104

Instance informationThe original data present had few errors and noise. The factors present are only arepresentation of all the features required to describe White Clover Persistence Trials.

Attribute informationNumber of attributes in original dataset: 12 (11 actual attributes plus one predefinedclass), number of instances 14,400..

We tried to predict the amount of White Clover in 1994 from the amount of WhiteClover and other species in the years 1991 to 1994 as well as information on the stratawhere the White Clover was being grown. OtherGrasses-94 and Cocksfoot-93 and 94seemed to influence the amount of White Clover the most, but there didn’t seem to beone or two variables that consistently contributed to the class.

The attributes in the original dataset were :1. Year

type : enumeratedvalues : 1991 - 1994missing : 0

2. Paddocktype : enumeratedvalues : 25, 42, 45missing : 0

3. Transecttype : enumeratedvalues : 1 - 30missing : 0

4. Plottype : enumeratedvalues : 1 - 3missing : 0

5. Stratatype : enumeratedvalues : 1 - 7missing : 0

6. WhiteClovertype : enumeratedvalues : yes, nomissing : 0

7. BareGroundtype : enumeratedvalues : yes, nomissing : 0

8. Cocksfoottype : enumeratedvalues : yes, nomissing : 0

Page 108: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

105

9. OtherGrassestype : enumeratedvalues : yes, nomissing : 0

10. OtherLegumestype : enumeratedvalues : yes, nomissing : 0

11. RyeGrasstype : enumeratedvalues : yes, nomissing : 0

12. Weedstype : enumeratedvalues : yes, nomissing : 0

Using the attribute editor, the data was then combined so that there was one instancefor each strat-paddock-plot combination. The years were also combined so that thereare attributes such as WhiteClover-91, WhiteClover-92, WhiteClover-93, etc, for allspecies. In each of these attributes, the value is a number which represents all of the’yes’ values for that strata-paddock-plot combination in the given species-year. Thisresults in 63 instances with 31 attributes.

There are 32 attributes for the edited dataset. These are:

1. Stratatype: enumeratedvalues:1_OldCamp; 2_NewTrack; 3_Easy; 4_Moderate; 5_Steep;

6_OldEdge; 7_NewEdgemissing: 0

2. Plottype : enumeratedvalues : huia; prop; tahoramissing: 0

3. Paddocktype : enumeratedvalues : 24; 42; 45missing: 0

4. WhiteClover-91type : Realvalues : 0.0 - 39.13missing: 0

5. BareGround-91type : Realvalues : 0.0 - 33.33missing: 0

Page 109: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

106

6. Cocksfoot-91type : Realvalues : 0.0 - 50.0missing: 0

7. OtherGrasses-91type : Realvalues : 0.0 - 50.0missing: 0

8. OtherLegumestype : Realvalues : 0.0 - 20.0missing: 0

9. RyeGrass-91type : Realvalues : 0.0 - 57.14missing: 0

10. Weeds-91type : Realvalues : 0.0 - 40.0missing: 0

11. WhiteClover-92type : Realvalues : 0.0 - 50.0missing: 0

12. BareGround-92type : Realvalues : 0.0 - 10.71missing: 0

13. Cocksfoot-92type : Realvalues : 0.0 - 100.0missing: 0

14. OtherGrasses-92type : Realvalues : 0.0 - 42.48missing: 0

15. OtherLegumes-92type : Realvalues : 0.0 - 11.82missing: 0

16. RyeGrass-92type : Realvalues : 0.0 - 100.0missing: 0

17. Weeds-92type : Realvalues : 0.0 - 33.33missing: 0

Page 110: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

107

18. WhiteClover-93type : Realvalues : 0.0 - 31.71missing: 0

19. BareGround-93type : Realvalues : 0.0 - 7.69missing: 0

20. Cocksfoot-93type : Realvalues : 0.0 - 58.33missing: 0

21. OtherGrasses-93type : Realvalues : 0.0 - 41.58missing: 0

22. OtherLegumes-93type : Realvalues : 0.0 - 19.05missing: 0

23. RyeGrass-93type : Realvalues : 0.0 - 50.0missing: 0

24. Weeds-93type : Realvalues : 0.0 - 40.0missing: 0

25. WhiteClover-94type : enumeratedvalues : 0<=WhiteClover-94<8.8225; 8.225<=WhiteClover-94<17.645;

17.645<=WhiteClover-94<26.4675; 26.4675<=WhiteClover-94<35.29

missing: 026. BackGround-94

type : Realvalues : 0.0 - 14.29missing: 0

27. Cocksfoot-94type : Realvalues : 0.0 - 100.0missing: 0

28. OtherGrasses-94type : Realvalues : 0.0 - 50.0missing: 0

Page 111: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

108

29. OtherLegumes-94type : Realvalues : 0.0 - 25.0missing: 0

30. RyeGrass-94type : Realvalues : 0.0 - 75.0missing: 0

31. Weeds-94type : Realvalues : 0.0 - 50.0missing: 0

32. Strata-Combinedtype : enumeratedvalues : 1; 3; 4missing: 0

(this means that there are 31 actual attributes, one class attribute)

Original dataset : 14,400 instances, 12 attributes.Final datasets : 63 instances, 32 attributes

Class informationThe dataset contained two classes, which were ‘White-Clover-94’ and ‘Strata’ with thefollowing values :

White-Clover-941. 0<=WhiteClover-94<8.82252. 8.8225<=WhiteClover-94<17.6453. 17.645<=WhiteClover-94<26.46754. 26.4675<=WhiteClover-94<=35.29

Strata1. 1_OldCamp2. 2_NewTrack3. 3_Easy4. 4_Moderate5. 5_Steep6. 6_OldEdge7. 7_NewEdge

The distribution of the class values are :White-Clover-941. 0<=WhiteClover-94<8.8225 382. 8.8225<=WhiteClover-94<17.645 203. 17.645<=WhiteClover-94<26.4675 44. 26.4675<=WhiteClover-94<=35.29 1

Page 112: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

109

Strata1. 1_OldCamp 92. 2_NewTrack 93. 3_Easy 94. 4_Moderate 95. 5_Steep 96. 6_OldEdge 97. 7_NewEdge 9

Analysis with 1Rw produced the following results :White-Clover-94default class : ‘0<=WhiteClover-94<8.8225’ with 38/63best hypothesis : ‘BareGround’ with 73% accuracy

Stratadefault class : ‘1_OldCamp’ with 9/63best hypothesis : ‘RyeGrass’ with 56% accuracy.

Data analysis procedure

The data was combined where :• one instance was produced

for each strata-paddock-plot• years for attributes such as

WhiteClover## for all speciesare now present.

1. C4.5 was run with WhiteClover-94 as a class with all otherattributes.

Ian Tarbotton suggested that someof the strata could be combinedbecause of similarity. Strata [1, 2,6, and 7] and [4 and 5] werecombined.

2. C4.5 was run with WhiteClover-94 as the class, with the newdataset formulated.

3. C4.5 was run with ‘Strata’ asthe class and with all of theother attributes.

Results

1. The simplified decision tree was :size 17 (nodes) 3.2% errorsdominant attributes were :

‘OtherGrasses-94’‘Strata’‘Cocksfoot-94’‘Cocksfoot-93’

2. The simplified decision tree was :size 19 4.8% errorsdominant attributes were :

‘OtherGrasses-94’‘Cocksfoot-93’‘Cocksfoot-94’.

3. The simplified decision tree was :size 21 6.3% errorsdominant atttributes were :

‘RyeGrass-93’

Page 113: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

110

‘Ryegrass-94’‘BareGround-94’

4. C4.5 was run with ‘Plot’ as theclass with all other variables asattributes.

4. The simplified decision tree was :size 17 11.1% errorsdominant attributes were :

‘WhiteClover-91’‘Cocksfoot-92’‘OtherGrasses-92’

Since this data was in a time seriesformat, the data was combined into2-year windows. Attributes createdwere WhiteClover-1, WhiteClover-2, BareGround-1, BareGround-2,etc for all species and a differenceattribute taking the differencebetween year 1 and year 2.

5. C4.5 was run withWCDiffCLass (differencebetween year one and twoWhiteClover) as the class withall new attributes as well asstrata, plot, and paddock

6. C4.5 was then run without using‘Strata’ as an attribute.

5. The simplified decision tree wassize 61 8.5% errorsdominant attributes were :

‘WhiteClover-1’‘OtherLegumes-2’‘RyeGrass-2’.

6. The simplified decision tree was :size 63 7.9% errorsdominant attributes were :

‘WhiteClover-1’‘RyeGrass-2’‘OtherLegumes-2’

Strata does not seem to have much of aninfluence on the difference between clovergrowth from one year to the next.

7. C4.5 was run with ‘Strata’ asthe class with all other attributeson separate datasets for eachcultivar.

7. a) In the huia dataset, the simplifieddecision tree was

size 13 1 errordominant attributes

‘OtherLegumes-92’‘Cocksfoot-94’‘BareGround-91’

b) In the tahora dataset, the simplifieddecision tree was

size 13 0 errorsdominant attributes were :

‘OtherLegumes-93’‘WhiteClover-93’

Page 114: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

111

‘BareGround-91’

c) In the ‘Prop’ dataset, the simplifeddecision tree was

size 13 1 errordominant attributes were :

‘OtherGrasses-93’‘WhiteClover-91’‘BareGround-91’

8. C4.5 was run with ‘Plot’ as aclass using all other attributes.

8. The simplified decision tree wassize 21 2 errorsdominant attributes were :

‘WhiteClover-92’‘OtherGrasses-91’‘OtherLegumes-94’

This tree seems to be able to divide plot 25from the other two plots (42 and 45) whichwas where the differences were thought tobe.

The results are presented at the end of this analyses.

15.3 Discussion of resultsThe data was not set up for machine learning, neither was a real question asked or distinctclasses to use. Fairly small decision trees with few errors were found in predicting the amountof White Clover in either 1994 or year 2 from strata and the amount of other species inprevious years. The use of the forced subsetting option decreased the size of the decision treein the windowed data by grouping some of the strata together so that a separate node was notrequired for each. When ‘strata’ was not used with the time windowed data a tree was madethat is of similar size and errors as the tree which included strata. This demonstrates thatstrata may be one attribute that can be used to classify, but it does not need to be used. Thekey finding was that when the seven ‘strata’ were used as class, the C4.5 tree did not alwaysclump together ‘strata’ that were put together by the researcher; some ‘strata’ that were puttogether by the researcher were also clumped by the tree, but some were not.

15.4 ConclusionThis dataset seemed to work well by finding which ‘strata’ are most closely related, but thequestion of which species influence White Clover growth was not well answered by machinelearning.

Page 115: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

112

Follow up notesThe results from which strata are clumped together is quite interesting. Brian de laRue thinks that machine learning will work well for a first run through of a very largedata set to be able to work through which relationships to statistically look at.Machine learning also has the strength that few assumptions need to be made beforeapplying the machine learning. It also is quite good at giving a visual demonstration ofsome sort of tree. Disadvantages are that the decision trees are at first a little difficultto understand and so far there is no way to be able to give a measure of accuracy thatwould be acceptable for publication.

References : Sheath G.W., Wedderburn M.E., Tarbotton I.S. (1995) Persistence of Prop,Tahora and Huia White Colver in Summer Dry Hill Land, A Contract Report toAgriseeds NZ Ltd.

Page 116: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

113

Graph 1 : Result 2R

yeG

rass

-94

17.6

45<

=W

hite

Clo

ver-

94<

26.4

675

(3.

0/1.

1)

> 4

7.83

Rye

Gra

ss-9

3

<=

47.

83

8.82

25<

=W

hite

Clo

ver-

94<

17.6

45 (

4.0/

2.2)

> 4

3.33

Whi

teC

love

r-93

<=

43.

33

8.82

25<

=W

hite

Clo

ver-

94<

17.6

45 (

3.0/

1.1)

> 2

5

Oth

erL

egum

es-9

4

<=

25

Coc

ksfo

ot-9

3

<=

12.

74

Whi

teC

love

r-92

> 1

2.74

0<=

Whi

teC

love

r-94

<8.

8225

(24

.0/2

.5)

> 1

2.5 B

areG

roun

d-91

<=

12.

5

8.82

25<

=W

hite

Clo

ver-

94<

17.6

45 (

2.0/

1.0)

> 5

.41

Whi

teC

love

r-93

<=

5.4

1

0<=

Whi

teC

love

r-94

<8.

8225

(9.

0/1.

3)

<=

19.

09 8.

8225

<=

Whi

teC

love

r-94

<17

.645

(2.

0/1.

0)

> 1

9.09

0<=

Whi

teC

love

r-94

<8.

8225

(4.

0/1.

2)

<=

13.

79

Wee

ds-9

3

> 1

3.79

0<=

Whi

teC

love

r-94

<8.

8225

(3.

0/2.

1)

<=

14.

8

8.82

25<

=W

hite

Clo

ver-

94<

17.6

45 (

9.0/

1.3)

> 1

4.8

Page 117: Machine Learning Applied to Fourteen Agricultural Datasets...This document reports on an investigation conducted between November, 1995 and March, 1996 into the use of machine learning

114

16. REFERENCES

Cameron-Jones, R.M., and Quinlan, J.R., 1993. Avoiding Pitfalls When Learning Recursive

Theories. In: R. Bajcsy (Editor), Proc. IJCAI 93, Morgan Kaufmann, pp. 1050-1055.

Cheeseman, P., Kelly, J., Self, M., Stutz, J., Taylor, W., and Freeman, D., 1988.

AUTOCLASS: A Bayesian classification system. In: J. Laird (Editor), Proc. of the Fifth

International Conference on Machine Learning. Ann Arbor, MI, Morgan Kaufmann, pp.

54-64.

Fisher, D., 1987. Knowledge Acquisition Via Incremental Conceptual Clustering. Machine

Learning, 2: 139–172.

Gaines, B.R., 1991. The trade-off between knowledge and data in knowledge acquisition. In

Piatetsky–Shapiro and Frawley, 1991, pp. 491–505.

Gennari, J.H., 1989. A survey of clustering methods. Technical Report 89-38, University of

California, Dept. of Information and Computer Science, Irvine.

McQueen, R.J., Garner, S.R., Nevill-Manning, C.G., and Witten, I.G. Applying machine

learning to agricultural data. Computers and Electronics in Agriculture (12) 1995, pp. 275-

293.

Piatetsky–Shapiro, G. and Frawley, W.J. (Editors), 1991: Knowledge discovery in databases.

AAAI Press, Menlo Park, CA., pp. 1-27.

Quinlan, J.R., 1990. Learning Logical Definitions from Relations. Machine Learning, 5: 239-

266.

Quinlan, J.R., 1991. Determinate Literals in Inductive Logic Programming. In: J. Mylopoulos

and R. Reiter (Editors), Proc. 12th International Joint Conference on Artificial

Intelligence, Morgan Kaufmann, pp. 746-750.

Quinlan, J.R., 1992. C4.5: Programs for Machine Learning. Morgan Kaufmann, pp. 1-16.

Quinlan, J.R., and Cameron-Jones, R.M., 1993. FOIL: a midterm report. In: P. Brazdil

(Editor), Proc. European Conference on Machine Learning, Springer Verlag, pp. 3-20.