Stack Exchange Network

Stack Exchange network consists of 174 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Scikit-learn is a Python module comprising of simple and efficient tool for machine learning, data mining and data analysis. It is built on NumPy, SciPy, and matplotlib. It is distributed under the 3-Clause BSD license.

0
votes
1answer
7 views

High RMSE and MAE and low MAPE

I have used a few regression models on the same dataset and obtained error metrics for them as shown below, The RMSE(Root Mean Squared Error) and MAE(Mean Absolute Error) for model A is lower than ...
2
votes
0answers
9 views

Scikit-learn average_precision_score() vs. auc score of precision_recall_curve()

I've been searching around for an explanation to this, and haven't come across one yet- in scikit-learn, when I compute the auc() of the ...
2
votes
0answers
4 views

What would be the main and essential criteria for evaluating auto-sklearn library ?

I m running experiments using benchmark datasets with auto-sklearn to see how its performance is different to the standard sklearn library, Since automl does an exhaustive search over parameters and ...
0
votes
0answers
17 views

Different results for Linear Regression using lm (R) vs linear_model (sklearn-python)?

I'm implementing a linear regression to compare users (categorical variable) to a percent difference (target variable and continuous). When I was using linear_models from sci-kit learn (python), the ...
0
votes
1answer
11 views

Classification models with multi-class allowed for each record

I am training a multi-class classification model. Each record can belong to one or more classes. (actually can I still call it a classification model? or should it ...
0
votes
0answers
6 views

The Meaning Behind the Cross Validation Score in Factor Analysis

In order to choose the best number of underlying factors for my data using factor analysis, I decided to use the tutorial outlined in scikit-learn's documentation. Running ...
0
votes
1answer
18 views

How can I find anomalies in each row of data?

I have some reported data I want to spot anomalies on. The columns are a facility name then monthly reports of that given facility. ...
0
votes
0answers
8 views

How choosing a value for random_state argument in sklearn.model_selection works?

I have been using sklearn for quite some time and I understand using the same number say 100 or 200 as a value for the ...
0
votes
0answers
5 views

Hierarchical Single-Link Clustering BGP Updates

I'm currently working in a project where I'm analyzing a series of BGP Updates obtained through RouteViews, I organized these updates in a dataframe and it comes with the next format: BGP4MP|...
1
vote
1answer
16 views

sklearn nmf - question about its use

This is a complete noob question, I'm new to Python, and I understand the basics of NMF, but when implementing it in sklearn it seems a bit convoluted and I wanted to ask whether anyone knows how to ...
1
vote
1answer
18 views

Does MLPClassifier (sklearn) support different activations for different layers?

Documentation says 'activation' argument specifies "Activation function for the hidden layer". Does that mean you cannot use different activation functions in different layers?
2
votes
2answers
23 views

Featuring scaling whole data set before spliting it. [duplicate]

I am wondering why do we use scaling on train and test set separately. I understand that transform () on test data μ and σ as computed from fit_transform() on Train. But why can we compute μ and σ ...
0
votes
1answer
28 views

How to show progress of sklearn.multioutput.MultiOutputRegressor and XGBRegressor?

Is it possible to show the training progress of the MultiOutputRegressor in sklearn? When a huge dataset is processed, my program runs a long time and I have no clue how long it will take. I have ...
1
vote
1answer
25 views

Why is ElasticNet performs worse than both Lasso and Ridge?

I am using the following codes to build a few models on the same dataset: ...
1
vote
0answers
9 views

The use of feature scaling in scikit learn

I'm studing machine learning from here and the course uses 'Scikit Learn' for regression - https://www.udemy.com/machinelearning/ I can see that for some training regression algorithms, the author ...
0
votes
0answers
17 views

Huge error using MLPRegressor with sklearn

This is my first question, so I don't know if I'm doing it right. I have a dataset with a single value for each months of 86 years (I don't think what they mean are important for the question). I'm ...
2
votes
1answer
26 views

Low silhouette coefficient

I am doing a kmeans clustering on a dataset of selling values of articles. Each article has 52 selling values (one per week). I am trying to automatically calculate the optimum amount of clusters ...
1
vote
0answers
5 views

heterogeneous input features for estimators in sklearn.ensemble.VotingClassifier

I would like to do ensemble on my model. Two of them are SVM and XGBoosting. SVM could not tolerate null value and XGB can do it. So I have different features for each of them. but when ...
0
votes
1answer
15 views

sklearn cross_validate without test/train split

I'm running cross validation on my training data: ...
0
votes
0answers
19 views

Lasso regression: why we need fit_intercept?

I am looking into the sklearn lasso function. There is a parameter called fit_intercept=True. This is a bit confusing to me ... ...
0
votes
0answers
10 views

Add constrain in to the linear regression. potentially still using sklearn

I am using sklearn to fit a simple lasso regression model. ...
0
votes
1answer
17 views
0
votes
1answer
23 views

Anomaly detection using clustering of highly correlated Categorical data

My data has two columns and both are highly correlated e.g. if column1 has value ABC, column2 should be XYZ i.e. ABC-->XYZ. If column2 has anything else its Anomaly. Likewise there are thousands of ...
0
votes
1answer
21 views

what does this doc2vec based ML predict?

I'm trying to understand what does this ML program - which based on doc2vec - predict: ...
2
votes
1answer
46 views

Improve results of a clustering

I'm a beginner and I'm trying to do a clustering of a multi-sentence text, but my results are horrible. Any tips for me to improve my result? ...
2
votes
1answer
27 views

Predict the accuracy of Linear Regression

How do I test if the predicted values in Linear Regression model are matching with the actuals? I tried using - Confusion matrix, but I get this error - ...
0
votes
0answers
5 views

Implementation of Fisher's extact test in Scikit-learn

How to implement efficiently Fisher's extact test in Scikit-learn to use it with SelectKBest in an optimal way ?
1
vote
1answer
61 views

How to adjust the hyperparameters of MLP classifier to get more perfect performance

I am just getting touch with Multi-layer Perceptron. And, I got this accuracy when classifying the DEAP data with MLP. However, I have no idea how to adjust the hyperparameters for improving the ...
-1
votes
0answers
11 views

Some precisions about SelectKBest fo Sklearn

Is it possible to select features according to the k lowest p-values ? If yes, can you tell me how ?
0
votes
0answers
22 views

Logistic Regression sklearn vs matlab Different Answers

Years ago I built a model in Matlab that used glmfit(X, Y, 'binomial, 'link', 'logit') and I am now trying to transfer the model to python using sklearn (i.e sklear.linear_model.LogisticRegression). ...
0
votes
1answer
51 views

250 Categorical values

I have a dataset which has only categorical values. As I came across a few articles people suggested that KNN / Random forest would work for dataset like this. Though in R it couldn't handle as if ...
0
votes
1answer
20 views

Convert nominal to numeric variables?

I am trying to develeop an algorithm with sklearn and Tensorflow to predict which car can be offer to each customer. To do that I have a database with the answers of one survey to 1000 customers. An ...
0
votes
1answer
57 views

How to find AUC metric value for keras model?

I have wanted to find AUC metric for my Keras model. Keras doesn't have any inbuilt function to measure AUC metric. So I found that write a function which calculates AUC metric and call this function ...
0
votes
1answer
19 views

What is the best statistical measure tool to measure how close data is to fitted regression line if outliers are not fitted

I am using a custom algorithm based on Gradient descent which computes the best fit on a training dataset. In this data set I have outliers i.e. data points that I do not want to fit. The algorithm is ...
3
votes
5answers
192 views

I got 100% accuracy on my test set,is there something wrong?

I got 100% accuracy on my test set when trained using decision tree algorithm.but only got 85% accuracy on random forest Is there something wrong with my model or is decision tree best suited for the ...
0
votes
0answers
18 views

Selecting the best combination of machine learning models for voting

I am thinking about using Sklearn's VotingClassifer for a dataset. I have heard about people winning in machine learning competitions (like those from Kaggle) by correctly utilizing voting/stacking. ...
1
vote
1answer
28 views

Why should re-sampling change the value of model's coefficients?

I have the code below in python to create LinearRegression model. When I train the model with re-sampled data, I get different values for its coefficients. I can't understand why that happens. Can you ...
0
votes
0answers
19 views

Number of clusters with eigengap method in spectral clustering

I would like to find the number of clusters for spectral clustering which I could apply to my data. I've tried eigengap technique on a cosine similarity matrix and got the following plot: The gap ...
0
votes
1answer
39 views

Titanic Kaggle Data: Why am I getting lower accuracy on Kaggle submissions than on held-out data?

I am going through my first solo machine learning project and would like to gain some insight into what I am doing wrong/what is going on here as I am a bit stuck. I have been applying machine ...
1
vote
1answer
81 views

invalid character in identifier

I ran this code and this doesn't work, I'm using python 3 btw, I have checked the syntax a million times. I have installed all the necessary packages and all of them are up to date, here is the code I ...
0
votes
1answer
31 views

How do I plot linear regression results if input and target have different sizes? [closed]

For a linear regression model that I conducted, I'd like to review the regression plot of results. But since I have an input of size 6 parameters and target (output therefore) of 4, I get error when I ...
0
votes
1answer
30 views

Value error array with 0 features in linear regression scikit

My input and output data are written in an 6xn row-column excel file,thatI read them using pandas using this code : ...
0
votes
0answers
15 views

Visualize similar looking words plus time related feature

I would like to visualize a high dimensional space consisting of words, the way the look and when were they more used. For the similarity I use various ranges of ngrams on the letters (this ...
0
votes
2answers
72 views

Why is this Random Forest perfect?

I'm learning Random Forest Classifier from a video, where the instructor got a score of 0.44, while I'm getting 0.9985 ( But actually it's perfect). Did I overfit it? If so what is the next step? ...
0
votes
0answers
16 views

Is there a method to always overshoot in regression? [duplicate]

I'm creating a regression model to predict some quantity. If the model predicts a value lower than the actual value, it incurs a monetary cost. If the model predicts far too high of a value, it only ...
0
votes
1answer
22 views

How to use same encode label with same value used in training

I did save my model and using that model I want to predict the data. I am using Flask HTTP server for prediction endpoint. I have training data like this. I did save my model and using that model I ...
1
vote
1answer
35 views

Mean error (not squared) in scikit-learn cross_val_score [closed]

I need to know if the values generated by each fold of cross_val_score have a distribution which is centered on zero. Something as simple as the median or mean of <...
2
votes
1answer
58 views

cross_val_score meaning

I'm studying the following code, which cross_val_score_ was used as well as .mean() and .std(). I read many documentation of the meanings, but didn't get what each of the above does. ...
0
votes
0answers
117 views

Isolation Forest Feature Importance

As of scikit-learn version 0.19.1, there is no implementation for calculating feature importance in an Isolation Forest. I'm also having trouble finding any online resources proposing ways to get at ...
3
votes
1answer
34 views

Sklearn: unsupervised knn vs k-means

Sklearn has an unsupervised version of knn and also it provides an implementation of k-means. If I am right, kmeans is done exactly by identifying "neighbors" (at ...