Questions tagged [sklearn-pandas]

Python module providing a bridge between Scikit-Learn’s Machine Learning methods and pandas-style DataFrames

Resources

1336 questions
-1
votes
2 answers

No module named sklearn

I am trying to install sklearn module through pip, but below is the error i am encountered.
iahmed
  • 155
  • 1
  • 2
  • 12
-1
votes
1 answer

Fitting pandas Data Frames to Scikit-Learn’s model without using additional libraries or methods

On the one hand, people say pandas goes along great with scikit-learn. For example, pandas series objects fit well with sklearn models in this video. On the other hand, there is sklearn-pandas providing a bridge between Scikit-Learn’s machine…
-1
votes
3 answers

sklearn Linear Regression coefficients have single value output

I am using dataset to see the relationship between salary and college GPA. I am using sklearn linear regression model. I think the coefficients should be intercept and the coff. value of corresponding feature. But the model is giving a single value.…
Sijan Bhandari
  • 2,941
  • 3
  • 23
  • 36
-2
votes
1 answer

How to convert .csv label by python?

I have a .csv label and have four different categories. and now my .csv file looks like this: id type 1 1 2 2 3 3 4 4 5 2 ... I want to convert it to like: id type1 type2 type3 type4 1 1 0 0 0 2 0 1 …
-2
votes
3 answers

TypeError: __init__() got an unexpected keyword argument 'n_jobs' and n_clusters

hi i got this error while writing this code SSE = [] for cluster in range(1,20): kmeans = KMeans(n_jobs = -1, n_clusters = cluster, init='k-means++') kmeans.fit(data_scaled) SSE.append(kmeans.inertia_) TypeError: __init__() got an…
LO'AY
  • 11
  • 1
  • 1
-2
votes
1 answer

How to create data for machine learning project

I am working on a machine learning project where I am creating data for a user. Data consist of his/her age, year of experience, city, type of business and any previous loan. Rules for the data are like below If a user has good age, high experience…
S Andrew
  • 5,592
  • 27
  • 115
  • 237
-2
votes
1 answer

ValueError: y should be a 1d array, got an array of shape (1, 375) instead

Im made a code which deletes curse words but it says ValueError: y should be a 1d array, got an array of shape (1, 375) instead. As you can see i tried to reshape it but it didn`t work. And i wrote all of the error below the code. import…
-2
votes
2 answers

TypeError: plot_confusion_matrix() got an unexpected keyword argument 'title'

`import matplotlib.pyplot as plt from sklearn.datasets import make_classification from sklearn.metrics import plot_confusion_matrix from sklearn.model_selection import train_test_split from sklearn.svm import SVC cm_plot_labels = ['Normal',…
-2
votes
2 answers

Using Sklearn with NumPy and Images and get this error 'setting an array element with a sequence'

I am trying to create a simple image classification tool. I would like the code below to work with classifying images. It works fine when it is a non image NumPy array. #https://e2eml.school/images_to_numbers.html import numpy as np from…
-2
votes
1 answer

Expected 2D array, got 1D array instead. How to solve it in Linear Regression?

I don't understand why this error has occurred. I am doing exactly what my instructor is doing like. Please give me some solution or told me where is the mistake. Thank you.This is my code
-2
votes
1 answer

AttributeError: module 'sklearn.linear_model' has no attribute 'linearRegression'?

import pandas as pd import numpy as np from sklearn.linear_model import LinearRegression import…
-2
votes
1 answer

I don't know how to pick the weights for my neural network in python

I am doing a homework assignment and I've been stomped for hours and hours looking up how to set the dimensions correctly for random number generated weights for a neural network. No matter how many articles I read or Google search's I do, I can't…
John Heinz
  • 121
  • 10
-2
votes
3 answers

Using train_test_split over a list of dataframes

I have a 12 feature data frames named as X[0], X[1]... till X[11] and corresponding to it 12 response data frames as y[0] to y[11]. I need to split them into train and test data frames using the train_test_split function. As this processes empty…
-2
votes
1 answer

generate normalized discrete values for feature engineering

There is a dataframe, with one columns store the discrete values, shown as follows. I would like to create another column storing the normalized values. For instance, for 4050, the corresponding entry will be 4. Are there any efficient ways to do…
user288609
  • 12,465
  • 26
  • 85
  • 127
-2
votes
1 answer

Scaling feature vectors for machine learning when distribution of features is different

I am trying to scale my feature vector for an algorithm. I have 3 features and 1 target variable. Feature 1: Has a Gaussian-like distribution Feature 2: Skewed, y-value decreases as x increases. Feature 3: Highly skewed. Almost all values are the…
Anuvrat Tiku
  • 1,616
  • 2
  • 17
  • 25
1 2 3
88
89