GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - Blackgaurd/GDT: Using a genetic algorithm to optimize decision trees for data classification (my extended essay codebase).

BranchesTags
Open more actions menu

Latest commit

 

History

26 Commits
26 Commits

Folders and files

NameName
Last commit message
Last commit date
gdt
gdt
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
README.md
README.md
 
 
example.py
example.py
 
 
pyproject.toml
pyproject.toml
 
 

Repository files navigation

Genetic Decision Tree

A proof of concept implementation of using a genetic algorithm to optimize decision trees for data classification. A more detailed explanation is given in my (extended essay).

Installation

Currently, this package does not work on Windows because pygraphviz is not supported on Windows.

sudo apt-get install graphviz graphviz-dev
pip install git+https://github.com/Blackgaurd/GDT.git

Example

from gdt.classifier import GDTClassifier
from gdt.data.load import load_iris
from gdt.fitness import FitnessEvaluator, negative_quadratic
from gdt.selection import Elitism, Tournament

(X, Y), (X_test, Y_test) = load_iris().data()

kwargs = {
    "population_size": 100,
    "split_probability": 0.5,
    "selectors": [(Tournament(4), 0.8), (Elitism(), 0.2)],
    "crossover_probability": 0.7,
    "mutation_probability": 0.1,
    "optimal_depth": 5,
    "fitness_evaluator": FitnessEvaluator(0.8, 0.1, negative_quadratic),
}

clf = GDTClassifier(**kwargs)
clf.fit(X, Y, 50, verbose=10)

About

Using a genetic algorithm to optimize decision trees for data classification (my extended essay codebase).

Resources

Readme
Activity

Stars

1 star

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Contributors

Languages

You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.