I\'m working on the following code for performing Random Forest Classification on train and test sets;
from sklearn.ensemble import RandomForestClassifier
fr
genfromtxt
will give this error if the number of columns is unequal.
I can think of 3 ways around it:
1. Use the usecols parameter
np.genfromtxt('yourfile.txt',delimiter=',',usecols=np.arange(0,1434))
However - this may mean that you lose some data (where rows are longer than 1434 columns) - whether or not that matters is down to you.
2. Adjust your input data file so that it has an equal number of columns.
3. Use something other than genfromtxt:
.............like this