Category "machine-learning"

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'],

sklearn RandomForestRegressor discrepancy in the displayed tree values

while using the RandomForestRegressor I noticed something strange. To illustrate the problem, here a small example. I applied the RandomForestRegressor on a tes

ValueError: logits and labels must have the same shape ((None, 328, 328, 3) vs (None, 1)) with autoencoder

I am trying to build an autoencoder with the following code import matplotlib.pyplot as plt import numpy as np import pandas as pd import seaborn as sns import

Loss not decreasing - Pytorch

I am using dice loss for my implementation of a Fully Convolutional Network(FCN) which involves hypernetworks. The model has two inputs and one output which is

Loss not decreasing - Pytorch

I am using dice loss for my implementation of a Fully Convolutional Network(FCN) which involves hypernetworks. The model has two inputs and one output which is

ValueError: multiclass format is not supported , xgboost

My first multiclass classication. I have values X and Y. Y have 5 values [0,1,2,3,4]. But i get this "multiclass format is not supported". Understand that i nee

Catboost hyperparams search

I want to use default hyperparams in randomized search, how can I do it? (per_float_feature_quantization param here) grid = {'learning_rate': [0.1, 0.16, 0.2],

Vectorized form Derivation of Multiple Linear Regression Cost Function

Can some one with expertise explain how the following vectorized format of multiple linear regression is derived from given independent variable matrix with int

How do custom input_shape for Inception V3 in Keras work?

I know that the input_shape for Inception V3 is (299,299,3). But in Keras it is possible to construct versions of Inception V3 that have custom input_shape if

Extract misclassified images using CNN keras

I am having difficulties extracting misclassified images, I tried to use the following line of code: inc= np.nonzero(model.predict_classes(test_data).reshape(-

How to plot the cluster's centroids using seaborn

Basically, I want to plot like this: I already managed to plot the clusters using sns.scatterplot(X[:,0], X[:,1], hue=y, palette=['red', 'blue', 'purple', 'gre

how to log hydra's multi-run in mlflow

I am trying to manage the results of machine learning with mlflow and hydra. So I tried to run it using the multi-run feature of hydra. I used the following cod

url generated for Streamlit not working properly. ngrok tells me to register again even though I have already registered or gives me an error

Below is my code for deploying my ml model on streamlit. I am using Google Collab !pip install streamlit --quiet !pip install pyngrok==4.1.1 from pyngrok import

Is there any documentation about default weight initializer in Keras? [duplicate]

I just read about the Keras weight initializers in here. In the documentation, only different initializers has been introduced. Such as: mode