classification

Neural Network in TensorFlow works worse than Random Forest and predict the same label each time

戏子无情 提交于 2020-01-14 05:07:06
问题 I am new in DNN and TesorFlow. I have the problem with NN using for binary classification. As input data I have text dataset, which was transformed by TF-IDF into numerical vectors. The number of rows for training dataset is 43 000 The number of features 4235 I tried to use TFlearn library and then Keras io. But the result is the same - NN predict only one label 0 or 1 and give worse Accuracy then Random Forest. I will add the script, which I use for NN building. Please, tell me what is wrong

OpenCV SVM train_auto Insufficient Memory

爱⌒轻易说出口 提交于 2020-01-13 19:34:15
问题 This is my first post here so I hope to be able to ask my question properly :-) I want to do "elephant detection" by classifying color samples (I was inspired by this paper). This is the pipeline of my "solution" until the training of the classifier: Loading a set of 4 training images (all containing an elephant), and then splitting them in two images: one containing the environment surrounding the elephant (the "background"), and one containing the elephant (the "foreground"); Mean shift

Any difference between H2O and Scikit-Learn metrics scoring?

左心房为你撑大大i 提交于 2020-01-13 05:52:30
问题 I tried to use H2O to create some machine learning models for binary classification problem, and the test results are pretty good. But then I checked and found something weird. I tried to print the prediction of the model for the test set out of curiosity. And I found out that my model actually predicts 0 (negative) all the time, but the AUC is around 0.65, and precision is not 0.0. Then I tried to use Scikit-learn just to compare the metrics scores, and (as expected) they’re different. The

Neural Network Ordinal Classification for Age

妖精的绣舞 提交于 2020-01-12 07:22:13
问题 I have created a simple neural network (Python, Theano) to estimate a persons age based on their spending history from a selection of different stores. Unfortunately, it is not particularly accurate. The accuracy might be hurt by the fact that the network has no knowledge of ordinality. For the network there is no relationship between the age classifications. It is currently selecting the age with the highest probability from the softmax output layer. I have considered changing the output

text classification methods? SVM and decision tree

爱⌒轻易说出口 提交于 2020-01-12 03:32:08
问题 i have a training set and i want to use a classification method for classifying other documents according to my training set.my document types are news and categories are sports,politics,economic and so on. i understand naive bayes and KNN completely but SVM and decision tree are vague and i dont know if i can implement this method by myself?or there is applications for using this methods? what is the best method i can use for classifying docs in this way? thanks! 回答1: Naive Bayes Though this

How to count the observations falling in each node of a tree

倖福魔咒の 提交于 2020-01-10 11:48:33
问题 I am currently dealing with wine data in MMST package. I have split the whole dataset into training and test and build a tree like the following codes: library("rpart") library("gbm") library("randomForest") library("MMST") data(wine) aux <- c(1:178) train_indis <- sample(aux, 142, replace = FALSE) test_indis <- setdiff(aux, train_indis) train <- wine[train_indis,] test <- wine[test_indis,] #### divide the dataset into trainning and testing model.control <- rpart.control(minsplit = 5, xval =

How to use Classifier with ClassifierCompositeItemWriter?

我只是一个虾纸丫 提交于 2020-01-10 06:08:08
问题 have trouble implementing a ClassifierCompositeItemwriter... I am reading a basic CSV File and i want to write them do a database. Depending on the data (Name + Name1) either write it to a simple ItemWriter or use a compositeItemwriter (that writes to two different Tables)... This is my : ClassifierCompositeItemwriter see > Error Message below public ClassifierCompositeItemWriter<MyObject> classifierCompositeItemWriter() { ClassifierCompositeItemWriter<MyObject> writer = new

Multiclass classification using Gaussian Mixture Models with scikit learn

大憨熊 提交于 2020-01-07 03:53:11
问题 I am trying to use sklearn.mixture.GaussianMixture for classification of pixels in an hyper-spectral image. There are 15 classes (1-15). I tried using the method http://scikit-learn.org/stable/auto_examples/mixture/plot_gmm_covariances.html. In here the mean is initialize with means_init,I also tried this but my accuracy is poor (about 10%). I also tried to change type of covariance, threshold, maximum iterations and number of initialization but the results are same. Am I doing correct?

How to adapt HOG features vector to linear svm input

戏子无情 提交于 2020-01-07 02:34:40
问题 I'm using HOG in order to extract a set of features trough an Image A. the HOG returns a features' vector of 1xN elements. However the linear SVM accept only 2 features for each sample i.e the training data matrix's size is Mx2. so how i can adapt the HOG vector to be trained on linear SVM. Please help me. Thanks 回答1: What do you mean by "the linear SVM accept only 2 features for each sample"? You may be confused on how the SVM function accepts its training data. Here's a quick example of how

How to Score on a new Data Set

落爺英雄遲暮 提交于 2020-01-07 01:21:13
问题 We have built models in R for Clustering. We now want the equation of the model to be deployed for the new customers whom we want to Cluster. In SAS, the Cluster node used to provide a Clustering SAS code where we only had to to plug the new input variables. Is there a way to do that in R? How can we export the Cluster equation? An example of the same is as below using the standard iris dataset. irisnew <- iris library("cluster", lib.loc="~/R/win-library/3.2") (kc <- kmeans(irisnew, 3)) K