classification

One Class Classification Models in Spark

耗尽温柔 提交于 2019-12-08 04:55:18
问题 Are there any implementations of One class classifiers in the Spark? There doesn't appear to be anything in ML or MLlib, but I was hoping that there was an extension developed by someone in the community that would provide some way of producing a trained classification model where only one labeled class is available in the training data. 回答1: It's Java, not Spark, but LibSVM has a one class SVM classifer, and calling it from Spark shouldn't be a problem. 来源: https://stackoverflow.com

Plotting a linear discriminant analysis, classification tree and Naive Bayes Curve on a single ROC plot

女生的网名这么多〃 提交于 2019-12-08 04:55:09
问题 The data is present at the very bottom of the page and is called LDA.scores'. This is a classification task where I performed three supervised machine learning classification techniques on the data-set. All coding is supplied to show how these ROC curves were produced. I apologise for asking a loaded question but I have been trying to solve these issues using different combinations of code for almost two weeks, so if anyone can help me, then thank you. The main issue is the Naive Bayes curve

tensorflow classify multiple images

这一生的挚爱 提交于 2019-12-08 03:47:38
问题 I am using the Tensorflow image classification example (https://www.tensorflow.org/versions/r0.9/tutorials/image_recognition/index.html). How could I classify multiple images at a time? EDIT: Ideally, I would just pass in one image and a number ( nb ) as arguments, and then make the input-to-be-classified nb iterations of that image The file is classify_image.py , and the important portion is: def run_inference_on_image(image): """Runs inference on an image. Args: image: Image file name.

scikit learn sample try out with my classifier and data

荒凉一梦 提交于 2019-12-08 03:14:53
问题 I have build a small program that creates a classifier for a given dataset with scikit-learn. Now I wanted to try this example, to see the classifier at work. For example the clf has to detect "cats". This is how I go on: I have 50 pictures of Cats and 50 pictures of "none cats". get descriptors for data_set with sift-feature detector Split data into training set and test set (25 pictures cats + 25 pictures non cats = training_set, test_set same) get cluster centers with kmeans from the

(Python Scipy) How to flatten a csr_matrix and append it to another csr_matrix?

孤者浪人 提交于 2019-12-08 02:08:10
问题 I am representing each XML document as a feature matrix in a csr_matrix format. Now that I have around 3000 XML documents, I got a list of csr_matrices. I want to flatten each of these matrices to become feature vectors, then I want to combine all of these feature vectors to form one csr_matrix representing all the XML documents as one, where each row is a document and each column is a feature. One way to achieve this is through this code X= csr_matrix([a.toarray().ravel().tolist() for a in

Parsing HTML: Adult Classification Systems

大城市里の小女人 提交于 2019-12-08 02:01:40
问题 I'm research the different and (sometimes obsolete) Ratings/Classification standards used on the web. i.e. PICS, POWDER, ICRA Which standard is the most popular (number of sites using it)? Is there a C# library which will handle any (or all) of these? 回答1: You shouldn’t use PICS anymore. From http://www.w3.org/2007/powder/: POWDER has superseded PICS as the recommended method for describing Web sites and building applications that act on such descriptions. A comparison of PICS and POWDER is

Incremental Decision Tree C++ Implementation

旧街凉风 提交于 2019-12-07 21:37:15
问题 Do anyone know any incremental implementation of decision tree classifier. Such that it could generate optimal decision tree classifier when you add new instance to training set with low computation and as quick as possible according existing decision tree classifier? In other words I have an optimal decision tree classifier of set A , which named T_1 , now I want to add instance X to set A and find optimal decision tree classifier tree T_2 by taking advantage of T_1 and X for set {A,X} .

Image classification and image resizing

不问归期 提交于 2019-12-07 20:41:26
I have a set of images that I am using for a typical classification problem using Tensorflow. The images come in different sizes so I wrote a small piece of code to resize them all. But the question is what is the best strategy of resizing for training purposes? For example, is it better to resize them, no matter how they scale up or down, or it is better to keep the aspect ratio and add some artificial zero padding around the resized images? I believe this is a typical question with some existing studies or solutions. Appreciate your advice. Regards, Hamid 来源: https://stackoverflow.com

ROC curve in R using rpart package?

徘徊边缘 提交于 2019-12-07 17:38:42
问题 I split Train data set and Test data set. I used a package rpart for CART (classification tree) in R (only train set). And I want to carry out a ROC analysis using the ROCR package. Variable is `n. use' (response varible... 1=yes, 0=no): > Pred2 = prediction(Pred.cart, Test$n.use) Error in prediction(Pred.cart, Test$n.use) : **Format of predictions is invalid.** This is my code. What is problem? And what is right type ( "class" or "prob" ? library(rpart) train.cart = rpart(n.use~., data=Train

weka: how to get class name from testing single instance

走远了吗. 提交于 2019-12-07 15:22:09
问题 i want to make a single test for single instance i use j48 in FilteredClassifier like this: Remove rm = new Remove(); rm.setAttributeIndices("1"); // remove 1st attribute // classifier J48 j48 = new J48(); j48.setUnpruned(true); // using an unpruned J48 // meta-classifier FilteredClassifier fc_J48 = new FilteredClassifier(); fc_J48.setFilter(rm); fc_J48.setClassifier(j48); tdta.dataSet.setClassIndex(tdta.dataSet.numAttributes() - 1); fc_J48.buildClassifier(tdta.dataSet); now, i try those