About 4,940,000 results
Open links in new tab
  1. Difference between scikit-learn and sklearn (now deprecated)

    Regarding the difference sklearn vs. scikit-learn: The package "scikit-learn" is recommended to be installed using pip install scikit-learn but in your code imported using import sklearn. A bit …

  2. Passing categorical data to Sklearn Decision Tree

    Yes decision tree is able to handle both numerical and categorical data. Which holds true for theoretical part, but during implementation, you should try either OrdinalEncoder or one-hot …

  3. How to use datasets.fetch_mldata() in sklearn? - Stack Overflow

    I am trying to run the following code for a brief machine learning algorithm: import re import argparse import csv from collections import Counter from sklearn import datasets import …

  4. python - Will scikit-learn utilize GPU? - Stack Overflow

    The syntax of the sklearn code can remain the same. Whenever equivalent cuML functions don't exist, it will fallback to using the sklearn implementation on CPU.

  5. How to convert a Scikit-learn dataset to a Pandas dataset

    How do I convert data from a Scikit-learn Bunch object to a Pandas DataFrame? from sklearn.datasets import load_iris import pandas as pd data = load_iris () print (type (data)) …

  6. Visualizing decision tree in scikit-learn - Stack Overflow

    I am trying to design a simple Decision Tree using scikit-learn in Python (I am using Anaconda's Ipython Notebook with Python 2.7.3 on Windows OS) and visualize it as follows: from pandas …

  7. sklearn plot confusion matrix with labels - Stack Overflow

    I want to plot a confusion matrix to visualize the classifer's performance, but it shows only the numbers of the labels, not the labels themselves: from sklearn.metrics import confusion_matrix …

  8. matplotlib - How to plot ROC curve in Python - Stack Overflow

    from sklearn.metrics import confusion_matrix, accuracy_score, roc_auc_score, roc_curve import matplotlib.pyplot as plt import seaborn as sns import numpy as np def plot_ROC(y_train_true, …

  9. python - How to find the importance of the features for a logistic ...

    Since scikit-learn 0.22, sklearn defines a sklearn.inspection module which implements permutation_importance, which can be used to find the most important features - higher value …

  10. Parameter "stratify" from method "train_test_split" (scikit Learn)

    I am trying to use train_test_split from package scikit Learn, but I am having trouble with parameter stratify. Hereafter is the code: from sklearn import cross_validation, datasets X = …