feature-extraction

How to interpret and view the complete permutation feature plot in jupyter?

不问归期 提交于 2020-01-04 07:54:29
问题 I am trying to generate the feature importance plot through Permutation Feature Importance plot. I am trying to kind of make sure whether the features returned through different approaches is stable. To select optimal features. Can we get a p-value or something of that sort which can indicate the feature is significant? If I could do it with PFI , i could be more confident but looks like the results are entirely opposite Here is my code to generate the plot logreg=LogisticRegression(random

Issue: Bag of Features Training SIFT or SURF for car detection within Video with OpenCV + Python

主宰稳场 提交于 2020-01-01 19:59:34
问题 I am trying to dump keypoints of cars with SIFT or SURF and match these keypoints to a video in order to detect cars. Keypoints are more convenient to use instead of Haar Cascades because I would have to use a lot of images for example 5000 to train, which will take a lot of computation process. Keypoints from SURF or SIFT are scale invariant which will be almost the same in every car. The code for dumping keypoints into a txt file is: import cv2 import numpy as np import os import cPickle

Is it possible to query Elastic Search with a feature vector?

拟墨画扇 提交于 2020-01-01 08:51:13
问题 I'd like to store an n-dimensional feature vector, e.g. <1.00, 0.34, 0.22, ..., 0> , with each document, and then provide another feature vector as a query, with the results sorted in order of cosine similarity. Is this possible with Elastic Search? 回答1: I don't have an answer particular to Elastic Search because I've never used it (I use Lucene on which Elastic search is built). However, I'm trying to give a generic answer to your question. There are two standard ways to obtain the nearest

computer vision: extracting info about a shape given a contour (e.g. pointy, round…)

被刻印的时光 ゝ 提交于 2020-01-01 03:31:05
问题 Given the 2D contour of a shape in the form of lines and vertices, how can I Extract Information from that? like: Pointy, round, straight line. Shape similarities with a given shape. Code is not necessary, I am more interested in concepts and the names of techniques involved to guide my search.... Thanks in advance. 回答1: Image moments One approach is to calculate the first and second order central moments of the shape described by the 2D contour. Using these values the elongation of the

best-found PCA estimator to be used as the estimator in RFECV

老子叫甜甜 提交于 2019-12-31 06:59:05
问题 This works (mostly from the demo sample at sklearn): print(__doc__) # Code source: Gaël Varoquaux # Modified for documentation by Jaques Grobler # License: BSD 3 clause import numpy as np import matplotlib.pyplot as plt from sklearn import linear_model, decomposition, datasets from sklearn.pipeline import Pipeline from sklearn.model_selection import GridSearchCV from scipy.stats import uniform lregress = LinearRegression() pca = decomposition.PCA() pipe = Pipeline(steps=[('pca', pca), (

Feature Selection and Reduction for Text Classification

匆匆过客 提交于 2019-12-29 10:06:31
问题 I am currently working on a project, a simple sentiment analyzer such that there will be 2 and 3 classes in separate cases . I am using a corpus that is pretty rich in the means of unique words (around 200.000). I used bag-of-words method for feature selection and to reduce the number of unique features , an elimination is done due to a threshold value of frequency of occurrence . The final set of features includes around 20.000 features, which is actually a 90% decrease , but not enough for

How to calculate Local Binary Pattern Histograms with OpenCV?

徘徊边缘 提交于 2019-12-28 12:05:00
问题 I have already seen that OpenCV provides a classifier based on LBP histograms: But I want to have access to the LBP histogram itself. For instance: histogram = calculate_LBP_Histogram( image ) Is there any function that performs this in OpenCV? 回答1: You can get the C++ code for computing LBP using OpenCV's Mat data structure here: http://www.bytefish.de/blog/local_binary_patterns You should be able to find the Python version as well on the same site. The code is written by Philipp Wagner, who

Android: using hu moments opencv function to get the feature value

自闭症网瘾萝莉.ら 提交于 2019-12-25 02:42:58
问题 My project is to get the feature value of leaf image and then save that value on database. But i don't know how to use hu moments function from opencv on android. Can anybody give me the example to use hu moments function from opencv on android?? This is the example that i found of using humoments on visual studio: cv::Moments mom = cv::moments(contours[0]); double hu[7]; cv::HuMoments(mom, hu); // now in hu are your 7 Hu-Moments link : example-humoments-visual-studio 回答1: I know this is

Android Opencv: Save ORB features using Json

你说的曾经没有我的故事 提交于 2019-12-25 02:38:16
问题 i want to save orb features to database that i get from this code: bmp=BitmapFactory.decodeResource(getResources(),R.drawable.t1); Utils.bitmapToMat(bmp, mat); FeatureDetector detector = FeatureDetector.create(FeatureDetector.ORB); detector.detect(mat, keypoints); DescriptorExtractor extractor = DescriptorExtractor.create(DescriptorExtractor.ORB); extractor.compute(mat, keypoints, features); i using json code to save the data from Mat of feature with the code i get from here: http://answers

Binary Feature Extraction

孤者浪人 提交于 2019-12-24 13:52:40
问题 I am a beginner in feature extraction for natural language processing purposes. I want to know how I can use a hashmap to extract features for a text. If each feature is a "key" in hashmap and its value is the "value" (all the features are binary, 0 or 1), does it mean that I need to have n hashmap (n is the number of words in the text)? Because for each word I need to extract the features. Am I right? Thanks in advance, Alice 回答1: Yes you can implement this with a hash map however depending