Category "machine-learning"

Comparing MSE loss and cross-entropy loss in terms of convergence

For a very simple classification problem where I have a target vector [0,0,0,....0] and a prediction vector [0,0.1,0.2,....1] would cross-entropy loss converge

Determining cosine similarity for large datasets

I am currently using a dataset of over 2.5 million images, of which I use the image itself as a comparison to eachother, for use in a content-based recommendati

Google colab : How can i mount two google drive accounts?

I have two google accounts each one contains part of my data and i can,t include the data into one drive because of the size limit. So, I want to know if there

Exception: MissingSchema with Gradio Library

I'm using the gradio library with one of the basic examples, but am getting this error. I am running this in a Google Colab Notebook. Here is the relevant lines

How to import a manually downloaded dataset in Tensorflow?

I know that it can be loaded using tfds.load('nyu_depth_v2') and I have try it but it fails I suspect due to my slow internet connection I have downloaded the d

Azure Databricks keep long-running notebook alive when closing browser

I am working with Azure Databricks jupyter notebooks and have time-consuming jobs (complex queries, model training, loops over many items, etc.). Every time I c

TENSORFLOW: UNSUPPORTABLE CALLABLE

I am trying to build the following model but am getting this error when I am finally training the model and trying to get it's accuracy. It gets stuck when I am

Tensorflow - Value Error in model.fit - How to fix

I am trying to train a Deep Neural Network using MNIST data set. BATCH_SIZE = 100 train_data = train_data.batch(BATCH_SIZE) validation_data = validation_data.b

Python sklearn RandomForestClassifier non-reproducible results

I've been using sklearn's random forest, and I've tried to compare several models. Then I noticed that random-forest is giving different results even with the s

PCA on sklearn - how to interpret pca.components_

I ran PCA on a data frame with 10 features using this simple code: pca = PCA() fit = pca.fit(dfPca) The result of pca.explained_variance_ratio_ shows: array

load_from_checkpoint fails after transfer learning a LightningModule

I try to transfer learn a LightningModule. The relevant part of the code is this: class DeepFilteringTransferLearning(pl.LightningModule): def __init__(self

use part of Keras Sequential model to predict

In the following code I have defined a Sequential model, that contains two parts conv_encoder and conv_decoder. After training the model I want to use conv_enco

ImportError: No module named 'sklearn.lda'

When I run classifier.py in the openface demos directory using: classifier.py train ./generated-embeddings/ I get the following error message: --> fro

Upsampling using SMOTE in python

I am trying to use SMOTE in python to handle highly imbalanced data set. After splitting the data set into train and test I generate synthetic samples using SMO

How to do atrous convolution in tensorflow 2 (tf.keras)

I am trying to convert some code from tensorflow 1.x to tensorflow 2.x. It's been going well so far, but I'm stuck on atrous convolution. Unlike other layers, t

Input 0 of layer "conv2d_transpose_4" is incompatible with the layer: expected ndim=4, found ndim=2. Full shape received: (None, 100)

I am trying to develop a GAN, I have created the generator and the discriminator and now I am trying to train it. I am using the Mnist dataset but I plan to use

multilayer_perceptron : ConvergenceWarning: Stochastic Optimizer: Maximum iterations reached and the optimization hasn't converged yet.Warning?

I have written a basic program to understand what's happening in MLP classifier? from sklearn.neural_network import MLPClassifier data: a dataset of body met

module 'xgboost' has no attribute 'DMatrix'

I pulled some ML code that ran on kaggle (linux) and tried to run it in a jupyter notebook on a windows machine. Here is the code (some of it): ##### RUN XGBOO

Keras LSTM fit underfitting

I have time series training data of about 5000 numbers. For each 100 numbers, I am trying to predict the 101st. At the end of the series, I would put in the pre

sklearn lda gridsearchcv with pipeline

pipe = Pipeline([('reduce_dim', LinearDiscriminantAnalysis()),('classify', LogisticRegression())]) param_grid = [{'classify__penalty': ['l1', 'l2'],