Category "machine-learning"

Using Local Binary Patterns with a Circular Mask

In order to extract texture-based features; LBPs (Local Binary Patterns) are used in many background-foreground detection algorithms. It is easy to understand w

Scalable/Iterative Large Data Frame Dimensionality Reduction R

I often have truly large data frames (ie 10 to 40 columns, millions to hundreds of millions of rows) that I would like to perform dimensionality reduction on in

module 'keras.engine' has no attribute 'Layer'

----> 6 from mrcnn.model import MaskRCNN /usr/local/lib/python3.7/dist-packages/mrcnn/model.py in () 253 254 --> 255 class ProposalLayer(KE.Layer): 256

feature importance in mlr3 with iml for classification forests

I calculate feature importance for 2 different types of machine learning models (SVM and Classification Forest). I cannot post the data here, but I describe wha

Create Bayesian Network and learn parameters with Python3.x [closed]

I'm searching for the most appropriate tool for python3.x on Windows to create a Bayesian Network, learn its parameters from data and perform

Number of Support vectors in SVM

How do I print the number of support vectors for a particular SVM model? Please suggest a code snippet in Python. from sklearn.multiclass import OneVsRestClassi

Shape of ROC curve

I did a prediction analysis on a dataset and drew the ROC curve. The ROC curve looks like below, Im not very much sure about the shape of the curve. Doesn't

Classification metrics can't handle a mix of binary and continuous targets [duplicate]

I try to train and test several scikit-learn models and attempt to print off the accuracy. Only some of these models work, others fail with th

CatBoost precision imbalanced classes

I use a CatBoostClassifier and my classes are highly imbalanced. I applied a scale_pos_weight parameter to account for that. While training with an evaluation d

Normalized Cross-Correlation in Python

I have been struggling the last days trying to compute the degrees of freedom of two pair of vectors (x and y) following reference of Chelton (1983) which is:

How can i impelement SMOTE inside a columnTransformer?

I'm trying to implement SMOTENC inside a column transformer. However I'm getting error. The code and the error is provided below. #Create a mask for categorical

Node indexing in hierarchical clustering dendrograms

I'm looking to annotate a hierarchical clustering dendrogram, but I have some trouble associating the node indices produced by scipy.cluster.hierarchy.dendrogra

training = False in Keras Sequential API

We can pass the training = False argument while calling the pre-trained model when using Keras Functional API as shown in this tutorial. How to implement the sa

Cant properly load saved model and call predict method

I am having trouble loading large model after saving. have tried all below saveing methods: tf.saved_model.save(model, model_save_path) model.save(model_save_pa

How does MindsDB renew/develop models?

I've linked a datasource to mindsdb, using scout. I'm wondering, does it automatically pull new data and retrain the model incrementially, or do I have to trigg

How to apply cross_val_score to cross valid our own model

Usually, we apply cross_val_score to the Sklearn models by doing the following way. scores = cross_val_score(clf, X, y, cv=5, scoring='f1_macro') Now I have my

How to Upload Many Files to Google Colab?

I am working on a image segmentation machine learning project and I would like to test it out on Google Colab. For the training dataset, I have 700 images, most

ImportError('Could not import PIL.Image. ' working with keras-ternsorflow

I'm following some lectures from lynda.com about deep learning using Keras-TensorFlow in a PyCharmCE enviroment and they didn't have this problem. I get this er

selective search in cv2 python

I am learning R-CNN, the first step for R-CNN is selective search, I used this algorithm on a sample image from my dataset. Code - ss = cv2.ximgproc.segmentatio

Implement Relu derivative in python numpy

I'm trying to implement a function that computes the Relu derivative for each element in a matrix, and then return the result in a matrix. I'm using Python and