I'm trying to build a classification model. Features are purely boolean (not binary) and are in a csv file like
The result is an
int within a range(0, 128).
I thought, would it make sense not to waste resources on float operations as there are no float data? What models (from Keras, if possible), types of layers, and activators are better for this task?
I'm trying this way and the results are no better than random on ~2mln samples:
from sklearn.model_selection import train_test_split from keras.utils import to_categorical from keras.models import Sequential from keras.layers import Dense X = np.loadtxt("001_X.csv", dtype=bool) y = np.loadtxt("001_y.csv", dtype=int) (X_train, X_test, y_train, y_test) = train_test_split(X, y, shuffle=True, train_size=0.9) y_train = to_categorical(y_train) y_test = to_categorical(y_test) model = Sequential() model.add(Dense(1000, input_dim=128, activation="relu")) ... etc... model.add(Dense(128, activation='softmax')) model.compile(loss='categorical_crossentropy', optimizer='adam', metrics='accuracy') model.fit(X_train, y_train, epochs=50, callbacks=[callback], batch_size=100)
Anything else I can improve for better accuracy?