feature-extraction

Keras Same Feature Extraction from Different Images

ぃ、小莉子 提交于 2020-07-10 06:59:28
问题 I'm using Keras' pre-trained model for feature extraction in two images, however they gave the same outcome (array_equal = True). I've tried other model like VGG16 and Resnet50 but the results are the same. Am I writing the code wrong or is it the limitation of pre-trained model? Is there anything I can do to extract different features? Thanks! import cv2 from keras.applications.inception_v3 import InceptionV3 from keras.applications.inception_v3 import preprocess_input model = InceptionV3

Keras Same Feature Extraction from Different Images

青春壹個敷衍的年華 提交于 2020-07-10 06:59:12
问题 I'm using Keras' pre-trained model for feature extraction in two images, however they gave the same outcome (array_equal = True). I've tried other model like VGG16 and Resnet50 but the results are the same. Am I writing the code wrong or is it the limitation of pre-trained model? Is there anything I can do to extract different features? Thanks! import cv2 from keras.applications.inception_v3 import InceptionV3 from keras.applications.inception_v3 import preprocess_input model = InceptionV3

import error when using spafe library for feature extraction

女生的网名这么多〃 提交于 2020-04-16 04:02:44
问题 I ' am working on audio file and need to use spafe library for lfcc, lpc... and i install the library as mentionned in the site : https://spafe.readthedocs.io/en/latest/ But when i try to extract some features , like lfcc, mfcc, lpc, i have import error par example when i use this code : import scipy.io.wavfile import spafe.utils.vis as vis from spafe.features.mfcc import lfcc i have this error : ImportError: cannot import name 'lfcc' I don't undestand because i can import spafe, i have all

import error when using spafe library for feature extraction

血红的双手。 提交于 2020-04-16 04:02:08
问题 I ' am working on audio file and need to use spafe library for lfcc, lpc... and i install the library as mentionned in the site : https://spafe.readthedocs.io/en/latest/ But when i try to extract some features , like lfcc, mfcc, lpc, i have import error par example when i use this code : import scipy.io.wavfile import spafe.utils.vis as vis from spafe.features.mfcc import lfcc i have this error : ImportError: cannot import name 'lfcc' I don't undestand because i can import spafe, i have all

Feature hashing in R for Text classification

佐手、 提交于 2020-02-24 09:14:49
问题 I'm trying to implement feature hashing in R to help me with a text classification problem, but i'm not sure if i'm doing it the way it should be. Part of my code is based on this post: Hashing function for mapping integers to a given range?. My code: random.data = function(n = 200, wlen = 40, ncol = 10){ random.word = function(n){ paste0(sample(c(letters, 0:9), n, TRUE), collapse = '') } matrix(replicate(n, random.word(wlen)), ncol = ncol) } feature_hash = function(doc, N){ doc = as.matrix

RandomForestRegressor and feature_importances_ error

泪湿孤枕 提交于 2020-01-24 04:01:08
问题 I am struggling to pull out the feature importances from my RandomForestRegressor, I get an: AttributeError: 'GridSearchCV' object has no attribute 'feature_importances_'. Anyone know why there is no attribute? According to documentation there should exist this attribute? The full code: from sklearn.ensemble import RandomForestRegressor from sklearn.model_selection import GridSearchCV #Running a RandomForestRegressor GridSearchCV to tune the model. parameter_candidates = { 'n_estimators' :

I got stuck trying to fetch the previous value based on a criteria

北战南征 提交于 2020-01-15 10:33:19
问题 I'm new to FeatureTools library, and I got stuck trying to create two types of features, both are related to fetching previous values. One is the previous value itself for 'QUANTIDADE' , 'VALOR_TOTAL' and 'DATA_NOTA' , and the other is the time since the previous observation (days) which has 'DATA_NOTA' as the date field. I don't know if it is possible to do it with FeaturelTools. If someone can help me, I would appreciate it. I have a dataframe (df) as folowing: When I normalize the above df

I got stuck trying to fetch the previous value based on a criteria

*爱你&永不变心* 提交于 2020-01-15 10:32:26
问题 I'm new to FeatureTools library, and I got stuck trying to create two types of features, both are related to fetching previous values. One is the previous value itself for 'QUANTIDADE' , 'VALOR_TOTAL' and 'DATA_NOTA' , and the other is the time since the previous observation (days) which has 'DATA_NOTA' as the date field. I don't know if it is possible to do it with FeaturelTools. If someone can help me, I would appreciate it. I have a dataframe (df) as folowing: When I normalize the above df