Questions tagged [mlxtend]

85 questions
0
votes
0 answers

How to plot the loss curve

Trying to plot the training and testing sets vs loss to come up with a plot similar to the one attached (epoch vs. loss). How can I do this using mlxtend (https://rasbt.github.io/mlxtend/user_guide/plotting/plot_learning_curves/)? from…
Z47
  • 67
  • 6
0
votes
1 answer

sklearn: ValueError: multiclass format is not supported

Answers to similar question exist, none worked to me, so I am posting this. Using the mlxtend package to do a sequential forward feature selection. I am working on a multiclass (5 class) problem, and a random forest estimator. from sklearn.ensemble…
arilwan
  • 3,374
  • 5
  • 26
  • 62
0
votes
1 answer

slice the dataframe with certain condition

Currently I have dataframe like this: I want to slice the dataframe by itemsets where it has only two item sets For example, I want the dataframe only with (whole mile, soda) or (soda, Curd) ... I tried to iterate through the dataframe. But, it…
Park Bo
  • 53
  • 7
0
votes
1 answer

Can't set min_confidence in apriori

enter image description here In Python, I am performing Market Basket Analysis/Optimization using the Apriori Algorithm. When I try to set min confidence, this error message appears: apriori() received an unusual keyword argument 'min confidence'. I…
utkarshx27
  • 21
  • 3
0
votes
0 answers

How to plot multiple results (2,3) using mlxtend?

I used 6 models and want to plot all six results in 2 rows and 3 columns. Initially the example code had 4 initial models and I got it from here: http://rasbt.github.io/mlxtend/. The problem is that I plot only intial 4 models. I add clf4 and clf5,…
huanpops
  • 53
  • 4
0
votes
0 answers

Can StackingCVClassifier from mlxtend be used with different input shapes?

My CNN mode, used for binary classification of images, is trained on NumPy arrays with an input shape of (224, 224, 3). On the other hand, my logistic regression mode, used for binary classification of tabular data, is trained on a pandas DataFrame…
zyleen
  • 35
  • 3
0
votes
0 answers

TypeError: __init__() got an unexpected keyword argument 'n_features_to_select' : - feature selection using forward selection

I am trying to do feature selection using feature forward method. Tried previously answered questions but didn't get any proper solution. My code is as follows: def forward_selection_rf(data, target, number_of_features=14): # adapt number…
0
votes
0 answers

Plot decision region does not correspond to my accuracy

I've made some SVM model and I have a problem with some parameters. Here is my code : fig, ax = plt.subplots(3,3, figsize=(15,10)) index = 1 for a,i in zip(ax,C): for b,j in zip(a,G): poly = SVC(kernel='poly', C = i, gamma = j, degree =…
Jonah
  • 3
  • 2
0
votes
0 answers

Stacking classifier in mlxtend have not attribute for transfer learning to get pretrained weights of own model. How to implement transfer learning?

I have developed stacking classifier with DL models in mlxtend library and have trained it, now i want its weights for transfer learning but mlxtend stacking classifier have not attribute to got weights for transfer how can i implement transfer…
Asad Raza
  • 36
  • 6
0
votes
0 answers

mlxtend Sequential Feature Selector (SFS) for Regression

I have used SFS from mlxtend with r2 scorer. The thing about R2 is that in regression models, with addition of new features R2 will always increase. Hence, is it ever useful to use R2 as a scorer or should a custom function with adjusted r2 be…
0
votes
0 answers

Mlxtend plot decision regions, every plot is just filled with one color and no points are being plotted

I am trying to plot decision boundaries for KNN algorithm. I have datasets of following shapes: x_train.shape: (2616, 66) x_test.shape: (655, 66) y_train.shape: (2616,) y_test.shape: (655,) No matter which features I choose to plot the chart always…
0
votes
0 answers

Conection timeout error when installing mlxtend from github on google colab

That's my question too. When I want to install mlxtend from github I got this error: this is my code on google colab: !pip install git+git://github.com/rasbt/mlxtend.git and I got this error: Collecting git+git://github.com/rasbt/mlxtend.git …
0
votes
1 answer

ModuleNotFoundError: No module named 'mlxtend.frequent_pattens'

I have been trying to use apriori algorithm in my Jupyter notebook as well as Google Colab but keep running into the same error. I did everything that i could find. Installed mlxtend package through pip first but it was installed on an entirely…
Addy
  • 13
  • 2
0
votes
1 answer

Classification metrics can't handle a mix of multiclass and multilabel-indicator targets

here is the snippet of my code : from mlxtend.plotting import plot_confusion_matrix from sklearn.metrics import confusion_matrix y_pred = (model.predict(X_test) > 0.5).astype("int32") mat = confusion_matrix(y_test,…
0
votes
0 answers

Using sklearn Pipelines with mlxtend SequentialFeatureSelector gives an error

I am trying to remove some unimportant features for one of my personal projects. Certain but not all features need scaling. I decided to do select the features using SequentialFeatureSelector from mlxtend with cross validation. My understanding is…
Mudyla
  • 277
  • 6
  • 16