All Questions
266 questions
0
votes
0
answers
83
views
MACHINE LEARNING : numpy , issue dealing with NaN values
ISSUE: Dealing with Nan values
I have tried replacing the Nan values with 0 to test if it would output anything. However , even with zeros filling the Nan slots the MSE returns Nan which makes me ...
0
votes
2
answers
133
views
Linear regression model of scikit-learn not working as expected
I'm trying to understand the internal working of the Linear-regression model in Scikit-learn.
This is my dataset
And this is my dataset after performing one-hot-encoding.
And this are values of the ...
0
votes
1
answer
229
views
CUML RandomForestClassifier TypeError An Integer is required
I'm trying to use CUML's ensemble RandomForestClassifier to fit my data. When I try and fit, I get a type-error saying an integer is required.
My X_train is a dataframe that I converted to a numpy ...
0
votes
0
answers
65
views
How to create a dataframe column where each value on a given row depends on the values of subsecant rows?
So I'm working with time series data, forex data to be more precise.
They are in the form of
<DATE> <OPEN> <HIGH> <LOW> <CLOSE>
2023.01.03 1.20782 ...
0
votes
1
answer
136
views
Not_Fitted_Error : This LabelEncoder instance is not fitted yet. Call 'fit' with appropriate arguments before using this estimator
I am new to Ml_Modelling
I am working on a solution to create a model with three columns nature_of_business , industry, products.
nature_of_business
industry
products
Manufacturer
capitalgoods
...
-1
votes
1
answer
439
views
dtype='numeric' is not compatible with arrays of bytes/strings with streamlit
import numpy as np
import pickle
import streamlit
loaded_model=pickle.load(open("C:/Users/pranj/Desktop/titanic/titanic_trained_model.pkl",'rb'))
input_data=(3,0,22.000000,1,0,7.2500,0)
#...
0
votes
0
answers
75
views
Conversion of numpy array inside a pandas dataset to a TensorFlow dataset using data api
I am running TensorFlow 2.12.0 and python 3.11 for a ML classification project where i have a dataset as follows: -
I have use pandas for data preprocessing and hthis resulted in this: The ...
1
vote
0
answers
250
views
Scikit-learn pipeline that begins with a custom transformer that uses X and y to filter out columns
I want to create a pipeline that contains, respectively, a custom transformer, a Binning Process estimator from the OptBinning library and then a logistic regression. I want to execute this pipeline ...
-2
votes
1
answer
69
views
RuntimeWarning: overflow encountered in double_scalars diff += X_values * (y_values - ((X_values * m) + b))
import math, copy
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
from sklearn.preprocessing import MinMaxScaler
import pandas as pd
import numpy as np
import matplotlib....
0
votes
1
answer
376
views
AttributeError: 'ColumnTransformer' object has no attribute '_name_to_fitted_passthrough' however versions of sklearn are the same
model_loaded = joblib.load(path + model)
print(model_loaded.__getstate__()['_sklearn_version'])
res = model_loaded.predict(binance)
1.2.1
479 for _, name, transform in self._iter(with_final=False):
--&...
0
votes
0
answers
66
views
Getting error 'numpy.float64' object not iterable
While executing recommend() function i am getting error at line
movies_list = sorted([enumerate(distances[0])], reverse=True, key = lambda x:x[1])[1:6]
The following is the code I tried. please ...
0
votes
1
answer
47
views
Optimizing code for creation of ML dataset
I'm a statistician, working on a problem with predicting vessel destinations. My current problem is that my code is slooow, and since I am not that great at programming, I find it quite hard to see ...
0
votes
0
answers
129
views
how to avoid high memory consumption of numpy where method
I have a python script which does some calculation on data. data has ~50 million rows. when the execution comes to line which have numpy where method, memory is gone wild. I tried to split dataframe ...
0
votes
1
answer
126
views
How remove the label data from feature data from window time series (tensorflow)
I train a models of time series forecasting use tensorflow. The models in this tutorial will make a set of predictions based on a window of consecutive samples from the data.
*I want to remove the ...
-1
votes
1
answer
122
views
Cleaning a messy Dataset
I got an originally txt file converted to csv.
I have the column names but there is practically one row in the
unprocessed dataset.
How do I clean the dataset using pandas,numpy exc.methods so that ...