text stringlengths 83 79.5k |
|---|
H: Can neural network represent a relation that is a derivative?
Let's say I measure people hiking uphill, and it happens that their hiking speed is related to the slope so they hike slower where the hill is steeper. My input variable is the hill's elevation and my output variable is their hiking speed. I fit a neural... |
H: Should I use coordinates as features?
I am building a regression model. Each sample/object in my dataset has some numerical and categorical features. Let's call those $f_1, f_2, f_3$ for now. The output that I'm trying to learn is a $2D$ grid of numerical values. Kind of like an $3\times 3$ image with values in it.... |
H: Trying to predict extreme values corresponding to rare events
I need some advice on methodology.
I need to predict a numeric value (claim amount) being as good as possible on high values corresponding to rare events (corporal damage, technological disaster...).
Any suggestion on methodology would be appreciated. Th... |
H: How to split a large set of coordinates into smaller sets using something like nearby selection?
I have a dataset filled with 3817 coordinates (latitude, longitude). What I want to do is create groups of ~500 coordinates so that smaller group can be used to solve Vehicle Routing Problem. The reason I want to do thi... |
H: Why does it not need to set test group when using 'rank:pairwise' in xgboost?
I'm new for learning-to-rank. I'm trying to learn the Learning to rank example provided by xgboost. I found that the core code is as follows in rank.py.
train_dmatrix = DMatrix(x_train, y_train)
valid_dmatrix = DMatrix(x_valid, y_valid)
t... |
H: Why is not AUC or other metrics used for splitting nodes in decision trees?
There are common ways to split a tree in decision trees and all their variants:
Gini Index
Entropy
Misclassification
Why there is not a method which uses directly AUC or accuracy (or whichever the modeler need) to split the nodes.
Is it b... |
H: How does DQN solve Open AI Cartpole - v0?
Context
I am confused about how a DQN is supposed to solve the cart pole problem since the rewards are so dense. I have been using pytorch example. I am aware of some solutions, but I have issue with the basic principle of the env.
Unlike the tutorials, I converted the stat... |
H: How to choose an optimal threshold for binary discretization
We know that we usually do discretizations to continuous features to remove extra information and unwanted regularities, which makes the model robust and well-predicted.
But I am wondering except based on the context of feature how to choose an optimal th... |
H: How to perform polynomial landmark detection with deep learning
I am trying to build a system to segment vehicles using a deep convolutional neural network. I am familiar with predicting a set amount of points (i.e. ending a neural architecture with a Dense layer with 4 neurons to predict 2 points(x,y) coords for b... |
H: Detect a pattern in time series data
I have the following time serie data and I need to detect the following pattern:
- a 1st spike above a given value
- a 2nd spike close to the given value
What defines "a spike" is that its value is x% above the surrounding spikes.
I would like to use python (numpy and pandas mo... |
H: Unskewing the Data with the PCA's Help
I'm making some RFM Analyses (Customer Segmentation) and, in order to feed the RFM data to K-Means, I need to unskew the data, as K-Means works best when dealing with symmetrical distributions.
One of the best practices I've found so far is to use log transforms in order to un... |
H: How should I treat these non-English documents in the NLP task?
So I have a small corpus of about 30k documents and about 50 documents in this corpus are in other languages (Persian, Chinese, Arabic, German, Spanish etc). I will be using this corpus for training a machine learning model.
Now the question is: How sh... |
H: Question about sklearn's StratifiedShuffleSplit
I'm reading through the book Hands-On Machine Learning with Scikit-Learn and Tensorflow by Aurélien Géron. In a regression project on California Housing Prices, he goes over the concept of stratified sampling.
I think I understand the concept as his explanation "the p... |
H: How does the meta Random Forest Classifier determine the final classification?
I am trying to understand exactly how the meta random forest classifier determines the final prediction, I understand that there is a voting system and an aggregation from the decision trees is used to find the final prediction, I have r... |
H: In sklearn Pipeline, why are all parameters fit_transform(), but the last one can be just fit()?
I am reading through Hands-On Machine Learning with Scikit-Learn & TensorFlow. We are going over scikit-learn Transformation Pipelines for preparing data for the machine learning algorithms.
Here is the code (housing_nu... |
H: predicting next observation using HMMLearn.multinomialhmm(discrete hmm)
I have implemented a HMM using hmmlearn:
states = ['healthy','sick']
observations = ['sleeping','eating','pooping']
model = HMM(n_components=2)
model.n_features = 3
model.startprob_ = [0.7, 0.3]
model.transmat_ = [
[0.8, 0.2],
[0.4, 0.6... |
H: why does transform from tfidf vectorizer (sklearn) not work
I'm transforming a text in tf-idf from sklearn. I made the model:
from sklearn.feature_extraction.text import TfidfVectorizer
corpus = words
vectorizer = TfidfVectorizer(min_df = 15)
tf_idf_model = vectorizer.fit_transform(corpus)
And now I'm making vecto... |
H: How to design batches in a stateful RNN
I am using TF Eager to train a stateful RNN (GRU).
I have several variable length time sequences about 1 minute long which I split into windows of length 1s.
In TF Eager, like in Keras, if stateful=True, "the last state for each sample at index i in a batch will be used as ... |
H: Is converting a numerical target to binary helpful?
I'm trying to solve an ML problem where the target variable is numeric, let's say the pollution level in a city. But the client is not interested in predicting the actual amount of pollutants, they are just interested in knowing whether the pollution level is high... |
H: Prediction interval for general non-linear regression
I have been working on a predictive model. With each prediction, we need to provide a score to express the confidence about our prediction. So I am looking at prediction interval (PI). In linear regression, I believe these can be obtained and well-documented. Ho... |
H: what does "blocks" mean in the context of HDFS ecosystem? is it the same concept in the context of a single hard disk drive?
According to Hortonworks
HDFS has demonstrated production scalability of up to 200 PB of
storage and a single cluster of 4500 servers, supporting close to a
billion files and blocks.
wh... |
H: finding optimal solution $w$ and classification accuracy
Suppose you are given $6$ one-dimensional points: $3$ with negative labels $x_1 = −1$, $x_2 = 0$, $x_3 = 1$ and $3$ with positive labels $x_4 = −3$, $x_5 = −2$, $x_6 = 3$. In this question, we first
compare the performance of linear classifier with or without... |
H: Default value of learning rate in adam optimizer - Keras
I am working on a image classification problem using Transfer Learning.
Parameters used given below:
Adam optimizer with learning rate - 0.0001
adamOpti = Adam(lr = 0.0001)
model.compile(optimizer = adamOpti, loss = "categorical_crossentropy, metrics = ["a... |
H: Soft SVM solving for $b$
I don't really understand how to approach this problem. I know that $w=\sum_{n=1}^{N}{a_ny_nx_n}$ and $y_n(w^T\cdot x_n+b)=1. $ So I can solve for $b$ from that equation but I can't figure out how to apply equation(1) that I'm supposed to use.
AI: From $$y^{(n)}(w^T\cdot x^{(n)} + b)=1,$$
... |
H: Model comparison with CV using standard error
Discovering the ML world with sklearn, I'm testing a large panel of models onto my dataset. This is for learning purpose but also for work so I want the final model to be as accurate as possible, while I can progress in my understanding of ML.
I've separated my dataset ... |
H: Using a feature in prediction even if it gets zero as p-value?
I created two binary classification based logistic regression models and I got these results:
Model 1:
Accuracy: 67.51%
AUC: 65.21%
Model 2:
Accuracy: 67,99%
AUC: 65,70%
The second model is created based on an additional column (Co... |
H: Need a little help Understanding how to build model's in Keras
I am trying to make a CNN in Keras, and to test the validity of my model i am trying to get it to train on MNIST dataset, so i am sure that everything is working fine, but unfortunately model is barely training and i suspect that nothing updating.
My mo... |
H: Make the CNN to say "I don't know"
I am currently working on an image classification problem. To ease the implementation I used transfer learning in Keras with Resnet50 as base model.
I have 2 classes, however there are many possibilities that the input image may not belong to both the classes. In such cases the CN... |
H: How to interpret this 'Zipf' (survival, war casualties) plot?
Help me interpret this chart please?
What do the X and Y axes mean here? (I asked the author directly but they didn't respond for some reason.)
Any thoughts on what 'Surivival Function' might mean here?
War Casualties from 1800 until today, n data point... |
H: Splitting train/test sets by an identifier?
I know sklearn has train_test_split() to split a train and test set. But I read that, even with setting a random seed, if your actual dataset is updated regularly, the random seed will reset with each updated dataset and take a different train/test split. Doing this, your... |
H: How to replace NaN values for image data?
My data set has a total of 200 columns, where each column corresponds to the same pixel in all of my images. In total, I have 48,500 rows. The labels for the data range from 0-9.
The data looks something like this:
raw_0 raw_1 raw_2 raw_3 raw_4
0 120.0 133.0 9... |
H: Why would one crossvalidate the random state number?
Still learning about machine learning, I've stumbled across a kaggle (link), which I cannot understand.
Here are lines 72 and 73:
parameters = {'solver': ['lbfgs'],
'max_iter': [1000,1100,1200,1300,1400,1500,1600,1700,1800,1900,2000 ],
... |
H: Data enrichment of geographical records
I have a user_data table with various fields, some of them are based on geography.
I'd like to enrich the data with additional columns, like expected_income_in_region, city_population, life_expectancy_in_state, etc... for each user record.
I'd like to use these extended fiel... |
H: If the set of all possible states changes each time, how can Q-learning "learn" anything?
I found this resource that explains q-learning with a very simple example. Make it a 2D problem, a rectangle instead of a line, and it's still simple. The only difference is that now there are 2 more possible actions (up and d... |
H: How many features can we input for a SVM to classify?
I am new to SVM classifiers. I read on the internet that SVM are binary classifiers and also many SVMs, as described in research papers, only take 2 features as the input.
(e.g. https://scikit-learn.org/stable/auto_examples/svm/plot_iris.html)
My question is, do... |
H: Is linear regression suitable for these data?
I have a data set predicting a continuous variable, $Y$. I have $15$ to $20$ potential feature variables most of which are categorical, some of which are ordinal or categorical. These have been converted to numerical values. I have two questions.
Is linear regression s... |
H: memory error while converting images into an array
I am working on a facial recognition use case. I have 57k jpg images and am converting them into an array. While executing the program, I am getting a memory error.
The function I am using:
def image_array(l):
features = []
for pgm in l:
pic = imag... |
H: What will the required time to process 500GB of images using NVIDIA GEFORCE 930M GPU
I have an image dataset of size 500GiB, and my system specs are NVIDIA GEFORCE 930M, 12GB of RAM and Intel Core i5.
I have the following questions:
Is it possible such a large dataset to be used in my local machine?
If yes, How m... |
H: Problem trying to build my own sklean transformer
I build the following sklearn transformer :
class Cat2Rat( BaseEstimator , TransformerMixin ) :
def __init__( self , col2trans ) :
self._col2trans = col2trans
def fit( self, X, y = None ):
return self
def transform( self , X , y = None ) :
... |
H: How is hinge loss related to primal form / dual form of SVM
I'm learning SVM and many classic tutorials talk about the formulation of SVM problem as a convex optimization problem: i.e. We have the objective function with slack variables and subject to constraints. Most tutorials go through the derivation from this ... |
H: How to find combined feature contributions in a random forest algorithm
I am currently working on a pancreatic cancer dataset which has numerous features including smoking, family history, age, etc. I have used the feature_importances_ method in sklearn to find and plot the individual feature importances, but wante... |
H: What is .numpy()?
I searched for numpy.numpy() and tried replacing .numpy() with .np() because numpy is already imported as np here: Tensorflow tutorial
But using `.np() returns an error.
In the section, "Creating training examples and targets" there is:
# Create training examples / targets
char_dataset = tf.da... |
H: Why can't my neural network learn how to predict the squares of natural numbers?
I want my neural network to learn to predict the square $n+1$ number having $n$ number.
I am considering a regression problem. That's what I'm doing:
from keras.preprocessing import sequence
from keras.models import Sequential
from ker... |
H: How is the linear regression cost function evolved?
A couple of weeks ago I joined the Standford University machine learning course on Coursera. In that course, they directly gave the cost function formula without telling how this formula was evolved. Can anyone help me by telling how that cost function has been ev... |
H: Notation unclear - Radial Basis Funtion
In Chapter 6 (Deep Forward Networks) on Page 193 of Deep Learning they talk about the design of Hidden Units.
The Radial Basis Function is introduced as follows:
$$
h_i = exp\big{(}-\frac{1}{\sigma_i^2}||W_{:,i} − x||^2\big{)}
$$
What does the colon as Index for $W$ mean?
AI:... |
H: Help with understanding cross-validation
My understanding of cross-validation is that we divide our data set into parts 1-k, then use part 1 as a validation set and parts 2-k as a training set, then use part 2 as a validation set and the remainder as a training set, etc., until we've used each part as a validation ... |
H: Smaller network width than output size?
I am trying to figure out if it makes sense that the width of the network could be smaller than the input/output size?
So for example, I am giving the Neural Network 2048 numbers, and I am expecting 2048 numbers back. I would also like to use LSTM's, which take a lot of time/... |
H: Pandas Groupby makes kernel die in Jupyter notebook/Python
I have a groupby in jupyter-notebook that takes ages to run and after 10 minutes of running it says 'kernel died...',
The groupby looks like this:
df1.groupby(['date', 'unit', 'company', 'city'])['col1',
'col2',
'col3',
'col4',
...
'col20'].mean()
All of... |
H: What predictive model to use to impute Gender?
My data looks like this:
birth_date has 634,990 missing values
gender has 328,849 missing values
Both of these are a substantial amounts since I have 900k entries, so I can't discard empty rows. For birth_date someone recommended using Multivariate imputation by Chain... |
H: Communication between Keras and Backend like Tensorflow, Theano
Keras is a high level neural network API providing python library which uses tensor flow or theano or cntk as backend. What are the primary roles of backend libraries? Is it implementation? or Is it computational heavylifting using GPU, threading etc? ... |
H: Problem building dictionary from series
I have a pandas dataframe with a column CAS_BRM_IDA of type category (even if its values seem of foat type ... but they are not meaningful per se)
I built the following serie from that dataframe :
p = df.groupby( [ 'CAS_BRM_IDA' ] ).mean()[ 'TOP_FRD']
print( p )
Result displ... |
H: What is the minimum amount of data required for sales prediction with ML
I have historical data from the MySQL DB which contains 33 months of data.
The features in the data are state, depot, product type, purchase date, salesperson name, volume, and price.
Using this information, I would like to predict/forecast pr... |
H: What are "belief maps" and "affinity maps"?
When evaluating Nvidia-Deep Object Pose Estimation, I came across these terms, belief maps and affinity maps. I haven't been able to find a satisfying answer online on what these terms mean.
AI: In computer vision, pose estimation is the detection of an object's orientati... |
H: What measures can I use to find correlation between categorical features and binary label?
For analyzing numerical features, we have correlation. What measures do we have to analyse the relevance of a categorical feature to the target value? If there isn't a direct measure, how can we achieve this?
Chi-squared test... |
H: Estimating the value of $\pi$ with a Monte Carlo dartboard: $<$ or $\leq$?
I'm trying to figure out which is the proper way to estimate $\pi$ using the Monte Carlo method randomly distributing points in a square that also contains an inscribed circle.
Some sources say to use the comparison of $\sqrt{x^2+y^2}\le 1$... |
H: Keeping part of a string in R
I have a dataframe with the following column
city <- c("Sydney NSW", "Newcastle NSW", "Liverpool NSW", "Broken Hill NSW")
I want to maintain everything prior to NSW (space included). What Regex expression can be used in R for that?
AI: Use strsplit().
If you want to remove the space ... |
H: Pandas throwing "Error tokenizing data. C error" while loading data sets from URL
I am trying to work on the Titanic competition to get hands on experience with data science & machine learning. I tried to load up the datasets from GitHub but pandas threw the following error:
ParserError: Error tokenizing data. C e... |
H: Derivation of backpropagation for Softmax
So, after a couple dozen tries I finally implemented a standalone nice and flashy softmax layer for my neural network in numpy. All works well, but I have a question regarding the maths part because there's just one tiny point I can't understand, like at all.
Having any kin... |
H: How do we define the noisy-MAX canonical aggregator for Bayesian networks?
In the book Probabilistic graphical models - principles and techniques, Daphne Koller and Nir Friedman introduce the noisy-OR canonical model for CPDs (in the independence of causal inference family of aggregators) and go on to say this can ... |
H: bert-as-service maximum sequence length
I installed bert-as-service (bert-as-service github repo) and tried encoding some sentences in Japanese on the multi_cased_L-12_H-768_A-12 model. It seems to work as I am getting vectors of length 768 per word but np.shape() shows this for each sentence:
np.shape(vec_j[0]): ... |
H: difference betwen predicting seen and unseen data
I tried to test my model with seen and unseen data (seen data are data that i used to learn the model). I figure out that as much as i increase the number of features seen data can be properly predicted, while when using a feature selection technique unseen data ca... |
H: Scatter Plot with Conditions
Suppose I have a data frame
name = ['A', 'B', 'C']
score = [2,4,6]
I want to create a scatter plot with the following conditions, color the bubble as green if the score is greater than 3 and red otherwise. I'd also like to label the bubble with its respective name.
I'm only able to c... |
H: statsmodels ols does not include all categorical values
I am doing an ordinary least squares regression (in python with statsmodels) using a categorical variable as a predictor. There are 5 values that the categorical variable can have. However, after running the regression, the output only includes 4 of them.
Here... |
H: Neural networks, optimization math intuition
When I look into the following partial derivative, I see it as being the key element of any optimization algorithm out there. Correct me if I'm wrong, but this gets us the slope of the loss function, so we can go opposite to that slope, therefore minimizing the loss.
$$\... |
H: what is the first input to the decoder in a transformer model?
The image is from url: Jay Alammar on transformers
K_encdec and V_encdec are calculated in a matrix multiplication with the encoder outputs and sent to the encoder-decoder attention layer of each decoder layer in the decoder.
The previous output is the... |
H: Clustering vs Non Clustering problems?
I'm just getting started with Andrew Ng's Machine Learning wherein he explained the example of the cocktail party problem vs the gene clustering problem in order to explain the difference between clustering and non clustering problems within unsupervised learning itself. Howev... |
H: What do each of the three SVM classes in R represent?
Inspired by this post, I took a look at this doc
SVN in R output this:
Statistics by Class:
Class: 1 Class: 2 Class: 3
Sensitivity 1.0000 0.9412 1.0000
Specificity 1.0000 1.0000 0.9762
Pos Pred Value 1.... |
H: Having trouble understanding None in the summary of my Keras model
The above code is a sample of a CNN model built using Keras. The first layer is a convolutional layer which will receive images of input_shape = (64, 64, 3), thus meaning that the format of the images is in RBG. The output of the first layer is (No... |
H: Am I using GridSearch correctly or do I need to use all data for cross validation?
I'm working with a dataset that has 400 observations, 34 features and quite a few outliers, some of them extreme. Given the nature of my data, these need to be in the model.
I started by doing a 75-25 split on my data and leaving tho... |
H: How to convert Hindi/Telugu/Marathi text to vector for text classification problem?
sentence = 'अच्छा होगा अगर इसमें और गहने ना हों'
Which method will work for this task?
Is any pretrained model available to convert this text to vectors?
Please help by giving the code.
AI: Hindi text is in Unicode format and can be... |
H: How to use SimpleImputer Class to replace missing values with mean values using Python?
This is my code
import numpy as np
import matplotlib.pyplot as plt
import pandas as pd
#Importing Dataset
dataset = pd.read_csv('C:/Users/Rupali Singh/Desktop/ML A-Z/Machine Learning A-Z Template Folder/Part 1 - Data Preprocess... |
H: Does it make sense to randomly select features as a baseline?
In my paper, I am saying that the accuracy of classification is $x\%$ when using the top N features.
My supervisor thinks that we should capture the classification accuracy when using N randomly selected features to show that the initial feature selecti... |
H: How to optimize the lambdas of a hybrid loss in a deep learning model
I am using a generative adversarial deep learning model (GAN) with a hybrid loss represented by a linear combination of four losses with three $\lambda$'s, something like:
$total\_loss = loss_1 + \lambda_1\times loss_2 + \lambda_2\times loss_3 + ... |
H: Can one use non converged results from Logistic Regression?
I'm running Logistic Regression on a dataset for a classification problem.
I used the model on the dataset when it was normalized and I had no problem with it converging.
Now, I wanted to see the results without feature normalization and I am getting the... |
H: sklearn FeatureUnion vs ColumnTransformer
I am trying to build a sklearn pipeline which does different transformations on numerical data, and different transformation on categorical data. In the process, I compare the results from ColumnTransformer vs FeatureUnion, and they are not the same. Please advise if the fo... |
H: Calculate a ranking function from classification features
I am using 3 features (x1, x2, x3) for binary classification. All my feature values are in 0 to 1 range (unit range).
I obtained how important each feature was in classification as follows (i.e. feature importance)
x1 --> 0.1
x2 --> 0.5
x3 --> 0.7
It is cle... |
H: Train Naive Based Classifier
For (a) I have calculated $P(G)=\frac{5}{8}$, $P(O|G)=\frac{2}{5}$, $P(B|G)=\frac{1}{5}$, $P(C|G)=\frac{4}{5}$, and $P(A|G)=\frac{4}{5}$. Now how do I calculate the maximum likelihood estimate of these values?
And how do I go about part (b)? I get that $O,B,C,A$ are independent so I c... |
H: Is numpy.corrcoef() enough to find correlation?
I am currently working through Kaggle's titanic competition and I'm trying to figure out the correlation between the Survived column and other columns. I am using numpy.corrcoef() to matrix the correlation between the columns and here is what I have:
The correlation ... |
H: Logistic Regression - ROC curve plots Sensitivity vs Specificity instead of (1-Specificity)
I am new to Machine Learning and have been doing some practice on Logistic Regression. To evaluate the models, I've been trying to create some ROC plots.
The package that i used is pROC.
The model name is - 'model' dataset... |
H: Is it possible that a CNN has better accuracy than RNN in word classification?
So I found something strange once I compared the accuracy of the prediction of a class for a question between a CNN and an RNN (GRU).
The CNN achieved 0.87 accuracy over the RNN (GRU) with 0.7520 accuracy. In terms of question classifica... |
H: Weighted Linear Combination of Classifiers
I am trying to build an ensemble of classifiers whereby I want my algorithm to learn a set of weights such that it can weight the outputs of different classifiers for a set of data points.
I am wondering, how would I go about learning these weights? I tried using automatic... |
H: Hierarchical clustering with precomputed cosine similarity matrix using scikit learn produces error
We want to use cosine similarity with hierarchical clustering and we have cosine similarities already calculated.
In the sklearn.cluster.AgglomerativeClustering documentation it says:
A distance matrix (instead of a... |
H: Why Decision Tree Classifier is not working with categorical value?
I am learning my way through this, so please be easy on me if you find any mistakes, I could really use a professional opinion here. Thx.
I am trying to model a Decision Tree Classifier as part of an ensemble (soft voting system). The problem is th... |
H: Why multiply by 2 when calculating partial derivatives during backpropagation?
I'm wondering why we multiple by 2 when calculating partial derivatives.
I'm referencing the 2's that I've circled below, from here.
We also see this in the python implementation,
m_deriv += -2*X[i] * (Y[i] - (m*X[i] + b)), there is a 2... |
H: What is the effect of KL divergence between two Gaussian distributions as a loss function in neural networks?
In many deep neural networks, especially those based on VAE architecture, a KL divergence term is added to the loss function. The divergence is computed between the estimated Gaussian distribution and prior... |
H: How to interpret Shapley value plot for a model?
I was trying to use Shapley value approach for understanding the model predictions. I am trying this on a Xgboost model. My plot looks like as below
Can someone help me interpret this? Or confirm my understanding is correct?
My interpretation
1) High values of Featu... |
H: Graph isn't an attribute in TensorFlow? Very basic question
Hi am am just starting to learn how to use TensorFlow and this is one of my first projects. I am simply trying to create a graph.
This is my code:
import tensorflow as tf
graph1 = tf.Graph()
I cannot seem to create a Graph. The compiler threw an A... |
H: F1 score vs accuracy, which metric is more important?
I have two multiclass classification models for making predictions (number of classes is three to be precise). One is Keras neural network, other is Gradient Boosted Classifier from Scikit Learn library.
I have noticed that after training on same data GBC has h... |
H: Binary classifier using Keras with backend Tensorflow with a Binary output
I am trying to build a binary classifier with tensorflow.keras
Currently unable to identify a solution to having the model generating only 0s and 1s.
The code for compiling my tensorflow model.
from __future__ import absolute_import, divisio... |
H: Why can't i normalize my data using preprocessing.normalize?
code:
df['Miles'] = preprocessing.normalize(df['Miles'])
Error msg:
ValueError: Expected 2D array, got 1D array instead:
array=[33.3304678 33.3304678 33.3304678 ... 3.00959404 3.00959404
3.00959404].
Reshape your data either using array.reshape(-1... |
H: How do CNNs find different feature maps?
Assume I have a CNN that in the first (conv) layer takes a 1-channel signal (the input) and gives a 2-channel output. Let's further assume that the rest of the net has symmetric architecture from the point-of-view of any of those channels. Moreover, let's assume all the weig... |
H: How to get sensitivity and specificity for multi-class classification for each fold of cross validation?
I am working on a multi-class classification consisting of 4 classes.
I am applying 5-fold cross-validation on it and would like to get the sensitivity (recall) and specificity score for each of those folds.
I f... |
H: Is it possible to change pandas column data type within a sklearn pipeline?
Sklearn pipeline I am using has multiple transformers but one of the initial transformers returns numerical type and the consecutive one takes object type variables.
Basically I need squeeze in a:
data[col] = data[col].astype(object)
for t... |
H: building a 2-layer LSTM for time series prediction using tensorflow
From Tensorflow tutorials i am experimenting time series with LSTM
In the section 'multi-step prediction' using LSTM tutorial says
Since the task here is a bit more complicated than the previous task, the model now consists of two LSTM layers. Fi... |
H: How to order the data with respect to data type
I am having large data set (82 variables)
Is there any way to arrange data such a way that I have to get all numerical variables firstly then categorical variables so that I can run hypothesis testing or exploratory data analysis(eda) by having loop.
If not is there... |
H: Text summarization with limited number of words
I am reviewing summarization techniques and haven't (yet) found an approach to limit the length of a summary. So for example a summarization function that gives me a summary that is < 500 words.
Can you point me in the right direction? Are there approaches/implementat... |
H: How to interpret predicted data from a keras model
I tried building a keras model to classify leaves from the leaf classification dataset on Kaggle. After I compiled and trained the model, I used it to predict the name of the leaves in the testing images, but all I got is an array of integers. How can I exactly int... |
H: Use of Standardizer to handle outliers?
I have a dataset with 60 columns and 5K records. There are few columns which has outliers. I understand that there are multiple approach to handle outliers.
Actually I don't wish to drop the data as it is an outlier because am not sure whether it is really an outlier or a mea... |
H: Prediction vs causation in a ML project
I am performing a classification task and was able to identify significant predictors (important features using Random Forest) that can help separate the classes or influence the outcome.
But I read online that prediction models are not causal models.
Let's say if my predict... |
H: What is the meaning of likelihood?
I am studying Bayes probability applied to machine learning, and I have encoutered the concept of likelihood, which I don't understand.
I have seen that the Bayes rule is:
$P(A|B)=\frac{P(B|A)P(A)}{P(B)}$
where $P(B|A)P(A)$ is the conditional probability, while $P(B|A)$ is the lik... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.