Git Product home page Git Product logo

deep-forest's Introduction

WIP

deep-forest

Introduction

Inspired by https://arxiv.org/abs/1702.08835 and https://github.com/STO-OTZ/my_gcForest/

This paper introduces gcForest as an alternative to Deep Learning techniques. Here's an initial implementation of what I concluded the gcForest algorithm is.

To do

  1. Scikit-learn wrapper

Running the example

  1. Create virtual environment: python3.x -m venv env && source env/bin/activate
  2. Install dependencies: pip install -r requirements.txt
  3. Run Jupyter: jupyter-notebook
  4. Open the deep-forest-example notebook

deep-forest's People

Contributors

leopiney 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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

deep-forest's Issues

License

Hi.

Is there any plans to license this project?

IndexError: too many indices for array

Thanks for your implementation!
When I want to train my model,I have a x_train(32300,92160) y_train(32300,1),but I got an error:

- Scanning and fitting for X ((32300,)) and y ((32300,)) started
- Window shape: [1, 23040] Total windows: 69121
Traceback (most recent call last):
File "gcForest_fer.py", line 71, in
mgc_forest.fit(x_train, y_train)
File "/home/wangjian/wj/deep_forest.py", line 68, in fit
for mgs in self.mgs_instances
File "/home/wangjian/wj/deep_forest.py", line 191, in scan
sliced_X, sliced_y = self.slices(X, y)
File "/home/wangjian/wj/deep_forest.py", line 154, in slices
windows_slices_list = X[(slice(None),) + axis_slices]
IndexError: too many indices for array.
Can you tell me why I am wrong? Thank you!

vector length for each level is not the same

Hi, thank you for your implementation.

Based on my understanding of the paper, the length of the vector to each level in figure 1 of the paper should be the same. According to the paper "The estimated class distribution forms a class vector, which is then concatenated with the original feature vector to be input to the next level of cascade".

However, in your implementation, the input to the first level is 1520, the input to the second level is 1560, the input to the third level is 1600, etc.

If I misunderstood the paper, please kindly tell me.

Anyway, I fixed the code myself and find no significant difference in accuracy.

Out of memory when to learn deep forest.

Thaks for your implementation!

When I want to train full of datasets as MNIST, example code is crashed because out of memory.
I commented out some lines that are limit the size of dataset about following codes.

#
# Limit the size of the dataset
#
# X_train = X_train[:2000]
# y_train = y_train[:2000]
# X_test = X_test[:2000]
# y_test = y_test[:2000]

Is these changes something to wrong?
Or does my computer have insufficient memory?

My testing computer is following specs.
OS: Windows 7
CPU: Core i7 970
Memory: 32GB (I only use real memories.)

If this problem causes insufficient memory, I want to know how to economize memory.
(e.g. like mini-batch training in deep neural network)

When I use all the data, the program will report an error.

Thank you for your completion!
err:
A worker process managed by the executor was unexpectedly terminated. This could be caused by a segmentation fault while calling the function or by an excessive memory usage causing the Operating System to kill the worker. The exit codes of the workers are {SIGKILL(-9)}
My computer's memory is 32g.
Have you ever encountered this situation?
Looking forward to your reply!

can't save model

Hi,

following the tutorial in deep-forests-example.ipynb, at the end I tried to save the model using something like with open('out.pkl', 'wb') as pickle_file: pickle.dump(mgc_forest, pickle_file, protocol=2) , but then I get TypeError: can't pickle _thread.RLock objects.

Is there a way to save the model for later use?

data format

Hi,
currently, I am trying use this deep forest model to test the EEG signal for the sleep stage classification. However, the dataset is 1-d, not the 2-d like image. So, could you lend me a hand, how can I change the code and make it possible for 1-d datasets training.
Great thanks!!!

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.