{"id":13751804,"url":"https://github.com/kingfengji/gcForest","last_synced_at":"2025-05-09T18:32:27.458Z","repository":{"id":40444599,"uuid":"93023551","full_name":"kingfengji/gcForest","owner":"kingfengji","description":"This is the official implementation for the paper 'Deep forest: Towards an alternative to deep neural networks'","archived":false,"fork":false,"pushed_at":"2021-02-04T05:10:47.000Z","size":119,"stargazers_count":1309,"open_issues_count":36,"forks_count":430,"subscribers_count":89,"default_branch":"master","last_synced_at":"2024-04-27T23:58:17.142Z","etag":null,"topics":["deep-forest","ensemble-learning","machine-learning","random-forest"],"latest_commit_sha":null,"homepage":"http://lamda.nju.edu.cn/code_gcForest.ashx","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kingfengji.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-01T06:23:57.000Z","updated_at":"2024-04-26T09:59:06.000Z","dependencies_parsed_at":"2022-09-09T14:41:14.373Z","dependency_job_id":null,"html_url":"https://github.com/kingfengji/gcForest","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingfengji%2FgcForest","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingfengji%2FgcForest/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingfengji%2FgcForest/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kingfengji%2FgcForest/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kingfengji","download_url":"https://codeload.github.com/kingfengji/gcForest/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":213786219,"owners_count":15638379,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deep-forest","ensemble-learning","machine-learning","random-forest"],"created_at":"2024-08-03T09:00:55.072Z","updated_at":"2024-08-03T09:02:45.710Z","avatar_url":"https://github.com/kingfengji.png","language":"Python","funding_links":[],"categories":["梯度提升和树模型","Python"],"sub_categories":[],"readme":"Update (Feb 1, 2021)\n====================\nATTENTION!\n\nThis repository will no longer be maintained, please check our new repository for Deep Forest with GREAT improvements on efficiency.\n\nDetails at:\n\n* Repository: https://github.com/LAMDA-NJU/Deep-Forest\n* Documentation: https://deep-forest.readthedocs.io/\n* Package on PyPI: https://pypi.org/project/deep-forest/\n\n* * *\n\nYou can install the newer version of gcForest via pip\n\n```\npip install deep-forest\n```\n\nThe older version (gcForest v1.1.1) in this repo will only be served as an illustration of the algorithm.\n\n* * *\n\ngcForest v1.1.1 Is Here!\n========\nThis is the official clone for the implementation of gcForest.(The University's webserver is unstable sometimes, therefore we put the official clone here at github)\n\nPackage Official Website: http://lamda.nju.edu.cn/code_gcForest.ashx\n\nThis package is provided \"AS IS\" and free for academic usage. You can run it at your own risk. For other purposes, please contact Prof. Zhi-Hua Zhou (zhouzh@lamda.nju.edu.cn).\n\nDescription: A python 2.7 implementation of gcForest proposed in [1].                                             \nA demo implementation of gcForest library as well as some demo client scripts to demostrate how to use the code.  \nThe implementation is flexible enough for modifying the model or fit your own datasets.                           \n\nReference: [1] Z.-H. Zhou and J. Feng. Deep Forest: Towards an Alternative to Deep Neural Networks.               \n            In IJCAI-2017.  (https://arxiv.org/abs/1702.08835v2 )                                                 \n\nRequirements: This package is developed with Python 2.7, please make sure all the dependencies are installed,     \nwhich is specified in requirements.txt                                                                            \n\nATTN: This package was developed and maintained by Mr.Ji Feng(http://lamda.nju.edu.cn/fengj/) .For any problem concerning the codes, please feel free to contact Mr.Feng.（fengj@lamda.nju.edu.cn)  or open some issues here.\n\n\n\n\n\nWhat's NEW:\n========\n* Scikit-Learn style API\n* Some more detailed examples\n* GPU support if you want to use xgboost as base estimators\n* Support Python 3.5(v1.1.1)\n\n\nv1.1.1 Python 3.5 Compatibility: The package should work for Python 3.5. Haven't check everything for now but it seems OK.\n\n\nv1.1.1 Bug Fixed : When doing multiple predictions for the same model, the result will be consistant if you are using pooling layer. The bug only occurs for the scikit-learn APIs and now it is OK for the new api also.\n\n\n\nQuick start\n=====================\n\n### The simplest way of using the library is as follows:\n```\nfrom gcforest.gcforest import GCForest\ngc = GCForest(config) # should be a dict\nX_train_enc = gc.fit_transform(X_train, y_train)\ny_pred = gc.predict(X_test)\n```\nAnd that's it. Please see ```/examples/demo_mnist.py``` for a detailed useage.\n\n\n\nFor order versons AND some more model configs reported in the original paper, please refer:\n\n* [v1.0](https://github.com/kingfengji/gcforest/tree/v1.0)\n\n\n\nSupported Based Classifier\n=====================\nThe based classifiers inside gcForest can be any classifiers. This library support the following ones:\n* RandomForestClassifier\n* XGBClassifier\n* ExtraTreesClassifier\n* LogisticRegression\n* SGDClassifier\n\n\n\nTo add any classifiers, you could manually add them from ```lib/gcforest/estimators/__init__.py```\n\n\n\nDefine your own structure\n=====================\n\n### Define your model with a single json file.\n* IF you only need cascading forest structure. You only need to write one json file. see /examples/demo_mnist-ca.json for a reference.(here -ca is for cascading)\n* IF you need both fine grained and cascading forests, you will need to specifying the Finegraind structure of your model also.See /examples/demo_mnist-gc.json for a reference.\n* Then, use gcforest.utils.config_utils.load_json to load your json file.\n\n    ```\n    config = load_json(your_json_file)\n    gc = GCForest(config) # that's it\n    ```\n   and run ```python examples/demo_mnist.py --model examples/yourmodel.json```\n### Define your model inside your python scripts.\n  - You can also define the model structure inside your python script. The model config should be a python dictionary, see the ```get_toy_config``` in ```/examples/demo_mnist.py``` as a reference.\n\n\n\n\n\nSupported APIs\n=====================\n*   ```fit_transform(X_train,y_train)```\n*   ```fit_transform(X_train,y_train, X_test=X_test, y_test=y_test)```, this allows you to evaluate your model during training.\n*   ```set_keep_model_in_mem(False)```. If your RAM is not enough, set this to false. (default is True). IF you set this to False, you would have to use ```fit_transform(X_train,y_train, X_test=X_test, y_test=y_test)``` to evaluate your model.\n*   ```predict(X_test)```\n*   ```transform(X_test)```\n\n\nSupported Data Types\n  =====================\n  ### If you wish to use Cascade Layer only, the legal data type for X_train, X_test can be:\n  *   2-D numpy array of shape (n_sampels, n_features).\n  *   3-D or 4-D numpy array are also acceptable. For example, passing X_train of shape (60000, 28, 28) or (60000,3,28,28) will be automatically be reshape into (60000, 784)/(60000,2352).\n\n\n  ### If you need to use Finegraind Layer, X_train, X_test MUST be a 4-D numpy array\n  * for image-like data. the dimension should be (n_sampels, n_channels, n_height, n_width)\n  * for sequence-like data. the dimension should be (n_sampels, n_features, seq_len, 1). e.g. For IMDB data, n_features is 1. For music MFCC data, n_features is 13.\n\n\nOthers\n=====================\nPlease read ```examples/demo_mnist.py``` for a detailed walk-through.\n\npackage dependencies\n========\nThe package is developed in python 2.7, higher version of python is not suggested for the current version.\n\nrun the following command to install dependencies before running the code:\n```pip install -r requirements.txt```\n\nOrder Versions\n=====================\nFor order versons, please refer:\n\n* [v1.0](https://github.com/kingfengji/gcforest/tree/v1.0)\n\nHappy Hacking.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingfengji%2FgcForest","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkingfengji%2FgcForest","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkingfengji%2FgcForest/lists"}