Questions tagged [scikit-learn]

For questions related to the Python's package scikit-learn (or sklearn).

Filter by
Sorted by
Tagged with
0
votes
0answers
10 views

Should I use keras or sklearn for PCA? [migrated]

Recentl I saw that there is some basic overlapping of functionality between keras and sklearn regarding data preprocessing. So I am a bit confused that whether should I introduce a dependency on ...
1
vote
0answers
30 views

Why isn't my decision tree classifier able to solve the XOR problem properly?

I was trying to solve an XOR problem, and the dataset seems like the one in the image. I plotted the tree and got this result: As I understand, the tree should have depth 2 and four leaves. The ...
0
votes
0answers
11 views

Train a model using a multi-column text-filled excel sheet

I have an excel sheet filled with my own personal appreciations of movies I've watched, and I want to use it to train an AI model so that it can predict if I'll like a specific movie or not, based on ...
2
votes
0answers
38 views

Suitable deep learning algorithms for spatial / geometric data

I have a task of classifying spatial data from a geographic information system. More precisely, I need a way to filter out unnecessary line segments from the CAD system before loading into the GIS (...
2
votes
1answer
24 views

deep learning with kfold cross validation with epochs

I am new into neural networks, I want to use K-fold cross-validation to train my neural network. I want to use 5 folds 50 epochs and a batch size of 64 I found a function in scikit for k-fold cross ...
1
vote
1answer
19 views

Code freezes and never returns when linear_kernel (sklearn.metrics.pairwise) is used on 20M Movielens dataset

I'm fairly new to ML/AI, i'm trying learn the content based recommendation - here is my source code - https://github.com/jaganlal/content-based-recommender I'm using MovieLens 20M dataset - tags.csv ...
0
votes
0answers
26 views

How would I go about performing a single step of gradient descent on this model?

I have a classification model that consists of a CNN followed by an SVM. I used the Keras library for the CNN portion and sklearn for the SVM portion. I am assuming I will have to fiddle with the ...
1
vote
1answer
67 views

Interpretation of feature selection based on the model

The description of feature selection based on a random forest uses trees without pruning. Do I need to use tree pruning? The thing is, if I don't cut the trees, the forest will retrain. Below in the ...
1
vote
0answers
40 views

How can I split the data into training and validation sets such that entries with a certain value are kept together?

I have the following kind of data frame. These are just example: A 1 Normal A 2 Normal A 3 Stress B 1 Normal B 2 Stress B 3 Stress C 1 Normal C 2 Normal C 3 Normal ...
3
votes
1answer
139 views

Is there any Python library available for manifold learning using diffusion map? [closed]

I would like to use unsupervised learning with a technique called diffusion map based manifold learning in Python. The original paper on the diffusion map is An Introduction to Diffusion Maps. I have ...
1
vote
1answer
28 views

How can I access the weights at each training iteration of an MLP with scikit-learn?

I'm building an MLP with scikit-learn. Is there a way I can access the weights and biases of the output layer per iteration? There is an option mlp.coefs_, but it ...
3
votes
2answers
106 views

Can ML be used to curve fit data based on dataset of example fits?

Say I have x,y data connected by a function with some additional parameters (a,b,c): $$ y = f(x ; a, b, c) $$ Now given a set of data points (x and y) I want to determine a,b,c. If I know the model ...
2
votes
1answer
40 views

Is it compulsary to normalize the dataset if doing so can negatively impact a Binary Logistic regression performance?

I am using raw data set with 4 feature variables (Total Cholesterol, Systolic Blood Pressure, Diastolic Blood Pressure, and Cigraeette count) to do a Binominal Classification (find stroke likelihood) ...
2
votes
0answers
41 views

How can I use gradient boosting with multiple features?

I'm trying to use gradient boosting and I'm using sklearn's GradientBoostingClassifier class. My problem is that I'm having a data frame with 5 columns and I want ...
4
votes
1answer
65 views

Are there Python packages for random search hyper-parameter optimisation?

Which Python packages do you recommend for random search hyperparameter optimization to use? Is there any recent and good one (better than the one in scikit-learn)?