Questions tagged [scikit-learn]

Scikit-learn is a machine-learning library for Python that provides simple and efficient tools for data analysis and data mining, with a focus on machine learning. It is accessible to everybody and reusable in various contexts. It is built on NumPy and SciPy. The project is open source and commercially usable (BSD license).

scikit-learn is a machine-learning library for Python that provides simple and efficient tools for data analysis and data mining. It is built on NumPy, SciPy, and matplotlib. The project is open source and commercially usable (BSD license).

Resources

Related Libraries

  • sklearn-pandas - bridge library between scikit-learn and
  • scikit-image - scikit-learn-compatible API for image processing and computer vision for machine learning tasks
  • sklearn laboratory - scikit-learn wrapper that enables running larger scikit-learn experiments and feature sets
  • sklearn deap - scikit-learn wrapper that enables hyper parameter tuning using evolutionary algorithms instead of gridsearch in scikit-learn
  • hyperopt-sklearn - Hyper-parameter optimization for sklearn
  • scikit-plot - visualization library for quickly generating common plots in machine learning studies
  • sklearn-porter - library for turning trained scikit-learn models into compiled , , or code
  • sklearn_theano - scikit-learn-compatible objects (estimators, transformers, and datasets) using internally
  • sparkit-learn - scikit-learn API that uses 's distributed computing model
  • joblib - scikit-learn parallelization library
28024 questions
9
votes
3 answers

Cannot import Scikit-Learn

I tried to install scikit-learn on my Linux Mint 12 but failed. I downloaded the package from http://pypi.python.org/pypi/scikit-learn/ and installed with sudo python2.7 setup.py install I then changed the directory to home and started python2.7…
Rishi
  • 1,987
  • 6
  • 32
  • 49
8
votes
1 answer

How to extract info from scikits.learn classifier to then use in C code

I have trained a bunch of RBF SVMs using scikits.learn in Python and then Pickled the results. These are for image processing tasks and one thing I want to do for testing is run each classifier on every pixel of some test images. That is, extract…
ely
  • 74,674
  • 34
  • 147
  • 228
8
votes
1 answer

CountVectorizer' object has no attribute 'get_feature_names_out'

Why do i keep getting this error? I tried different versions of anaconda 3 but did not manage to get it done. What should i install to work it properly? I used sklearn versions from 0.20 - 0.23. Error message: Code: import pandas as pd import…
A. Omag
  • 117
  • 1
  • 1
  • 7
8
votes
1 answer

How to change colors for decision tree plot using sklearn plot_tree?

How to change colors in decision tree plot using sklearn.tree.plot_tree without using graphviz as in this question: Changing colors for decision tree plot created using export graphviz? plt.figure(figsize=[21, 6]) ax1 = plt.subplot(121) ax2 =…
Karalius32
  • 103
  • 1
  • 6
8
votes
1 answer

logistic regression and GridSearchCV using python sklearn

I am trying code from this page. I ran up to the part LR (tf-idf) and got the similar results After that I decided to try GridSearchCV. My questions below: 1) #lets try…
user2543622
  • 5,760
  • 25
  • 91
  • 159
8
votes
1 answer

Does the pipeline object in sklearn transform the test data when using the .predict() method?

When I use a pipeline object, Does the pipeline object fit and transform the train data when I use the .fit() method? Or should I use the .fit_transform() method? What is the difference between the two? When I use the .predict() method on the test…
user42
  • 871
  • 1
  • 10
  • 28
8
votes
3 answers

Running python scripts in Next.js

Is it possible to call a python script to run server-side by Next.js? I am trying to set up a way to call some python packages I have already developed to be run on my website that is built via React.js + Next.js. I'm hoping to integrate some…
djo
  • 119
  • 2
  • 14
8
votes
2 answers

How to set optuna's study.optimize verbosity to 0?

I want to set optuna's study.optimize verbosity to 0. I thought optuna.logging.set_verbosity(0) might do it, but I still get the Trial 0 finished with value .... updates for every trial What is the correct way to do this? Unfortunately, extensive…
Olli
  • 906
  • 10
  • 25
8
votes
1 answer

HDBSCAN difference between parameters

I'm confused about the difference between the following parameters in HDBSCAN min_cluster_size min_samples cluster_selection_epsilon Correct me if I'm wrong. For min_samples, if it is set to 7, then clusters formed need to have 7 or more…
8
votes
2 answers

Is there a method to do transfer learning with decision trees/random forest?

Is there a way to do transfer learning with a decision tree or a random forest model? Concretely, I was wondering if there is a good and easy way of doing so in Python with a model trained with Scikit-learn. All I can think of is training a random…
IGB
  • 117
  • 1
  • 8
8
votes
1 answer

How to use RFE with xgboost Booster?

I'm currently using xgb.train(...) which returns a booster but I'd like to use RFE to select the best 100 features. The returned booster cannot be used in RFE as it's not a sklearn estimator. XGBClassifier is the sklearn api into the xgboost…
pmdaly
  • 1,142
  • 2
  • 21
  • 35
8
votes
2 answers

AttributeError: 'CRF' object has no attribute 'keep_tempfiles'

I am currently trying to replicate certain methods from this blog https://towardsdatascience.com/named-entity-recognition-and-classification-with-scikit-learn-f05372f07ba2 using the crfsuite library which is supposed to have an attribute called…
CC_
  • 113
  • 1
  • 6
8
votes
3 answers

YellowBrick ImportError: cannot import name 'safe_indexing' from 'sklearn.utils'

I'm trying to plot a silhouette plot for a K-Means model I've run, however, I get the error: ImportError: cannot import name 'safe_indexing' from 'sklearn.utils. I was initially getting the NotFoundError issue described in this post here however I…
softmax55
  • 578
  • 2
  • 7
  • 21
8
votes
1 answer

Typerror (Singleton array...) when using train_test_split within a custom class

TypeError: Singleton array array(<__main__.AZHU_EmailClassifier_2 object at 0x000001D6E7A680D0>, dtype=object) cannot be considered a valid collection. I get this error when I try to run the train_test_split function within my custom…
hunsnowboarder
  • 170
  • 2
  • 18
8
votes
4 answers

TypeError: an integer is required (got type bytes) when importing sklearn

import pandas from sklearn import tree import pydotplus from sklearn.tree import DecisionTreeClassifier import matplotlib.pyplot as plt import matplotlib.image as pltimg dtree = DecisionTreeClassifier() dtree = dtree.fit(X, y) y_pred =…
Salem Arthur
  • 81
  • 1
  • 1
  • 3
1 2 3
99
100