CARVIEW |
Select Language
HTTP/2 200
date: Thu, 17 Jul 2025 12:18:16 GMT
content-type: text/html; charset=utf-8
cf-ray: 9609ae532f33c1bf-BLR
cf-cache-status: DYNAMIC
cache-control: private
set-cookie: prov=9abd4821-411f-4142-a9d8-9c4a66eee552; expires=Fri, 17 Jul 2026 12:18:16 GMT; domain=.stackoverflow.com; path=/; secure; httponly
strict-transport-security: max-age=31536000; includeSubDomains
vary: Accept-Encoding
content-security-policy: upgrade-insecure-requests; frame-ancestors 'self' https://stackexchange.com
feature-policy: microphone 'none'; speaker 'none'
x-frame-options: SAMEORIGIN
x-request-guid: 4f5d5fe6-00e8-43f0-b8cc-42456492d060
x-worker-origin-response-time: 393000000
x-dns-prefetch-control: off
set-cookie: __cflb=02DiuFA7zZL3enAQJD3AX8ZzvyzLcaG7wPBvw1DWEJGwN; SameSite=Lax; path=/; expires=Fri, 18-Jul-25 11:18:16 GMT; HttpOnly
set-cookie: prov=9abd4821-411f-4142-a9d8-9c4a66eee552; Path=/; HttpOnly; Domain=stackoverflow.com
set-cookie: __cf_bm=bBX75IuEh0gHGcP6H47EgH8E9epCUQ_01L9dGHHh1uk-1752754696-1.0.1.1-9ghrpqv.cqycmwzvkyuLiEnXA0NO_0kUoZH1CsJ29R3a1GOlvmCKa1c9QbqyN9guw84p_YRHAtQJIEEim3kPCNMc2jk4Cz.lDRCxS.nma8o; path=/; expires=Thu, 17-Jul-25 12:48:16 GMT; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
set-cookie: _cfuvid=BIOzwYpvX38ptwPlLz1bu7lVzPh4vcVvlTfB8YZ3m1E-1752754696596-0.0.1.1-604800000; path=/; domain=.stackoverflow.com; HttpOnly; Secure; SameSite=None
server: cloudflare
content-encoding: gzip
Newest 'scikit-learn' Questions - Stack Overflow
Skip to main content
Stack Overflow
- Stack Overflow for Teams Where developers & technologists share private knowledge with coworkers
- Advertising Reach devs & technologists worldwide about your product, service or employer brand
- Knowledge Solutions Data licensing offering for businesses to build and improve AI tools and models
- Labs The future of collective knowledge sharing
- About the company Visit the blog
Collectives™ on Stack Overflow
Find centralized, trusted content and collaborate around the technologies you use most.
Learn more about CollectivesTeams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
Learn more about Teams
28,242 questions
- Bountied 0
- Unanswered
- Frequent
- Score
- Trending
- Week
- Month
- Unanswered (my tags)
0
votes
0
answers
31
views
Are SVM models trained with OpenCV (.xml) and scikit-learn (.pkl) identical if trained on the same data with the same parameters? [closed]
I’m training a Support Vector Machine (SVM) classifier using both OpenCV’s cv2.ml.SVM (with RBF kernel) and scikit-learn’s sklearn.svm.SVC. I’m using the same training data and same hyperparameters (C,...
0
votes
1
answer
32
views
Calculating PCA Factor Loadings using sklearn When Using StandardScalar
my goal is to get the correlations between individual variables and principal components in python. I am using PCA in sklearn. However, I didn't want to standardize the data before running the PCA. ...
0
votes
0
answers
17
views
Can I save and load a Keras Model with Feature Names added?
I have data where I need to use numpy's "get_dummies" to convert the one Hot Encoding. When I train from a larger dataset I get all the possible encodings. When I predict I could possible ...
4
votes
1
answer
48
views
Plot confusion matrix in black and white
I currently have the following code:
disp = ConfusionMatrixDisplay(confusion_matrix=cm)
disp.plot()
plt.show()
This results into something like:
However, I want the diagonal to be depicted with a ...
4
votes
2
answers
71
views
Reproduce a particular tree from the random forest using DecisionTreeRegressor
I am trying to replicate a specific decision tree trained by a RandomForestRegressor class, using DecisionTreeRegressor.
However, I cannot get the exact results, even with using the exact same ...
1
vote
0
answers
57
views
Ridge Polynomial Regression: How to get parameters for equation found
I've used sklearn for polynomial ridge regression. Using grid search, I am happy with the results. Now I would like to render it as a simple polynomial equation to run in a small python module. The ...
0
votes
0
answers
43
views
Add Feature extraction as part of a keras model
Is it possible to add feature extraction as part of a keras model, so when a user runs inference there is no need for computing those features as that part is done inside the model. Im looking for a ...
1
vote
1
answer
35
views
Building a sklearn compatible estimator: 'dict' object has no attribute 'requires_fit'
I am trying to build a scikit-learn compatible estimator. I have built a custom class that inherits from BaseEstimator and RegressorMixin. However, when I try to use this, I run into an AttributeError:...
1
vote
0
answers
25
views
DBSCAN clustering points one cluster having points very distant from each other)
I need to cluster a dataset of PFAS pollution, with coordinates (lat, lon). I tried to use DBSCAN as it seemed the go-to solution for spatial data clustering. I do get a result but it seems to be ...
0
votes
1
answer
33
views
Why does the y-intercept change when all features are used in a linear regression model vs only one feature? [closed]
I'm training a linear regression on the "advertising sales dataset"
When I train all of the features(columns) of the dataset together, I get a different y-intercept than if I trained the ...
1
vote
2
answers
97
views
Scikit-Learn Classifier model returns all zeroes
So, I'm trying to train a RandomForestClassifier Model. However, when I train it, it gives me all zeroes. And, I really can't seem to understand why. The dataset is HUGE (closer to like 75,0000 rows), ...
0
votes
0
answers
57
views
GroupKFold vs Random KFold [migrated]
I'm working on a regression task to predict soil organic matter (%) using Gradient Boosting. In order to validate my model, I'm comparing standard KFold (random splits) vs GroupKFold where groups are ...
2
votes
2
answers
82
views
I'm working on a classification task using scikit-learn (LogisticRegression()) [closed]
import pandas as pd
from sklearn.model_selection import train_test_split
from sklearn.preprocessing import MinMaxScaler
from sklearn.linear_model import LogisticRegression
from sklearn.metrics import ...
1
vote
1
answer
69
views
Why does sklearn GaussianMixtures spawn a cmd window when run from IDLE?
When I run this code using IDLE in windows, it spawns a temporary cmd window that disappears shortly thereafter.
import numpy as np
import matplotlib.pyplot as plt
from sklearn.mixture import ...
0
votes
0
answers
48
views
Python LogisticRegression() and RandomSearch: RuntimeWarning
Working on an assignment to knock out a logistic regression with random search for tuning, but I keep getting runtime warnings. Any idea what i'm doing wrong?
/Library/Frameworks/Python.framework/...
- The Overflow Blog
-
-
- Featured on Meta
-
-
-
Related Tags
python × 21950
machine-learning × 8637
pandas × 3432
python-3.x × 2284
numpy × 2271
classification × 1169
svm × 1125
random-forest × 1038
cross-validation × 994
linear-regression × 791
regression × 788
scipy × 773
keras × 722
logistic-regression × 694
pipeline × 660
decision-tree × 652
python-2.7 × 643
sklearn-pandas × 636
cluster-analysis × 631
nlp × 631
data-science × 593
grid-search × 579
k-means × 574
tensorflow × 569
matplotlib × 548
more related tags
Hot Network Questions
- Can sorcerers actually use wizardy spell formulas as their verbal components?
- How is `SELECT` for MS-DOS 3.30 supposed to be used on 360KB floppy systems?
- The Royal Relay on a Chessfield
- Tikz edges are not drawn correctly between dynamically generated nodes
- Is it feasible that cars would be made with a central driving position?
- Replace an old 6502 CPU with a ZIF
- How to determine the dispersion of a model using the DHARMa package in R
- Why don't Research Universities offer Tenure(-track) Teaching Positions
- Table split into two parts but not vertically aligned
- In what sense is Satan the “ruler of this world” in passages like John 12:31 — does this mean he rules through human governments?
- My outdoor faucet leaks whenever I turn it on from the valve stem. It does not leak from the valve stem when it's off
- List installed software each together with its repository component
- Which version of Wind in the Willows did I see in the 1990s?
- How can I improve the appearance of a 3D parametric curve with projections in PGFPlots?
- What is the physical meaning of the metric coefficient in special relativity?
- A word or phrase for denying that a group exists as a political tool?
- How would double jeopardy apply in the P. Diddy case?
- Looking for an Eastern movie where the hero loses one arm in a fight, but then learns how to sword fight with his other arm
- How to prove in general terms using trigonometry that the median perpendicular will divide the diagonal in such a ratio
- The poset of intervals of the free distributive lattice
- Do editors (normally) provide their own input or requests during the review process?
- Why can’t I delete a suspicious PHP file even with root?
- Can a complainant always hire a lawyer to keep himself anonymous, instead of requesting an anonymization order or publication ban?
- Are you supposed to eat the sprig of rosemary served with grilled meat, to cleanse breath?