Skip to content

drkostas/Machine-Learning-Algorithms

Repository files navigation

COSC 522

GitHub license

Table of Contents

About

Code for the Machine Learning Course (COSC-522) of the UTK.

TODO

Read the TODO to see the current task list.

Libraries Overview

All the libraries are located under "<project root>/custom_libs"

  • Project1: Case 1,2,3 Bayesian Decision Rule
  • Project2: kNN, K-means, WTA
  • Project3: Dimensionality Reduction
  • Project4: Neural Networks
  • Project5: Reinforcement Learning (+Neural Network on Pima Dataset)
  • CARLO: RL/Pygame code used for Project 5
  • ColorizedLogger: Loc: fancy_logger/colorized_logger.py, Desc: Logger with formatted text capabilities
  • timeit: Loc: timing_tools/timeit.py, Desc: Decorator/ContextManager for counting the execution times of functions and code blocks

Prerequisites

You need to have a machine with Python >= 3.7 and any Bash based shell (e.g. zsh) installed. Having installed conda is also recommended.

$ python3.7 -V
Python 3.7.12

$ echo $SHELL
/usr/bin/zsh

Bootstrap Project

This is only needed if you're running the code locally and NOT in Google Collab.

All the installation steps are being handled by the Makefile.

If you want to use conda run:

$ make install

If you want to use venv run:

$ make install env=venv

Using Jupyter

In order to run the code, you will only need to configure the yml file, and either run its file directly or invoke its console script. Refer to Configuration Section.

Local Jupyter

First, make sure you are in the correct virtual environment:

$ conda activate cosc522

$ which python
/home/<your user>/anaconda3/envs/cosc522/bin/python

To use jupyter, first run jupyter:

jupyter notebook

And open the main.ipynb.

Google Collab

Just Open this Google Collab Link.

Adding New Libraries

If you want to add a new library (e.g. a Class) in the project you need to follow these steps:

  1. Create a new folder under "<project root>/custom_libs" with a name like my_lib
  2. Create a new python file inside it with a name like my_module.py
  3. Paste your code inside it
  4. Create a new file name init.py
  5. Paste the follwing code inside it:
     """<Library name> sub-package."""
     
     from .<Module name> import <Class Name>
     
     __email__ = "georgiou.kostas94@gmail.com"
     __author__ = "drkostas"
     __version__ = "0.1.0"
  6. Open <project root>/custom_libs/__init__.py
  7. Add the following line: from custom_libs.<Module name> import <Class Name>
  8. (Optional) Rerun make install or python setup.py install

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

Code for the Machine Learning Course (COSC-522) of the UTK.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published