Skip to main content

All Questions

0 votes
0 answers
38 views

AttributeError: module 'scikit_posthocs' has no attribute 'plot_cd_diagram'

I'm trying to plot the critical difference diagram in Nemenyi post-hoc test using the scikit-learn. # Step 6: Visualize the Results with Critical Difference Diagram plt.figure(figsize=(8, 6)) sp....
Jyoti's user avatar
  • 65
-2 votes
1 answer
87 views

Cannot convert dataframe column to a int64 data type

I have a problem. In my Pandas DataFrame, I have a column called 'job' column. I've created a simple and custom transformer that will map values in that column that corresponds to the type of job. The ...
coffee_programmer's user avatar
5 votes
1 answer
130 views

Python 3.10.4 scikit-learn import hangs when executing via CPP

Python 3.10.4 is embedded into cpp application. I'm trying to import sklearn library which is installed at custom location using pip --target. sklearn custom path (--target path) is appended to sys....
Vinay Gudisagar's user avatar
0 votes
0 answers
38 views

How to implement pipeline into machine learning model

I would like to implement Onehot encoding and label encoding to my dataset using Pipeline into my random forest model. I have created a function that utilize pipeline from scikit learn together with ...
Stackie's user avatar
1 vote
1 answer
72 views

model.compile loss TypeError: Missing required positional argument

The minimum example is import numpy as np import tensorflow as tf from tensorflow import keras from keras.losses import huber # create dataset x = np.random.rand(10, 1) y = 2 * x + np.random.randn(10,...
iris_hu's user avatar
  • 183
0 votes
0 answers
455 views

How to import the California housing dataset in an IDE like google colab

I tried importing the California housing dataset in my Kaggle and google colab notebook but I got an HTTPError. However this code works well on my Jupyter notebook from sklearn.datasets import ...
Idowu 's user avatar
0 votes
0 answers
55 views

Sklearn transformer output returns more columns with some columns not having the transformation

I am building a scikit-learn pipeline. I downloaded a dataset from an online ML repository and generated descriptive stats for it. I am using the processed.cleveland.data dataset found here: https://...
EngineerP's user avatar
1 vote
2 answers
6k views

ModuleNotFoundError: No module named 'sklearn.ensemble._gb_losses'

i have install the scikit_learn and tried to install multiple version but not able to download not able to find answer for sklearn.ensemble._gb_losses from flask import Flask, render_template, request ...
Atharv Thombare's user avatar
0 votes
2 answers
299 views

Not sure on how to use the make_pipeline of sklearn correctly

I am playing around with the titanic ddataset and trying to make a correct usage of the sklearn make_pipeline, but I'm becoming a little confused on how tu correctly build the pipelines. Here's the ...
Dimitri's user avatar
  • 117
0 votes
1 answer
157 views

Automate the calculation in Python of a Distribution Function in a system of equations

I would like to calculate an approximation of the data Distribution Function in a system of equations: F(t) := P(X <= t) ~ sum_i_frequency(observation_i <=t) / total_observation =: f(t) My data:...
Tappetinoorange's user avatar
-1 votes
2 answers
416 views

AttributeError: 'numpy.ndarray' object has no attribute 'columns' -> when I didn't even change dataframe into np.ndarry

Currently I am trying to crack the Spaceship Titanic Dataset from Kaggle and when I was in the process of doing so I got an error (below). In the code below X is the same dataset after removing the ...
PRADDYUMN YADAV's user avatar
-1 votes
1 answer
476 views

The right way of using SMOTE in Classification Problems [closed]

What is the right way to implement SMOTE() in a classification modeling process? I am really confused about how to apply SMOTE() there. Say I have the dataset split into train and test like this as a ...
Bathtub's user avatar
  • 111
0 votes
1 answer
637 views

"enable_categorical=True" encoding method for xgboost library in Python

Let's assume X_train contains both numerical and categorical variables. import xgboost as xgb dtrain = xgb.DMatrix(data=X_train, label=y_train, enable_categorical=True) params = { 'objective': '...
Lorenzo Boletti's user avatar
0 votes
1 answer
119 views

why is my linear regression line so short?

For a student project, I have to plot the knob position rc as a function of the corresponding wavelength in nanometres. When doing a linear regression, my line is very short. How can I change this? ...
nofretete's user avatar
0 votes
1 answer
79 views

Hyperopt being non deterministic with XGBRegressor [duplicate]

I ran a hyperparameter searching using hyperopt. Defined the space and objective. # Define the search space for hyperparameters space = { 'n_estimators': hp.quniform('n_estimators', 100, 500, 10), ...
FAD's user avatar
  • 59

15 30 50 per page
1
2 3 4 5
63