Skip to content

Repository holds a library of most common algorithms used manually without using the help of sklearn or pandas. All algorithms work mainly on numpy and other minor helper or built-in libraries.

Notifications You must be signed in to change notification settings

papstchaka/basic_ml

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BASIC ML

Basic ML




Content




About the project

Repository holds a library of most common algorithms used manually without using the help of sklearn or other Machine Learning libraries. Only used libraries are:

  • built-in libraries that belong to Python
  • numpy
  • scipy - only used for dendrogram function in scipy.cluster.hierarchy
  • plotly
  • tqdm - for showing progress of training
  • autograd - for derivation of functions
  • jupyterlab (as development environment and to call all other scripts)

Those can be installed via:

pip install numpy scipy plotly tqdm autograd jupyterlab




Project structure

The project is structured as follows:

  • assets/ - containing all graphics that are shown here
  • library/ - containing the respective scripts for all subtasks:
  • Test.ipynb - a Jupyter Notebook containing a test implementation of all provided functionality




Functionalities that are implemented












Usage

In general all classes and functions can be used exactly as those which are implemented in sklearn with a training(), a predict() and a score() - if possible - function.

Algorithms that work exactly as describe above, respectively in their sklearn documentation:

  • Linear Regression -> Regressor
  • Clustering -> Classifier
  • Dimension Reduction - train(), predict() and score() function are fit(), fit_transform() and transform() respectively
  • Gaussian Mixture Models with Expectation Maximization Algorithm -> Classifier
  • Gaussian Processes -> Regressor
  • Deep Learning using Neural Networks - has its one score() function as being the loss() function in training. Workwise/Usage in the same way as Tensorflow Implementation

Algorithms with different work-wise:

  • Reinforcement Learning --> since there is no prediction in the workwise of RL, there is no such function implemented. Furthermore there is no (or not yet) train() function implemented, since the user is obliged to self-decide whether or not to use Q-Learning or Action-Value-Iteration.
  • Hidden Markov Models --> as they need a sequence to be trained and initial states and observations, the class is used slightly different to sklearn-typical work wise. You have to provide a sequence to all of the implemented algorithms, further instructions can be found on top of the class description in the hmm.py script.
  • Genetic Algorithm for DataSet manipulation --> since there is no prediction in the workwise of GA, there is no such function implemented. The train() function gives back the best 'subdataset' that exists (in the original dataset or mutated from that)




What's next

  • working on the Deep Learning module
  • go through all the algorithms and add further variety




Supporting developers

About

Repository holds a library of most common algorithms used manually without using the help of sklearn or pandas. All algorithms work mainly on numpy and other minor helper or built-in libraries.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published