My problem is of regression type - How to estimate a fish weight using a fixed-length signal (80 data points) of the change in resistance when the fish swim through a gate with electrodes (basically 4 seconds of the fish passing at 20Hz logger)? It is a spike shaped-signal, height and width depend on the size of the fish, its speed and proximity to the edges of the gate and probably other things like the water salinity and temperature. I …
I was reading this article where I came across the following statement in the context of "Why do we use sigmoid activation function in Neural Nets?": The assumption of a dependent variable to follow a sigmoid function inherently assumes a Gaussian distribution for the independent variable which is a general distribution we see for a lot of randomly occurring events and this is a good generic distribution to start with. Could someone elaborate on this relationship between the two?
I've been following a tutorial on training a model and I've stumbled across an error that I've been struggling to find a solution for. The code for the model training is bellow: import tensorflow as tf from tensorflow.keras.models import Sequential from tensorflow.keras.layers import Dense, Dropout, Activation, Flatten, Conv2D, MaxPooling2D import pickle X = pickle.load(open("X.pickle", "rb")) y = pickle.load(open("y.pickle", "rb")) X = X / 255.0 model = Sequential() model.add(Conv2D(64, (3, 3), input_shape = X.shape[1:])) model.add(Activation("relu")) model.add(MaxPooling2D(pool_size = (2, 2))) model.add(Conv2D(64, (3, …
Can someone explain to me like I'm five on why multicollinearity does not affect neural networks? I've done some research and neural networks are basically linear functions being stacked with activation functions in between, now if the original input variables are highly correlated, doesn't that mean multicollinearity happens?
This question is asked several times here on SE, but I havent been able to find the right answer. I'm trying to build a network with 1 input and 2 outputs. I don't have a lot of data so I would like to use a generator for augmentation (preferably with imgaug). My code: seq = iaa.Sequential([ .... ]) gen = ImageDataGenerator(preprocessing_function=seq.augment_image) batch_size = 64 def generate_data_generator(generator, X, Y1, Y2): genX = gen.flow(X, batch_size=batch_size, seed=42) genY1 = gen.flow(Y1, batch_size=batch_size, seed=42) while …
I'm reading this post that describes how to train LSTMs with variable time step lengths. But does that have repercussions? Should I preprocess the time series in to varying permutations? e.g. Should the input user_a,bad,[(t1,req1), (t2,req2), (t3,req3)] be divided into something like: user_a,bad,[(t1,req1)] user_a,bad,[(t1,req1), (t2,req2)] user_a,bad,[(t1,req1), (t2,req2), (t3,req3)] For context, I'm looking to classify bad users based on their requests. All requests from bad users are bad, but presumably, more requests gives the model more signals for evaluations. But at …
I am working as a control Engineer in a high energy physics lab. I am looking for a PhD thesis topic. Our experimental system is highly non linear and can't be modeled using standard white box approach. I am thinking of developing Neural Net models of the sensors attached to the experimental system. Also in this way I can model the system with primary inputs and outputs. So the basic idea is to have a data driven system identification and …
Do neural networks get optimized by trial and error, by data scientists, or is there some way of optimizing values through accurate mathematical equations?
What is the MAP@K metric for? What are you measuring? And where does it make sense to use it? Unfortunately, I can't find much about this on the Internet. Could someone help me with this? Thanks in advance.
Note: This is an academics based problem. So in a recent in-class quiz, we were asked that if we have an input layer consisting of 20 nodes along with 2 hidden layers (one of size 10 and the other of size 5), what will the total number of parameters in this network? How can we compute this? Additionally, how do we know what shapes are they weights of? How can we determine which activation functions are suitable for such a …
I'm trying to understand some visual illustrations about the wight sharing in the Convolutional Neural Network as following: In this picture we see that for different outputs different inputs share the same weights, as the weights are associated with the color (same color - same weight). So in the Stanford example we can see it eather: As for example, for the o(0,0,0)=5 and for o(0,1,0)=7 both we used the w0[0],w01,w2 weights, and it fits the picture above. Now there is …
I am trying to do a RandomizedSearchCV for a simple regression task. Essentially two inputs to one output. Upon inspecting the resulting models, it appears that the 'best' model has a mean_squared_error of around -8.3, while there were other 'non-best' models which had mean_squared_error close to 0 (i.e. around 0.004). In this case, may I know if the Keras optimized model selection is correct? Why does it select one with mean_squared_error not close to zero? Shouldn't the best model give …
I am working on a Neural Network that can estimate building's carbon footprint based on the set of features and an image of urban surroundings (via CNN). I have used Netron to visualize the network (up) but this image is not readable in a publication so I drawn one myself (down). Can anyone comment if this is proper representation - especially the last part after the concatenation - I am not sure if there should be 2 or 3 dense …
I tried building a keras model to classify leaves from the leaf classification dataset on kaggle. After i compiled and trained the model, i used it to predict the name of the leaves in the testing images, but all i got is an array of integers. How can i exactly interpret those numbers in order to get the names of the leaves. model = Sequential() model.add(Dense(128, kernel_initializer="uniform", input_dim= 192, activation='relu')) model.add(Dropout(0.25)) model.add(Dense(99, activation='softmax')) model.compile(loss='categorical_crossentropy', optimizer='adam', metrics=['accuracy']) model_history = model.fit(x=X_train,y=Y_train, epochs=500, …
I am doing image classification with CNN and I have a training set and a test set with different distributions. To try to overcome this problem I am thinking about doing a standardization using Imagegenerator, but I am encoutering some problems. Here is the part of the code I am working on: trainingset = '/content/drive/My Drive/Colab Notebooks/Train' testset = '/content/drive/My Drive/Colab Notebooks/Test' batch_size = 32 train_datagen = ImageDataGenerator( featurewise_center=True, featurewise_std_normalization=True, rescale = 1. / 255,\ zoom_range=0.1,\ rotation_range=10,\ width_shift_range=0.1,\ height_shift_range=0.1,\ horizontal_flip=True,\ …
In the variational autoencoder, I often see graphical models e.g. $P(X|Z)$ for the decoder, but when I looked at code, I don't see any random variables, I see just deterministic network, with composite functions. I am very confused by that, can someone explain where the magic happens? I am not interested in KL divergence and other stuff. I just don't understand how graphical model > $P(X|Z)$ == composite functions.
I am still having many doubts about the working of categorical embedding. In particular I have 2 points not clear: 1. Are 1-Hot variables converted to a lower dim vector? 2. What target are neural embedding trained on? Lots of explanations I have seen don't show any target, and I wonder how the back-prop is done. 3. It is not clear at all how the keras functional API works to build an embedding. Anyone is so helpful to explain step …
I'm attempting to use a sequence of numbers (of fixed length) in order to predict a binary output (either 1 or 0) using Keras and a recurrent neural network. Each training example/sequence has 10 timesteps, each containing a vector of 5 numbers, and each training output consists of either a 1 or 0. The ratio of 1s to 0s is around 1:3. There are approximately 100,000 training examples. I have tried implementing this using Keras, but the loss stops decreasing …
I am trying to train the model, I keep ending up with this ValueError: ValueError: Error when checking input: expected conv2d_13_input to have shape (3, 150, 150) but got array with shape (150, 150, 3) How can I fix this? Should I use numpy.resize or cv2.resize to change the dimensions to (3,150,150). If so, how would I resize it in the generator? Here is my code: train_datagen = ImageDataGenerator( rescale=1./255, shear_range=0.2, zoom_range=0.2) test_datagen = ImageDataGenerator(rescale=1./255) from keras.models import Sequential from …