added BinaryTree

This commit is contained in:
Tim
2020-11-19 10:32:13 +01:00
commit 12825d2a6c
19 changed files with 419 additions and 0 deletions

View File

@@ -0,0 +1,24 @@
/**
* Blattknoten eines Entscheidungsbaums. Klassifiziert einen Datensatz,
* nachdem alle Entscheidungen des Pfades getroffen wurden.
*/
public class Classification extends DecisionNode {
// Die Klassifikation als String
private String classification;
/**
* Erstellt eine Klassifikation
*
* @param pClassification Name der Klasse (z.B. "Ja" oder "Nein")
*/
public Classification( String pClassification ) {
classification = pClassification;
}
@Override
public String decide( Dataset pDataset ) {
return classification;
}
}