GithubHelp home page GithubHelp logo

zhiningliu1998 / mesa Goto Github PK

View Code? Open in Web Editor NEW
104.0 7.0 24.0 1.66 MB

[NeurIPS’20] ⚖️ Build powerful ensemble class-imbalanced learning models via meta-knowledge-powered resampler. | 设计元知识驱动的采样器解决类别不平衡问题

Home Page: https://arxiv.org/abs/2010.08830

License: MIT License

Python 33.48% Jupyter Notebook 66.52%
imbalanced-learning imbalanced-data meta-learning-algorithms meta-sampler ensemble ensemble-model ensemble-machine-learning mesa meta-training class-imbalance

mesa's Issues

数据贴标签以及train_ir设置问题

[作者你好,很荣幸能够接触您整理和开源的这个项目。手上正好有一个数据不均衡的多分类项目,我尝试了imbalanced-ensemble中所有的方法,对于我的项目并没有太好的提升。所以想试试这个元学习,之前没有接触过元学习,因为项目急急可能没法去补充详细知识,问的问题可能有点。。。。

是这样的,我把我的数据转换成多个二分类来适应这个项目。但是在运行时,在train_ir有点问题。这个图片的代码是需要0是多数类,1是少数类嘛?不然得需要用train_ir来控制吧?同时这里的imbalance ratio是期望多数类比少数类吧?

同时想问下,对于离散特征数据,多分类数据重叠和不均衡有没有很什么好方法可以推荐下。

最后,再感谢大佬开源的项目。祝您身体健康,合家欢乐。

xx

error : mesa.predict_proba

import time
from mesa import Mesa
from arguments import parser
from utils import Rater, load_dataset
from sklearn.tree import DecisionTreeClassifier

if name == 'main':

# load dataset & prepare environment
args = parser.parse_args()
rater = Rater(args.metric)
X_train, y_train, X_valid, y_valid, X_test, y_test = load_dataset(args.dataset)
base_estimator = DecisionTreeClassifier(max_depth=None)

# meta-training
print ('\nStart meta-training of MESA ... ...\n')
mesa = Mesa(
	args=args, 
	base_estimator=base_estimator, 
	n_estimators=args.max_estimators)
mesa.meta_fit(X_train, y_train, X_valid, y_valid, X_test, y_test)
mesa.predict_proba(X_test)

run....................

mesa.predict_proba(X_test)

File "D:\pyyj\mesa-master\environment.py", line 84, in predict_proba
if y_pred.shape[1] == 1:

IndexError: tuple index out of range

Issue running model

Hi,

Thanks for the great work. I tried installing the dependencies as in explained in the last version of the ReadMe file and I got:

RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [50, 1]], which is output 0 of AsStridedBackward0, is at version 3; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

Alternatively, when installing the same version of pytorch 1.0.0 with GPU support I got this different issue:
https://discuss.pytorch.org/t/undefined-symbol-cblas-sgemm-alloc/32497

Is there any other way to build the dependencies?

在多分类任务下报错

我尝试直接修改源代码中的工具类utils.py,完全按照load_dataset的方式读取了自己的数据集,在Rater类下的score函数里加上了acc和micro f1_score尝试做多分类下的评估,用y_pred.argmax(axis=1)来确定预测类别,但是要么维度不匹配,要么就返回TypeError: Singleton array 4 cannot be considered a valid collection..,请问有没有多分类的usage案例可供学习使用?

请求修改代码以适配torch新的版本

查资料torch1.4.0以后的版本会报错
RuntimeError: one of the variables needed for gradient computation has been modified by an inplace operation: [torch.FloatTensor [50, 1]], which is output 0 of AsStridedBackward0, is at version 3; expected version 2 instead. Hint: enable anomaly detection to find the operation that failed to compute its gradient, with torch.autograd.set_detect_anomaly(True).

1.4.0是比较老的版本了 好像不支持python3.9 所以请求修改mesa的代码以适配新的torch
谢谢大神!!!

Not able to run the model

Hi,

I've been trying to run your mesa_example notebook, however, I haven't managed to make it work. When the meta_fit() method is called, I'm getting a RuntimeError. I've tried debugging it, but without any luck. Here is a screenshot of the problem:

Screenshot 2021-08-18 at 12 54 42

Have you encountered this? If yes, could you please tell me how to fix it?

Thanks in advance!

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.