Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
scikit-learn is a popular machine learning package for Python that has simple and efficient tools for predictive data analysis. Topics include classification, regression, clustering, dimensionality reduction, model selection, and preprocessing.
1
vote
1
answer
385
views
Is it possible to use a pretrained scikit learn model to make predictions on a dataset with ...
Say we have a model trained on dataset A, which has a number of features, as usual. We then persist that model to disk and use it when we need to run inference (make predictions). Usually we run infer …
21
votes
Accepted
What is the difference between CountVectorizer token counts and TfidfTransformer with use_id...
Actually, the documentation was pretty clear. I'll keep it posted in case someone else searches before reading:
The TfidfTransformer transforms a count matrix to a normalized tf or tf-idf representati …
20
votes
3
answers
43k
views
What is the difference between CountVectorizer token counts and TfidfTransformer with use_id...
We can use CountVectorizer to count the number of times a word occurs in a corpus:
# Tokenizing text
from sklearn.feature_extraction.text import CountVectorizer
count_vect = CountVectorizer()
X_train …
2
votes
Accepted
What do you pass for the cv parameter in the sklearn method cross_val_score
It determines the splitting strategy used by sklearn.
The default (“none”) is 3-fold CV.
Doc
6
votes
Accepted
How to check for overfitting with SVM and Iris Data?
You check for hints of overfitting by using a training set and a test set (or a training, validation and test set). As others have mentioned, you can either split the data into training and test sets, …
2
votes
2
answers
1k
views
Generating synthetic data based off existing real data (in Python)
I am looking for an approach to generate synthetic data for anomaly detection. We have real data, but want to inject anomalies to battle-test the model (the real data is too limited for likely future …