Coder Social home page Coder Social logo

koop46 / pokedex_ai Goto Github PK

View Code? Open in Web Editor NEW
0.0 1.0 0.0 1.3 MB

My first ml end-to-end ml project: a pokedex to classify pokemons using sklearns knn algorithm

Home Page: https://pokedexai.streamlit.app/

Python 3.24% Jupyter Notebook 96.76%
end-to-end knn-classifier ml

pokedex_ai's Introduction

pokedex_ai

My first ml end-to-end ml project: a pokedex to classify pokemons

Libraries:

  • streamlit
  • scikit learn
  • polars (instead of pandas)
  • dataclasses
  • Numpy

algoritm:

  • knn classifier(10 neighbours)

The data was gathered from Bulbagarden.nets Bulbapedia section. I asked chatgpt to write me a function that generates data, (mock_data() in the pokedex.ipynb). From each individual pokemon I created 151 variations, averaging out to the weight and height from bulbapedia, a total of 22,801 rows with 7 columns. Datacleaning was therefore minimal, although I had to rerun the mock_data() function until it only generated positive values before exporting them as a csv file with polars. I also collected links to a picture of each pokemon (picklinks.py).

Once I had the csv file I loaded it onto a polars dataqframe, converted column datatypes to optimize memory usage and one-hot encoded three parameters (primary type, secondary type & evolutionary stage). Then I split the data into training & test data, transformed the data with sklearns StandardScaler before finally training the modell.

I evaluated accuracy with the help of confusion matrix and classification report. Next I created a class to organize the code and started working on the frontend.

With the streamlit library I built a simple frontend consisting of 2x numeric inputs for weight and height, 2x selection boxes for primary & secondary types and three radiobuttons for evolutionary stage.
The app is multipage so under "Evaluation" the modell performance is presented in a classification report.

pokedex_ai's People

Contributors

koop46 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.