Comments (9)
Could you share the dimensions of X_trainTF and y_train?
from smote_variants.
Could you share the dimensions of X_trainTF and y_train?
(4621, 2134) , (4621,)
from smote_variants.
Interesting, which version of Python and numpy are you using? There might have been some changes in the latest versions which have not been checked yet. (up to P3.9 were the tests executed, I should cover the most recent versions soon)
from smote_variants.
@
Interesting, which version of Python and numpy are you using? There might have been some changes in the latest versions which have not been checked yet. (up to P3.9 were the tests executed, I should cover the most recent versions soon)
python version is 3.7.13
numpy version is 1.21.6
from smote_variants.
Cool, this is not the case then, it should work with this setup. If it is not much of a burden, could you please prepare a minimal working example, like replacing the X_trainTF and y_train with some random arrays of the same size, feed them into the MulticlassOversampling and see if it fails? I could use that as a minimal working example for debugging.
Also, could you please share the label distribution in y_train? Are the labels of integer type?
from smote_variants.
Cool, this is not the case then, it should work with this setup. If it is not much of a burden, could you please prepare a minimal working example, like replacing the X_trainTF and y_train with some random arrays of the same size, feed them into the MulticlassOversampling and see if it fails? I could use that as a minimal working example for debugging.
Also, could you please share the label distribution in y_train? Are the labels of integer type?
this is my google colab workspace https://colab.research.google.com/drive/1ETmdFjWEJdayBq_Ji3Eu6qKprrc0lC_G?usp=sharing
and the dataset file:
Suicidal_K1_Train.csv
from smote_variants.
Perfect, I look into it!
from smote_variants.
Perfect, I look into it!
thank you very much!
from smote_variants.
Hi @ppleumyy, so, all the smote_variants
tools operate on numerical arrays. Your y_train
contains strings, and it is a pandas Series, while your X_trainTF is a sparse array (it needs to be dense). So with the following changes, everything seems to work as expected:
y_train[y_train == 'Level 1'] = 1
y_train[y_train == 'Level 2'] = 2
y_train[y_train == 'Level 3'] = 3
y_train[y_train == 'Level 4'] = 4
y_train[y_train == 'Level 5'] = 5
y_train[y_train == 'Other'] = 0
y_train= y_train.values
X_trainTF= X_trainTF.todense()
from smote_variants.
Related Issues (20)
- Minimum number of rows in a class HOT 1
- when use SOMO,Why did the two types of samples not reach a balance and the number did not change HOT 2
- provided out is the wrong size for the reduction
- Categorical Variables HOT 1
- How to vary the "proportion" parameter - MulticlassOversampling class
- Could I apply this package to the time-series raw data?
- Question HOT 2
- Question: Combining these with Undersampling HOT 3
- Question: Regarding time complexity of Oversamplers and "Noise Filters" HOT 1
- GridSearchCV classifier parameters: int vs list HOT 3
- Implement 'verbose' parameter (feature request) HOT 2
- sv.MulticlassOversampling error for getattr() function HOT 2
- Error: Dimension of X_train and y_train is not the same ! HOT 2
- OversamplingClassifier does not work with probability-based metrics HOT 3
- Support for python 3.11 HOT 1
- Remove warnings
- Can smote_variants deal with 3_class data?
- I got this error when I used polynom_fit_SMOTE.
- model hyperparameters be adjusted before and after oversampling?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from smote_variants.