classification

Weka - binary classification giving polarized/biased results

女生的网名这么多〃 提交于 2019-12-14 03:57:16
问题 Let me say, first up, that I'm a WEKA newbie. I'm using WEKA for a binary classification problem where certain metrics are being used to get a yes/no answer for the instances. To exemplify the issue, here's the confusion matrix I got for a set with 288 instances, with 190 'yes' and 98 'no' values using BayesNet: a b <-- classified as 190 0 | a = yes 98 0 | b = no This absolute separation is the case with some other classifiers as well, but not with all of them. That said, even if classifiers

LOSS not changeing in very simple KERAS binary classifier

两盒软妹~` 提交于 2019-12-14 03:06:43
问题 I'm trying to get a very (over) simplified Keras binary classifier neural network running without success. The LOSS just stays constant. I've played around with Optimizers (SGD, Adam, RMSProp), Learningrates, Weight-Initializations, Batch Size and input data normalization so far. Nothing changes at all. Am I doing something fundamentally wrong? Here is the code: from tensorflow import keras from keras import Sequential from keras.layers import Dense from keras.optimizers import SGD data = np

wordcloud for a csv file in python

被刻印的时光 ゝ 提交于 2019-12-13 17:25:15
问题 i have a csv file with 2 columns (dataframe) column 1 contains a sentence i love banana and column 2 contains a classe i have 5 classes i need a wordcloud for each class in fact each all the senetences corresponding to each classe it possible to do it ? it try this code but id does not working import matplotlib.pyplot as plt cloud = WordCloud(background_color="white", max_words=20, stopwords=stopwords) tuples = tuple([tuple(x) for x in df.Phrase.value_counts().reset_index().values]) a = cloud

Multilayer perceptron - backpropagation

北城以北 提交于 2019-12-13 12:21:58
问题 I have a school project to program multilayer perceptron that classify data into three classes. I have implemented backpropagation algorithm from http://home.agh.edu.pl/~vlsi/AI/backp_t_en/backprop.html. I have checked my algorithm (by manually calculating each step of backpropagation) if it really meets this explained steps and it meets. For classifing I am using one-hot code and I have inputs consisting of vectors with 2 values and three output neurons (each for individual class). After

Does anyone know how to generate AUC/Roc Area based on the predition?

有些话、适合烂在心里 提交于 2019-12-13 12:17:44
问题 I know the AUC/ROC area (http://weka.wikispaces.com/Area+under+the+curve) in weka is based on the e Mann Whitney statistic (http://en.wikipedia.org/wiki/Mann-Whitney_U) But my doubt is, if I've got 10 labeled instances (Y or N, binary target attribute), by applying an algorithm (i.e. J48) onto the dataset, then there are 10 predicted labels on these 10 instances. Then what exactly should I use to calculate the AUC_Y, AUC_N, and AUC_Avg? Use the prediction's ranked label Y and N or the actual

Interpret the output of neural network in matlab

三世轮回 提交于 2019-12-13 10:36:23
问题 I have build a neural network model, with 3 classes. I understand that the best output for a classification process is the boolean 1 for a class and boolean zeros for the other classes , for example the best classification result for a certain class, where the output of a classifire that lead on how much this data are belong to this class is the first element in a vector is [1 , 0 , 0]. But the output of the testing data will not be like that,instead it will be a rational numbers like [2.4 ,

Python: ValueError: The number of classes has to be greater than one; got 1

本秂侑毒 提交于 2019-12-13 09:35:40
问题 Following Tonechas suggestion from this post, the code to compute the red channel histogram of a set of images and then classify them to the correct type, is this: import cv2 import os import glob import numpy as np from skimage import io root = "C:/Users/joasa/data/train" folders = ["Type_1", "Type_2", "Type_3"] extension = "*.jpg" # skip errors caused by corrupted files def file_is_valid(filename): try: io.imread(filename) return True except: return False def compute_red_histogram(root,

Is there a Python text mining script to classify text with multiple classifications?

早过忘川 提交于 2019-12-13 09:01:27
问题 Classification of descriptions into categories I have a problem that involves determining what category a text description falls under. These text descriptions are entered in by users and may contain keywords that can be matched to a specific category. Each category has a set of keywords and phrases that can be matched to. There are about 100 categories. For example, a text description might look like this, “Burlap aisle runner w/borders”, and the category “Fabric” contains the keyword

Keras model doesn't seem to work

做~自己de王妃 提交于 2019-12-13 05:42:13
问题 I have the following keras model and when I train the model, it doesn't seem to learn from it. I asked around and got different suggestions like weights are not initialised properly or back-propogation is not happening. The model is: model.add(Conv2D(32, (3, 3), kernel_initializer='random_uniform', activation='relu', input_shape=(x1, x2, depth))) model.add(MaxPool2D(pool_size=(2, 2))) model.add(Conv2D(64, (3, 3), activation='relu')) model.add(MaxPool2D(pool_size=(2, 2))) model.add(Flatten())

Error when checking input: expected flatten_input to have 3 dimensions, but got array with shape (None, 100, 100, 1)

僤鯓⒐⒋嵵緔 提交于 2019-12-13 04:16:12
问题 Using TensorFlow/Keras, I want to classify pictures into two classes, selfie and non-selfie. I have gathered samples into two filesystem folders, one for each category. I implemented the training below by following the official tutorial for MNIST fashion (which is also a pictures classification problem), after using loading pictures from the filesystem as seen at https://stackoverflow.com/a/52417770/226958. Unfortunately, I get an error: 1.10.1 Tensor("IteratorGetNext:0", shape=(?, 100, 100,