ec.cgp.problems
Class ProblemBreastCancerW
java.lang.Object
ec.Problem
ec.cgp.problems.ProblemCGP
ec.cgp.problems.ClassificationProblem
ec.cgp.problems.ProblemBreastCancerW
- All Implemented Interfaces:
- ec.Prototype, ec.Setup, ec.simple.SimpleProblemForm, java.io.Serializable, java.lang.Cloneable
public class ProblemBreastCancerW
- extends ClassificationProblem
Breast Cancer (Wisconsin) classification problem. Data set originates from:
http://archive.ics.uci.edu/ml/datasets/Breast+Cancer+Wisconsin+(Original).
Data file used comes from Weka: http://www.cs.waikato.ac.nz/ml/weka/
The task is to classify tumors as "benign" or "malignant" based on nine
numeric measurements.
- Author:
- David Oranchak, doranchak@gmail.com, http://oranchak.com
- See Also:
- Serialized Form
Fields inherited from class ec.Problem |
P_PROBLEM |
Method Summary |
(package private) boolean[] |
compare(java.lang.Object[] outputs,
Record rec)
Determine the result of classification by comparing the evaluated
outputs from our Cartsesian Genetic Program to the instance class(es)
specified somewhere in the given Record. |
(package private) Record |
makeRecord(java.lang.String line)
Interpret a line from the data file into a Record instance. |
(package private) void |
setInputs(java.lang.Object[] inputs,
Record rec)
Obtain the inputs from the data record. |
Methods inherited from class ec.Problem |
canEvaluate, clone, closeContacts, defaultBase, finishEvaluating, initializeContacts, prepareToEvaluate, reinitializeContacts |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ProblemBreastCancerW
public ProblemBreastCancerW()
makeRecord
Record makeRecord(java.lang.String line)
- Interpret a line from the data file into a Record instance. Handles
missing values.
- Specified by:
makeRecord
in class ClassificationProblem
- Parameters:
line
- The comma-delimited line from the data file.
- Returns:
- an instance of the Record.
setInputs
void setInputs(java.lang.Object[] inputs,
Record rec)
- Obtain the inputs from the data record.
- Specified by:
setInputs
in class ClassificationProblem
- Parameters:
inputs
- input array to setrec
- record to set values from
compare
boolean[] compare(java.lang.Object[] outputs,
Record rec)
- Determine the result of classification by comparing the evaluated
outputs from our Cartsesian Genetic Program to the instance class(es)
specified somewhere in the given Record.
- Specified by:
compare
in class ClassificationProblem
- Parameters:
outputs
- The output vector resulting from evaluation of the CGP.rec
- The record from which to compare classification results.
- Returns:
- A boolean vector indicating sucess of classification.