multilabel-classification

create hfd5 with float numbers for caffe

大兔子大兔子 提交于 2020-01-06 02:47:09
问题 I want to feed caffe vectors of labels (multi label regression problem), so I have used the following link for creating hdf5 files. Using this code, I created an image_list.txt which contains path of files and float labels in each line, e.g. /home/deep/00000.bmp 0.9997 0.0236 -0.0082 -0.0231 0.9980 0.0588 0.0096 -0.0586 0.9982 -0.0046 0.1084 0.3938 but it seems that it only works for integer label. when I run demo.m the following error comes: Error using dataread Trouble reading integer from

Concept Behind The Transformed Data Of LDA Model

◇◆丶佛笑我妖孽 提交于 2020-01-05 03:36:18
问题 My question is related to Latent Dirichlet Allocation . Suppose we apply LDA on our dataset, then apply fit transform on that. the output is a matrix that is a collection of five documents. Each document consists of three topics. othe output is below: [[ 0.0922935 0.09218227 0.81552423] [ 0.81396651 0.09409428 0.09193921] [ 0.05265482 0.05240119 0.89494398] [ 0.05278187 0.89455775 0.05266038] [ 0.85209554 0.07338382 0.07452064]] So, this is the matrix that will be sent to a classification

Classification: skewed data within a class

大憨熊 提交于 2020-01-02 02:26:09
问题 I'm trying to build a multilabel-classifier to predict the probabilities of some input data being either 0 or 1. I'm using a neural network and Tensorflow + Keras (maybe a CNN later). The problem is the following: The data is highly skewed. There are a lot more negative examples than positive maybe 90:10. So my neural network nearly always outputs very low probabilities for positive examples. Using binary numbers it would predict 0 in most of the cases. The performance is > 95% for nearly all

Which decision_function_shape for sklearn.svm.SVC when using OneVsRestClassifier?

拈花ヽ惹草 提交于 2020-01-01 03:33:11
问题 I am doing multi-label classification where I am trying to predict correct tags to questions: (X = questions, y = list of tags for each question from X). I am wondering, which decision_function_shape for sklearn.svm.SVC should be be used with OneVsRestClassifier? From docs we can read that decision_function_shape can have two values 'ovo' and 'ovr' : decision_function_shape : ‘ovo’, ‘ovr’ or None, default=None Whether to return a one-vs-rest (‘ovr’) decision function of shape (n_samples, n

inconsistent shape error MultiLabelBinarizer on y_test, sklearn multi-label classification

风格不统一 提交于 2019-12-31 03:58:28
问题 import numpy as np import pandas as pd from sklearn.pipeline import Pipeline from sklearn.feature_extraction.text import CountVectorizer from sklearn.svm import LinearSVC from sklearn.linear_model import SGDClassifier from sklearn.feature_extraction.text import TfidfTransformer from sklearn.multiclass import OneVsRestClassifier from sklearn.metrics import accuracy_score, classification_report, confusion_matrix from sklearn.model_selection import train_test_split from sklearn import

Label not x is present in all training examples

老子叫甜甜 提交于 2019-12-25 01:12:21
问题 Hello, I have come across an issue when trying to predict tag/label on my project. I am currently using similar tutorial (with my own data) to predict complain in complaint register based on given tag such as 1 Complaint --> many Genre (Warranty, Refund, Air Conditioning) DF -> Tag No of Columns -> 4 (original), 2 (clean-up) > genre_new and clean_plot Column Names ->ID, Plot, Title, Genre, genre_new, clean_plot I used this tutorial: https://www.analyticsvidhya.com/blog/2019/04/predicting

Multi-class and multi-label image classification using Caffe

喜欢而已 提交于 2019-12-24 19:29:32
问题 I'm trying to create a single multi-class and multi-label net configuration in caffe. Let's say classification of dogs: Is the dog small or large? (class) What color is it? (class) is it have a collar? (label) Is this thing possible using caffe? What is the proper way to do so? Just trying to understand the practical way.. After creating 2 .text files (one for training and one for validation) containing all the tags of the images, for example: /train/img/1.png 0 4 18 /train/img/2.png 1 7 17

Transform pandas Data Frame to use for MultiLabelBinarizer

耗尽温柔 提交于 2019-12-24 04:41:16
问题 My question is: How can I transform a Data Frame like this to eventually use it in scikit's MulitLabelBinarizer: d1 = {'ID':[1,2,3,4], 'km':[80,90,90,100], 'weight':[10,20,20,30], 'label':['A','B','C','D','E']} df1 = pd.DataFrame(data=d1) df1 ID km weight label 0 1 80 10 A 1 2 90 20 B 2 2 90 20 C 3 4 100 30 D It should tourn ot like this: d2 ={'km':[80,90,100], 'weight':[10,20,30], 'label':['A',('B','C'),'D']} df2 = pd.DataFrame(data=d2) df2 km weight label 0 80 10 A 1 90 20 (B, C) 2 100 30 D

How do I implement transfer learning in NiftyNet?

大兔子大兔子 提交于 2019-12-23 15:12:13
问题 I'd like to perform some transfer learning using the NiftyNet stack, as my dataset of labeled images is rather small. In TensorFlow, this is possible--I can load a variety of pre-trained networks and directly work with their layers. To fine-tune the network, I could freeze training of the intermediate layers and only train the final layer, or I could just use the output of the intermediate layers as a feature vector to feed into another classifier. How do I do this in NiftyNet? The only

Multi-label out-of-core learning for text data: ValueError on partial fit

ⅰ亾dé卋堺 提交于 2019-12-23 12:49:15
问题 I am trying to build a multi-label out-of-core text classifier. As described here, the idea is to read (large scale) text data sets in batches and partially fitting them to the classifiers. Additionally, when you have multi-label instances as described here, the idea is to build that many binary classifiers as the number of classes in the data set, in an One-Vs-All manner. When combining the MultiLabelBinarizer and OneVsRestClassifier classes of sklearn with partial fitting I get the