I am trying to use your code, but do not know the structure of the Excel file you have used. Can you please provide that Excel file as well? Or kindly tell the contents of that excel file, and what does 'Y' represent in your code on the lines as shown below:
I thought it might represent the dependent variable. So in my code, I have replaced Y with the name of the column containing the dependent variable. I am using a CSV file which contains numeric data (0 or 1) in the dependent variable column. However, when I run the following line
bls.fit(traindata,trainlabel)
I get the following error:
File "conda\conda\envs\tensorflow\lib\site-packages\numpy\core\_methods.py", line 73, in _mean ret, rcount, out=ret, casting='unsafe', subok=False)TypeError: unsupported operand type(s) for /: 'str' and 'int'
Can you kindly tell what is the problem with my approach and how to solve it? Is this because I have put something wrong in place of Y? If yes, then what should I put there?
Hi dear Author,
I am trying to use your code, but do not know the structure of the Excel file you have used. Can you please provide that Excel file as well? Or kindly tell the contents of that excel file, and what does 'Y' represent in your code on the lines as shown below:
label = np.mat(data['Y'].values).T
data = data.drop('Y',axis = 1).values
I thought it might represent the dependent variable. So in my code, I have replaced Y with the name of the column containing the dependent variable. I am using a CSV file which contains numeric data (0 or 1) in the dependent variable column. However, when I run the following line
bls.fit(traindata,trainlabel)
I get the following error:
File "conda\conda\envs\tensorflow\lib\site-packages\numpy\core\_methods.py", line 73, in _mean ret, rcount, out=ret, casting='unsafe', subok=False)
TypeError: unsupported operand type(s) for /: 'str' and 'int'
Can you kindly tell what is the problem with my approach and how to solve it? Is this because I have put something wrong in place of Y? If yes, then what should I put there?
Thanks.