New answers tagged

0

This is due to the fact that first time is very important, everything is set up during the first pass like cache, memory on the GPU, graph optimization, etc. Also 1 seconds is not that long it can take few seconds just to run matrix multiplication on GPU


2

Sure, there are plenty of them, using scikit-learn it will looks as follow: from sklearn.preprocessing import OneHotEncoder, OrdinalEncoder ohe = OneHotEncoder() ordine = OrdinalEncoder() oh_col_names = [...] ordin_col_names = [...] encoded_oh = ohe.fit_transform(X[oh_col_names]) # supposing X is your pandas.DataFrame encoded_ordin = ordin.fit_transform(...


0

In general, decision trees are easily understandable due to its structure. However, in most application they become so big that you easily lose sight. Additionally, in most cases you would want to use Random Forest as an ensemble method instead of a single Decision Tree and then again there is not one single tree that you can explain. For neural networks ...


4

If You have only females in your dataset, adding gender feature to the model input will not improve it. The technical explanation on why it won't help changes between models, but the intuition is simple - the model tries to find correlation between the features and the labels, and the correlation between any variable and a fixed-value variable is zero. You ...


0

One possibility is that DNNRegressor is a TensorFlow Estimator. TensorFlow Estimators have been deprecated because they "can behave unexpectedly". It might be better to explicitly define a model.


0

a) Any intelligent way to assign likelihood to this table? Your conversions are essentially an outcome of two functions, your biz team and the procurement team/contact of the client. The common denominator is your biz team. Consequently, in order to be able to predict likelihood you need recorded metrics of your biz team's both successful and unsuccessful ...


0

You could have a single network, feed both inputs separately, compute the distance/loss, then perform backpropagation. Or (as in the cited paper) you could initialize a network, and then create a parallel twin of that network. Because both networks see the same loss, they will remain identical after backpropagation. The paper is explained in the form of the ...


2

Linking to the same paper as @scholle but explaining the process differently (book and paper). You do not need to train the model multiple times. The algorithm described in the links above require a trained model to begin with. Given a trained model, compute the metric of interest on some dataset (the book discusses pros/cons of using training set vs test ...


1

Provided you have the data already, and the data is labelled (i.e., split into the two classes $A$ and $B$), it makes sense to produce a number of visualisations to gauge what the model output would be. If you start with traditional classification algorithms like logistic regression, then the model output is going to be the probability of belonging to a ...


1

If all of the carts images are similar (and different from the images without carts), the classification problem is easy. Therefore, it is not a problem, but an advantage. That is under the assumption that the images' distributaion in inference is the same distribution as in your training.


0

We create embeddings to have the dense representation of the sparse feature vectors. Embeddings map the high dimensional data into a low dimensional space. Note A dense feature is the one which has mostly non zeros in it whereas a sparse feature is the one which has mostly zeros in it. Q: My gut still tells me to make an embedding layer for the movie index ...


0

It maybe due to the fact that some of your columns may not have complete integer values, before fitting you should convert it X = np.asarray(X).astype(np.int_) Y = np.array(Y).astype(np.int_)


0

Scikit-learn MLPRegressor has a .partial_fit method for training on batches which will overcome this memory issue.


1

You could simulate data and fit a model to it as if it were real data. there are packages and functions in R and Python to do this. You'd have to be very clear that the data is faked. You could then examine the model and produce graphs as if it were a real one. This has the downside that it involves writing all the code and writing code to sim data, which ...


1

Look at your past experience. Even though you're a novice, you were hired as a data scientist, so you'll probably have some experience with data science projects. A simple binary classification problem with a few hundred datapoints can be solved in a productive afternoon, whereas a large project that requires significant upfront engineering for the ...


0

Probably treating this problem as a text classification one would generalize in a better way than using screenshots. Most „down“ pages will likely say something indicating that the service is no longer available. So scrapping the visible text of the pages and using a simple count vectorizer or so could be more reliable than classifying images.


2

Based on how the EarlyStopping callback is implemented there doesn't seem to be way to accomplish this. After an epoch ends (in your case more specifically the end of the first epoch) it checks if the value at the end of the epoch is an improvement over the current value (see this function, where the current value is stored in self.best. When the training of ...


0

One option is to embed all the information in a single space. The embedding space would contain the tokens and feature names. Often times the tokens are changed to track the provenance. For example, science__DOMAIN and professor__COMMENT_BY. An example of a package that does that is StarSpace.


0

Given your data is sparse it may be worth trying a loss function for that type of representation. As an example Keras has a SparseCategoricalCrossentropy class: tf.keras.losses.SparseCategoricalCrossentropy( from_logits=False, reduction="auto", name="sparse_categorical_crossentropy" ) More information on this is available here. ...


0

I would look into what learning rate scheduler they are using. This seems like an effect of reducing lr based on a Cosine or ReduceOnPlateau strategy. See a figure from Loshchilov et al.


0

There is not such difference between zero padding & character padding ,as we applying padding to extract the edges & gradients to form the object for better learning with respect to human vision. Even with images mostly people use zero padding which creates black background but depending on the datasets & problem statement padding has to change ...


0

Without having seen the full video you are referring to I think the image represents the inception module with dimension reduction from the original paper (figure 2b from here, also shown below). Based on this it seems that not all convolutional layers have been shown in the image, mainly the 1x1 convolutional layer that follows the max-pooling layer (see ...


1

This is simply how the tokenizer works given the defaults that are defined, see also the documentation. By default the value for the split argument is ' ', meaning that it splits the sentences on every space character to get the tokens for that sentence. You can change this to get other multi-character tokens from a sentence. In addition, there is the ...


1

Often words are used as tokens as they carrie a meaning. This meaning is translated into "machine readable" format, which happens to be a number. So one distinct word will be one distinct token (or variable if you want to say so). Per docs you can change the TF/Keras default behaviour of "choosing words" by adding the option char_level=...


0

You are finding about Semi-supervised object detection algorithm and Weakly-supervised object detection. Semi-supervised object detection uses Supervised-learning term (Your handmade labeled data) and Semi-supervised learning term (Unlabeled data). Weakly-supervised object detection uses coarse-grained data which is imperfect, inaccurate, or partial. For ...


1

I went through the ZFNet paper and it seems that Deconvnet is different than transposed convolution. However, the idea of both is quite similar and it is easy to get confused. First, let's be clear about transposed convolution. There are many recent blogs and papers about it and here is one nicely written blog: https://towardsdatascience.com/what-is-...


0

Try these things and see if it works: 1.) Explicitly mention the activation function in the last layer as sigmoid. 2.) The loss should be binary_crossentropy. 3.) Try using a different metric instead of accuracy. 4.) In the input and hidden layer, try using leaky_relu 5.) Also mention the batch_size when fitting the model. Lemme know if any of these work. ...


1

If I understand your question right the answer is yes. For example in tensorflow functional API could you have as your final layers: out = tf.keras.ayers.Dense(10*10)(previous_layer) out = tf.keras.layers.Lambda(lambda t: tf reshape(t, [..., 10, 10]))(out) out = tf.keras.Lambda(lambda t: tf.nn.softmax(t, axis=-1)) Your output would have shape [batch, 10, 10]...


0

There are distinct steps in deep learning modeling. Each step could be its own function or its own .py file/module. Common steps: Data loading Define model architecture Hyperparameter tuning Training final model Prediction on new data


0

It can always happen , You see if the Weights are really tiny numbers close to zero, gradients are just the same if the dot product per neuron is positive then the gradients are just equal to the weights of that layer which can be small or if its negative , then the gradients are exactly equal to zero , small enough , so the answer to your question is Yes I ...


0

The fact that you are using accuracy as the metric suggests that your model is not performing well. It is an overly optimistic model. The reason being that for multiclass classification you should never use accuracy. It will always give overly optimistic results. Go for categorical_accuracy as the metric and sparse_categorical_crossentropy as the loss. As ...


Top 50 recent answers are included