GithubHelp home page GithubHelp logo

skylark0924 / machine-learning-is-all-you-need Goto Github PK

View Code? Open in Web Editor NEW
371.0 11.0 86.0 74.51 MB

🔥🌟《Machine Learning 格物志》: ML + DL + RL basic codes and notes by sklearn, PyTorch, TensorFlow, Keras & the most important, from scratch!💪 This repository is ALL You Need!

Python 60.93% CMake 3.90% C++ 9.80% C 4.55% Makefile 20.59% Shell 0.23%
deep-reinforcement-learning keras pytorch tensorflow convolutional-neural-networks lstm dqn ddpg actor-critic ppo

machine-learning-is-all-you-need's Introduction

Machine-Learning-Basic-Codes🏆

朱子云:

所谓致知在格物者,言欲致吾之知,在即物而穷其理也。盖人心之灵,莫不有知,而天下之物,莫不有理。惟于理有未穷,故其知有不尽也。是以大学始教,必使学者即凡天下之物,莫不因其已知之理而益穷之,以求至乎其极。至于用力之久,而一时豁然贯通焉,则众物之表里精粗无不到,而吾心之全体大用无不明矣。

📐📏

格物 (Ko Wu) which means 'investigate the essence of things' in English is a key method for study and better understanding of the knowledge. It is proposed by ancient Chinese philosophers about 2000 years ago and has a profound impact on later generations. The spirit of Ko Wu asks us to not only learn how to use knowledge, but also clearly understand the intrinsic theory. Therefore, it is necessary to re-implement ML algorithms by ourselves to figure out what exactly they did and why they succeed.

This repository aims to implement popular Machine Learning and Deep Learning algorithms by both pure python and use open-source frameworks.

  • Common Machine Learning Part: switch by use_sklearn flag in the main function;
  • Deep Learning Part: four implement methods for each algorithm (use_sklearn, use_keras, use_torch and self_implement);
  • Applications Part: RL + NLP + CV
  • New trend: GNNs

Welcome everyone to help me finish this Ko Wu project by pulling requests or giving me some suggestions and issues!!!

关联知乎专栏 Associated Zhihu Blog

RL in Robotics

Machine Learning 格物志

代码目录 Code Catalog

Regression

  1. Single Linear Regression
  2. Multiple Linear Regression

Classification

  1. Logistic Regression
  2. KNN
  3. Support Vector Machine
  4. Naive Bayes

Regression & Classification

  1. Decision Tree
  2. Random Forest

Neural Network

  1. Feedforward Neural Network
  2. Convolutional Neural Network
  3. LSTM

Unsupervised Learning

  1. PCA
  2. K-Means

Ensemble Model

  1. Boosting

Reinforcement Learning

  1. Value Based Methods: Q-learning(Tabular), DQN
  2. Policy Based Methods: Vanilla Policy Gradient, TRPO, PPO
  3. Actor-Critic Structure: AC, A2C, A3C
  4. Deep Deterministic Policy Gradient: DDPG, DDPG C++ (Undone), TD3
  5. Soft Actor-Critic

Computer Vision

  1. GAN
  2. Resnet: Pytorch version, libtorch C++ version
  3. VGG
  4. FlowNet

Natural Language Processing

  1. Attention mechanism
  2. Transformer
  3. BERT

Graph Neural Networks

  1. Graph Neural Network (GNN)
  2. Graph Convolutional Neural Network (GCN)
  3. Graph Attention Networks (GAT)
  4. GraphSAGE
  5. GraphRNN
  6. Variational Graph Auto-Encoders (GAE)

If you're interested in reinforcement learning, we encourage you to check out our latest library of reinforcement learning and imitation learning in (humanoid) robotics.

Release License Documentation Status Build Status

Repository address: https://github.com/Skylark0924/Rofunc

machine-learning-is-all-you-need's People

Contributors

skylark0924 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

machine-learning-is-all-you-need's Issues

the implement of TD error in Actor_Critic

R = 0
saved_actions = self.model.saved_actions
policy_losses = [] # list to save actor (policy) loss
value_losses = [] # list to save critic (value) loss
returns = [] # list to save the true values
# calculate the true value using rewards returned from the environment
for r in self.model.rewards[::-1]:
# calculate the discounted value
R = r + self.gamma * R
returns.insert(0, R)
returns = torch.tensor(returns)

Shouldn't R here be set as the value estimation of the last state?
If I understand correctly, if R is set to 0, the returns for the later t become less accurate, and it also fails to reflect the temporal difference.

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.