Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

problème des résultats #105

Open
fedala56 opened this issue Jul 9, 2020 · 7 comments
Open

problème des résultats #105

fedala56 opened this issue Jul 9, 2020 · 7 comments
Labels
bug Something isn't working

Comments

@fedala56
Copy link

fedala56 commented Jul 9, 2020

Bonjour,
je me permets de vous écrire afin de vous exposer mon problème.

  1. j'ai pris votre application "Qonnections-ML Model(Completed App) et je l'ai appliqué sur mes données tous ça fonction bien , j'ai eu des résultats , et sur les même données j'ai fais une régression logistique sous python pour que je compare les résultats , mais malheureusement si je prends juste par exemple la matrice de confusion j'obtiens pas les même résultats y a une grande différence entre celle de python et celle de Qlik. j'aimerai bien comprendre pourquoi on obtient des résultats différents.
  2. Pour la feuille "Actual vs Predictions" : Pour on calcul les prédictions pour toute la data par sur le test-set et après on compare les résultats avec le test_set réel .
    Cordialement
    Nedjmila
@fedala56 fedala56 added the bug Something isn't working label Jul 9, 2020
@nabeel-oz
Copy link
Owner

nabeel-oz commented Jul 10, 2020

Hi @fedala56 ,

I don't speak French so I've used Google Translate on your post. I'm not sure if I understood the second point of your post correctly.

Assuming the model parameters are the same, the difference could be in the data split or how the confusion matrix is being calculated.

We are using K-fold cross validation in the sample app. The confusion matrix is built using results from the sklearn.model_selection.cross_val_predict method.

# Get cross validation predictions for the confusion matrix
y_pred = cross_val_predict(self.model.pipe, self.X_train, y_train, cv=self.model.cv, fit_params=fit_params)

In the app cv is set to 3. So this method splits the data into 3 different train and test sets, trains an estimator on each train set and returns predictions from each test set. Each sample ends up in the test set once.

So we can use the full training data to build the confusion matrix. I'm using the sklearn.metrics.confusion_matrix method.

To calculate metrics using a hold-out dataset you can use the PyTools.sklearn_Calculate_Metrics(model_name, n_features) method. This is described here.

Cheers,
Nabeel

@fedala56
Copy link
Author

fedala56 commented Oct 12, 2020 via email

@nabeel-oz
Copy link
Owner

Hi Nedjmila, the images failed to upload on GitHub so I can't see the screenshots. Can you please try to repost? Also, did you see any errors when reloading the app?

@fedala56
Copy link
Author

fedala56 commented Oct 19, 2020 via email

@nabeel-oz
Copy link
Owner

That didn't seem to work either. You'll have to login to GitHub to post the attachments as they do not seem to get uploaded when replying by email.

#105

@fedala56
Copy link
Author

Bonjour
voila le fichier que j'ai insérer l'erreur

erreur.pdf
Merci

@nabeel-oz
Copy link
Owner

Hi, the error from Qlik doesn't tell us enough. Can you look at the logs from the terminal where you are running the SSE?

If the H5 file is missing there was an error while training or saving the Keras model. It may be an error in the installation of some required package like Keras or Tensorflow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants