text stringlengths 83 79.5k |
|---|
H: Predict_proba on a binary classification problem
I have a binary classification task on my hands, i have a bunch of people that i need to classify as being ones or zeros and then use predict_proba to estimate how confident my prediction was on the samples used for inference.
My understanding is that predict_proba f... |
H: Keras - understanding ImageDataGenerator dimensions
I'm trying to implement custom object detection by taking a trained YOLOv2 model in Keras, removing the last layer and retraining it with new data. I'm confused about how to feed the data to Keras, though. I have annotated a bunch of pictures with bounding boxes u... |
H: Making sense of indices in 2D convolution operations in convolutional neural networks
Referring to the answer here: https://www.quora.com/Why-are-convolutional-nets-called-so-when-they-are-actually-doing-correlations, the equation for a discrete 2D convolution is specified as:
$$C(x,y)=\sum_{m=1}^M\sum_{n=1}^NI(m,n... |
H: are OneHotEncoder and keras To_categorical same?
The length of human_vocab is 18377.
The length of input X is 1000
I'm trying to run to_categorical
np.array(list(map(lambda x: to_categorical(x, num_classes=len(human_vocab)), X)))
Is this the same if i apply:
onehot_encoder = OneHotEncoder(sparse=False)
onehot_enco... |
H: How to export PCA to use in another program
I'm trying to write a random forest classifier for a very large dataset, as such as part of the pre-processing i have applied PCA to reduce from 643 features to 5 PC's. Is it possible to export these settings so I can
pca.transform(data)
in another program.
I have bee... |
H: what is the main difference between GAN and autoencoder?
what is the main difference between GAN and other older generative models? what were the characteristics of GAN that made it more successful than other generative models?
AI: The main differences are the philosophy that drives the loss metric, and consequentl... |
H: Layer notation for feed forward neural networks
Apologies in advance, for I have a fairly rudimentary question on the notations for studying Feed-Forward Neural Networks. Here is a nice schematic taken from this blog-post.
Here $x_i = f_i(W_i \cdot x_{i-1})$ where $f_i$ is the activation function. Let us denote th... |
H: How to handle missing date data?
I have a column named GarageYrBlt which just lists the year the garage of that house was built. I have one nan value for this column. Does it make sense to fill it with the columns median (This was a common approach for the missing age values in the Titanic competition)?
AI: I sus... |
H: How can I find correlation between features?
The problem
I want to figure out how routers correlate between each other. Like, if a specific error occurred in router A, and almost at the same time the error occurs in router B, they probably have some connection with each other (are at one line).
The Data
Suppose I... |
H: How to interpret this summary output in R?
How Do I interpret this summary output in R?
Coefficients:
Estimate Std. Error z value Pr(>|z|)
国家 3.976e-05 2.484e-05 1.600 0.109
就业情况 -2.471e-02 2.878e-03 -8.588 < 2e-16 ***
工作类型 1.677e-02 1.700e-03 9.865 < 2e-16 ***
... |
H: Can Anyone Explain this code piece by piece?
Function that creates a DataFrame with a column for Cluster Number
def pd_centers(featuresUsed, centers):
colNames = list(featuresUsed)
colNames.append('prediction')
# Zip with a column called 'prediction' (index)
Z = [np.append(A, index) for index, A in... |
H: How to write a LSTM model with 3 dimensional X_train and Y_trains?
I have X_train and Y_train with [2160,24,3] dimensions. But when I try a simple LSTM like this:
model = Sequential()
model.add(LSTM(24 , return_sequences = True))
model.add(Dropout(dp))
It gives me this error message:
ValueError: Error when check... |
H: Pattern Recognition - Kernel Density estimators 2.5.1
Please refer page 122-123 of Pattern recognition and Machine Learning - Bishop. A few equations:
Density estimate: $$ p(\mathbf{x}) = \frac{K}{NV} \tag{2.246}$$ where
$K$ = #points in: $N$ regions of volume $V$ each.
Kernel function: Number $K$ of points fall... |
H: Machine learning for object states
I have the objects pool with histories of their states, where each transition from one state to another takes some time, ex:
$$
object\ 1: A \overset{1s}{\rightarrow} B \overset{2s}{\rightarrow} C
\\
object\ 2: D \overset{3s}{\rightarrow} E \overset{4s}{\rightarrow} F
$$
The pool ... |
H: Is there a real life meaning about KMeans error?
I am trying to understand the meaning of error in sklearn KMeans.
In the context of house pricing prediction, the error linear regression could be considered as the money difference per square foot.
Is there a real life meaning about KMeans error?
AI: The K-means Err... |
H: how to run my python code on google cloud without fear of getting disconnected - an absolute beginner?
I have been trying to use python 3 for text mining on a 650 MB csv file, which my computer was not powerful enough to do. My second solution was to reach out to google cloud. I have set up my VMs and my jupyter no... |
H: Confused with the derivation of the gradient descent update rule
I have been going over some theory for gradient descent. The source I am looking at said that the change in cost can be described by the following equation:
$$∆C=∇C∙∆w$$
where $∇C$ is the gradient vector/vector derivative of the cost function (MSE) an... |
H: Average reward reinforcement learning
What is the bellman equation update rule for the average reward reinforcement learning? I searched a few articles, but could not find any practical answer.
AI: In general, the average reward setting replaces the discounted setting in continuous tasks. It relies on there being a... |
H: How does personalized machine learning work?
Many services (such as Netflix, Amazon, and Google Search, Apple's Siri) are said to get better by learning the 'habits' of their users. As I understand, they somehow create a customized machine learning model for each individual because a generic model would not work we... |
H: How do I convert a summation equation to a vector equation (backpropagation)?
$$a_j^l=\sigma(\sum_{k} {w_j}_k^l {a}_k^{l-1}+b_j^l)$$
$$a^l=\sigma( w^l {a}^{l-1}+b^l)$$
In a resource I have been reading, the above equations describe the activation of a neurone. They have the same function (I agree) but the first is ... |
H: Class Imbalance Problem even after Balancing Data
So I am training a neural network on a binary classification problem and my Case (1) and Controls (0) were imbalanced so I oversampled my cases so that that the training set was 0.5053 made up of controls. I did not balance my test set which was 0.562 controls. In t... |
H: Predict Customer Next Purchase with Sequence
Suppose I buy products: [1,2,3,4]
Another customer X bought: [2,3]
Most probably customer X next purchase will be: 4
Sequence is very important in my problem
I tried association analysis using R, but it don't take under consideration the sequence
Please advise what algo... |
H: How to standardize my data (Univariate Time Series Forecasting using Keras LSTM)?
Let be $X = (X_1,...., X_n)$ an univariate time serie. I would like to know how to standardize my data when I split it into train and test data. Let me explain you how I tranform $X$ so that I can fit an LSTM neural net. From $X$ I ma... |
H: In Naive Bayes classifier how is P(sneezing,builder|flu) = P(sneezing|flu)P(builder|flu)?
Please refer to this literature:
According to Naive Bayes classification algorithm:
$P(sneezing,builder|flu) = P(sneezing|flu)P(builder|flu) $
where sneezing and builder are independent events.
How do they arrive at the above ... |
H: How to transform time series data to apply supervised learning algorithms to it?
Apologies in advance for what may be a very basic question.
I have a dataset consisting of marketing calls to different clients, which include the timestamp for the call.
My goal is to train a model to predict if whether a customer wil... |
H: How do I get similarity with autoencoders
I have build an autoencoder to extract from a very high dimensional (200 dimensions) space a smaller but significant representation (16 dimensions).
Now that I have these "encoded" vectors, I would like to compute some kind of similarity score, or clustering.
I am not sure ... |
H: Is this the way to obtain the same individuals for x_test and y_test?
x_train, x_test = train_test_split(x, test_size = 0.3,random_state=250)
y_train, y_test = train_test_split(y, test_size = 0.3,random_state=250)
Is this the way to coincide the same individuals in x_test and y_test as well as x_train and y_train?... |
H: When I should use PCA?
I have a data set with 60000 rows and 32 columns. I want to use SVM (with some more constraints that make it more complicated)and I think 32 columns are too large. So I decided to use PCA. But when I load PCA, the first 20 component describe 85% of data which 20 variables still is too large I... |
H: Multiply weights after using dropout in training - PyTorch
I have a Pytorch regression model as follows:
model = nn.Sequential(nn.Linear(n_in, n_h_1),
nn.ReLU(),
nn.Dropout(p=0.1),
nn.Linear(n_h_1, n_h_2),
nn.ReLU(),
... |
H: How to measure the correlation between categorical variables and a continuous variable
I have the following list of the names of the categorical variables in my dataset:
categorical_columns = ['MSSubClass', 'MSZoning', 'LotShape', 'LandContour', 'LotConfig', 'Neighborhood', 'Condition1',
'Con... |
H: In the context of machine learning, what is the relationship between "Normalization" and "norm"
"Normalization" and "norm" are used a lot in machine learning
In statistics and applications of statistics, normalization can have a range of meanings.
In the simplest cases, normalization of ratings means adjusting val... |
H: Max pooling has no parameters and therefore doesn't affect the backpropagation?
I feel this is a question that has a lot of variations already posted but it doesn't exactly answer my question. I understand the concept of max pooling and also the concept of backpropagation. What i cannot understand is that why is it... |
H: Seaborn subplots massive whitespace
I'm trying to plot three heatmaps in a vertical column using Seaborns subplot method.
import seaborn as sns
initalCorr = inputX.corr()
secondaryCorr = inputX_corr.corr()
finalCorr = inputX[selected_columns_pvalue].corr()
fig, axs = plt.subplots(3, figsize = (15,45))
fig.suptitle... |
H: Is it correct to join training and validation set before inferring on test-set?
I would like to know if is a correct procedure to join training-set and validation-set together, in order to train the model on this new dataset, before making predictions on the test-set.
AI: Yes, once you optimized your model and para... |
H: Tweedie Loss for Keras
We are currently using XGBoost model with Tweedie loss for solving a regression problem which works very good, now I wanted to move our model to Keras and experience with neural networks, do anybody know how I can implement Tweedie loss for Keras? I only care about the instance when p=1.5 whi... |
H: How many parameters in a Conv2d Layer?
I was following andrew-ng coursera course on deep learning and there's a question that has been asked there which I couldn't figure out the answer for?
Suppose your input is a 300 by 300 color (RGB) image, and you use a convolutional layer with 100 filters that are each 5x5. H... |
H: Seaborn barchart for frequency of data
I'm trying to plot a bar chart to represent the frequency of two variables (Dead and Alive) in my test and training data. I want it to look like the second example described in the documentation (minus the error bars).
Currently i have
yfreq = pd.DataFrame(data = [Counter(Ytr... |
H: Inputs required for Random Forest Regressor and ways to improve performance
I am using Random Forest Regressor to predict inventory needs. The data I am using to train the model lists the total quantity picked for each product per date, but does not include rows where total quantity picked for a product on the spec... |
H: What is the Value of X in KNN and Why?
I have a dataset of 25 instances these instances are divided into 2 classes Green Circles and Blue Squares
data distributed as this graph
I want to predict X's class based on "Likelihood Weighted KNN with k =3"
In normal KNN this is easy
the nearest 3 points are 2 Blue Square... |
H: logic behind weighted KNN
I am reading about KNN
So I made another example to make things clearer
In this example (Image attached)
You can see there are in total 5 Greed Circles and 20 Blue Squares
by standard KNN (k=3) , X should be a Blue Square
This is obvious 2 Blue Squares vs 1 Green Circle.
But in weighte... |
H: How to classify a document by image?
I need an opens source solution to classify a document. I do not want to use NLP i need only to check the look and feel.
I tried OpenCV. I have a template and i need to match it.
import cv2
template = cv2.imread(template_file,0)
template = cv2.normalize(template, None, alpha=0,... |
H: Train and predict on a varying number of inputs - time based events
I have the problem where I am trying to build a model which takes in n events for a single user as input for prediction, the problem is that the number of events is not set, so for example:
A user may have performed a single event:
time - eventType... |
H: Why use different variations of Softmax in training and validation for neural networks with Pytorch?
Specifically, I'm working on a modeling project, and I see someone else's code that looks like
def forward(self, x):
x = self.fc1(x)
x = self.activation1(x)
x = self.fc2(x)
x = self.activation2(x)
... |
H: What is the hypothesis space used by this AND gate Perceptron?
Per this post
The hypothesis space used by a machine learning system is the set of
all hypotheses that might possibly be returned by it.
Per this post, the Perceptron algorithm makes prediction
$$
\begin{equation}
\hat y =
\begin{cases}
... |
H: Is there a way to get y_pred values from saved Keras model?
I have a Keras model saved in a .h5 file. As you know there are a y_pred and a y_act that confusion matrix creates from, at run time, it's easy to get y_pred values but my model is saved and now I need the y_pred values from that saved model. Is there a wa... |
H: Two different pytorch networks, combined loss, back propagation and optimizer step
So here is my network architecture as shown in below image.
I’ve two separate networks and loss_1 and loss_2 are coming from two separate nn.Modules networks and final_loss = loss_1 + loss_2.
Still only one final_loss.backward() woul... |
H: PicklingError: Could not serialize object: TypeError: can't pickle fasttext_pybind.fasttext objects
I built a fasttext classification model in order to do sentiment analysis for facebook comments (using pyspark 2.4.1 on windows). When I use the prediction model function to predict the class of a sentence, the resul... |
H: 'tuple' object is not callable while reshaping training data using python
I have data csv file with three inputs names temperature, humidity, wind. Here I want to predict temperature value in every 60 minute using LSTM model.
Here I write the code to reshape the train . But I got an error tuple' object is not call... |
H: Problem of finding best combination of features when desired feature is feature some_feature_A/some_feature_B
Problem is stated: we have giant csv file with one target column and rest are inputs, we don't know these features impact target but we would like to use algorithm that besides using linear and non-linear t... |
H: Visualize/analyze data before or after imputing missing values?
My understanding is that we impute missing values in order to preserve those training examples so our Machine Learning algorithms have as many training examples as possible.
To me, it would make intuitive sense to visualize/analyze the data before impu... |
H: Pattern Recognition, Bishop - (Linear) Discriminant Functions 4.1
Please refer "Pattern Recognition and Machine Learning" - Bishop, page 182.
I am struggling to visualize the intuition behind equations 4.6 & 4.7. I am presenting my understanding of section 4.1.1 using the diagram:
Pls. Note: I have used $x_{\per... |
H: Triplet loss function for face recognition?
In the Andrew-NG coursera course on Convnets he talked about triplet loss function for one shot face recognition.
The formula given in the video is,
$$\to \small \small \small ||f(A)-f(P)||^2 \;+\;\alpha \leq\;||f(A)-f(N)||^2$$
$$\to \small \small \small D(A, P) + \alpha ... |
H: In CNN, why do we increase the number of filters in deeper Convolution layers for complex images?
I have been doing this online course Introduction to TensorFlow for AI, ML and DL. Here in one part, they were showing a CNN model for classifying human and horses. In this model, the first Conv2D layer had 16 filters,... |
H: String to Data frame column
I have 2 column in data frame, X and Y. And I have some string values stored in text, which I want to put in X, Y as shown in the example.
Example :
text=9 10 13 110 14 16
12 1 6 1 1 2
X Y
9 12
10 1
13 6
110 1
14 1
16 2
AI: If you are looking to hard-code ... |
H: 'Feature' definition
Precisely, what is a feature? Is it an attribute/property name or its value?
E.g. would features examples be "name", "adress", ...?
Or "Dorothy", "123 YellowBrick Road"??
If it is a property name, what do you call its corresponding values? ("Feature-values"?)
If it is a value, how do you call i... |
H: In Conditional Random Fields, is mandatory to use features related to following and preceeding tokens?
I am training a CRF classifier to classify document rows as a heading (1st level), heading (2nd level) or simple text.
I am using Conditional Random Fields for their ability to account sequential aspects.
Reading... |
H: Cost function - ideas
I build xgboost model for regression problem. By the default xgboost optimize $(y - y_{pred})^2$, so the RMSE will be the best eval metric to measure performance. But my task is to build the best model for evaluation metric which check if predicted value is in range $-/+10%$ of true value i.e.... |
H: Mathematical formulation of Support Vector Machines?
I'm trying to learn maths behind SVM (hard margin) but due to different forms of mathematical formulations I'm bit confused.
Assume we have two sets of points $\text{(i.e. positives, negatives)}$ one on each side of hyperplane $\pi$.
So the equation of the marg... |
H: Is there any way to use (update) a pre-trained logistic regression model for data with new set of columns?
I am building an insurance recommendation engine. I have used some variables, like demographics, and built the model. Now I have claims data.
Is there a way to include the new data without restarting the proce... |
H: Why we add a constant value column in our DataFrame sometimes?
Currently I'm learning data science and I'm in the beginners stage. I have seen many times we add a "constant" column in our data frame with all row cells of that column having value 1.
I need to know why we do so. And also what will happen if we don't ... |
H: Extract Domain related words
I am doing a research regarding on automatic text summarizing. So in order to weighting sentences I need to get words related to a particular field or domain like shown below.
Topic word - Car
Related words - engine, driver, road, break, accelerator
Is there any direct method that I c... |
H: Adding and subtract inbetween row inputs and value equal to the first column next row using pandas
Assume I have a dataset with three inputs:
x1 x2 x3
0 a b c
1 d e f
2 g h i
3 j k l
4 m n o
5 p q r
6 s t u
:
:
0,1,2,3 are times, x1, x2, x3 are inputs ... |
H: Coefficients of Linear regression for minimizing MSE
(I asked this in mathematics site, but nobody responded, it seems the whole problem is more related to data science than math.)
In a regression problem, loss function is:
$$L(a,b) = {\sum_{i=1}^n (y^i - (ax^i +b))^2})$$
In order to minimize this value, we need to... |
H: Two different cost functions for neural networks, how they can give the same result?
One is: $$J=-\frac{1}{m}\sum_{i=1}^{m}\sum_{k=1}^{K}\Big[y_{k}^{i}\log\big((h_{\theta}(x^{i}))_k\big)+(1-y_{k}^{i})\log\big(1-(h_{\theta}(x^{i}))_k\big)\Big]$$
The other one is: $$J=-\frac{1}{m}\sum_{i=1}^{m}\Big[y^{i}\log(a^{i})+(... |
H: How to automate ANOVA in Python
I am at the dimensionality reduction phase of my model. I have a list of categorical columns and I want to find the correlation between each column and my continuous SalePrice column. Below is the list of column names:
categorical_columns = ['MSSubClass', 'MSZoning', 'LotShape', 'L... |
H: How to handle large number of categories in a dataset?
I have one dataset of "Books" which contains 8 columns initially and out of which 3 of them contains text values which can be categorized. The 3 columns contains "Language-code", "Author Name" and "title" of the book. As sklearn LinearRegression don't take text... |
H: What are the exact differences between Deep Learning, Deep Neural Networks, Artificial Neural Networks and further terms?
After having read some theory I am getting a bit confused about the following terms:
Deep Learning
Deep Neural Network
Artificial Neural Network
Feedforward Neural Network
So, what seems clear... |
H: Can we use DecisionTreeClassifier of sklearn for continuous target variable?
I have a continuous target variable named "quality" which ranges from 0 to 10. Also I have 11 input variables in my dataset.
When I'm building my model using DecisionTreeClassifier() of sklearn then I'm getting a score of 60% but when I'm ... |
H: How to learn certain Maths to understand machine Learning papers?
I have done the deeplearning.ai course on deep learning. But I cannot Understand equations like
minGmaxDV(D,G)=Ex∼pdata(x)[logD(x)]+Ez∼pz(z)[log(1−D(G(z)))]
What kind of Maths am I am supposed to learn? I know Calculus basic Multivariable Calculus ... |
H: Adding Group Average Line to Bar Chart
I am trying to create a PivotChart in the form of a bar chart and I would like to add a group average line on the chart.
I have this (sample) table in my PowerPivot Data Model:
Group averages are A: 20, B: 50 and C: 80. My bar chart looks like this.
How would I do this? Do I... |
H: what does `a factor of K-fold` mean in GPU-based training?
From the book "Deep Learning and Convolutional Neural Networks for Medical Image Computing"
As we learned about the current state of research on deep learning, I
was surprised to find that other investigators had used convolutional
neural networks, one... |
H: How to get mean of column using groupby() and another condition
For the following
df = pd.DataFrame()
df['1'] = 1,2,1,2,1,2
df['2'] = 3,6,5,4,7,8
df['3'] = 1,1,1,2,2,2
I want to do
mean(df.groupby().loc[df['1']==df['3'],'2'].mean()
which doesn't work. And simply doing this :
a=df.groupby(['1','3'])['2'].mean()
... |
H: What is "spatial feature encoding"? Can anyone give a concrete example?
This book "Deep Learning and Convolutional Neural Networks for Medical Image Computing" mentioned a term spatial feature encoding
On the other hand, CNN models have been proved to have much higher
modeling capacity, compared to the previous ... |
H: better confussion matrix higher LogLoss ? Is that possible>
I have tried a 2 different versions of a gbm in a multinomial classification problem. The second model results in better confusion matrix but in worse Log Loss value (at the test sample). How is that possible.
Further are the results of the two models.
... |
H: How to normalize complex-valued data?
I'm taking the abs of all elements, compute the mean, subtract it off from the original values. I just feel that this is not correct and can change the vectors.
I'm also dividing by the standard deviation, but I'm quite confident about this, knowing that this is pure rescaling ... |
H: Find columns with numeric values, but stored as string
I need to find the columns in data frame, which has numeric values and are stored as string.
data_set = pd.DataFrame({"Number":["1","2","3","4","5"], "Char":["A","B","C","D","E"]})
data_set.dtypes
In above code, column "Number" has numeric values, but stored a... |
H: Are mainstream pre-trained models useful as discriminators?
In the context of GANs I see many papers designing new discriminator networks.
I'm curious about the usefulness of designing discriminators as modified versions of mainstream models like Inception, MobileNet, EfficientNet etc. My intuition is that the men... |
H: Does the mean/median of a set sentence embedded vectors represent anything?
Please bear with me as I am new to NLP.
I am specifically using tensorflow's universal sentence encoder: https://tfhub.dev/google/universal-sentence-encoder-large/3
I am clustering text based on the cosine similarity of the embedding produc... |
H: What is the difference between the value -99 and NaN in a data column?
I am new to data science. I was looking into some datasets and I saw some values like -99, which I discovered later that it means that there is a missing value. Does this mean the same thing as NaN? If it is the same thing, why do we use -99 ins... |
H: Which language to learn for Machine Learning?
I am currently working in BigData with Spark-Scala framework. I want to learn Machine learning from scratch.
Which language would be better to learn for machine learning, Scala or Python?
AI: I have done only a little bit of scala (spark streaming for database replicati... |
H: How should a decision tree handle an attribute that can be anything?
Say I have AttributeA that can take values A1, A2, A3, AttributeB that can take values B1, B2, B3, etc. and I know ahead of time that my classification table looks like
AttributeA | AttributeB | AttributeC | Classification
A1 | B1 | anything | Cla... |
H: What to do when the target variable does not correlate with any of the independent variable in a dataset?
I am quite new to data science. I am trying to use Logistic Regression to predict my target (either 1 or 0).
But the problem is when I use a heatmap to find the correlation between the columns and the target va... |
H: how to correct mislabeled data in training, validation and test set
In an image classification task, I know there are mislabeled data. should I remove/correct them in all training / validation / test set ?
I saw this article https://arxiv.org/pdf/2103.14749.pdf but I am not sure if I understood the result correctly... |
H: Which neural network is better?
MNIST dataset with 60 000 training samples and 10 000 test samples.
Neural network #1. Accuracy on the training set: 99.53%. Accuracy on the test set: 99.31%.
Neural network #2. Accuracy on the training set: 100.0%. Accuracy on the test set: 99.19%.
Which neural network is better if ... |
H: How to interpret .get_booster().get_score(importance_type='weight') for XGBRegressor()
I am trying to do feature selection using XGRegressor(). I am doing this because I have many features to choose from over 4,000. Once I have a set of features I have a neural network I created to use these features to predict med... |
H: Getting both results and probabilities running scikit learn random forest
I have a scikit learn RandomForestClassifier that returns 0s and 1s:
X = [ [2,1,1,1], [2,0,2,1], [3,1,1,1] , [3,1,1,1], [3,1,1,1] ]
y = [ 0, 1, 1, 1, 1 ]
rf = RandomForestClassifier(n_estimators=200, max_depth=5)
rf.fit(X, y)
X_test = [ [2,... |
H: n_jobs=-1 or n_jobs=1?
I am confused regarding the n_jobs parameter used in some models and for CV. I know it is used for parallel computing, where it includes the number of processors specified in n_jobs parameter. So if I set the value as -1, it will include all the cores and their threads for faster computation.... |
H: Is there a general rule for how many layers a NN should be based on the number of inputs?
I have a neural network that takes 1935 inputs, so I'm wondering if there is a general rule for how many layers the network should be.
Should the number of neurons be descending by a certain amount?
AI: It doesn't depend on th... |
H: Using MFCC and MFCC Delta features with a CNN
A lot of studies feed MFCCs as well as MFCC delta and double deltas directly to a CNN for audio classification. My question is, are the MFCC Deltas concatenated with the MFCC matrix? Most papers simply state they used MFCC + MFCC Delta + MFCC Double Delta and the plus s... |
H: What is the difference between Multi task learning and domain generalization
I was wondering about the differences between "multi-task learning" and "domain generalization". It seems to me that both of them are types of inductive transfer learning but I'm not sure of their differences.
AI: Domain generalization: Ai... |
H: How to classify objects from a description in natural language
My objective is to classify objects that all belong to a certain category, based on a textual description of these objects by humans. My problem is not specific to a certain category of objects, but for sake of clarity I am going to give examples as if ... |
H: What methods are there for predicting a signal?
I have a large dataset of signals (composed of time series). All time series describe the same process, but each series has a different duration (number of points). Based on these time series, I want to train some neural network, so that then I give a new time series ... |
H: Why must x and y axis be the same length?
I am getting started with visualization, but right at the start I am having a serious conceptual problem. Repeatedly, I get the error ‘x and y must be the same size’ / ‘array must be the same length’ / ‘have the same shape’. I just fundamentally don’t understand why that mu... |
H: K-Fold cross validation-How to calculate regular parameters/hyper-parameters of the algorithms
K-fold cross-validation divides the data into k bins and each time uses k-1 bins for training and 1 bin for testing. The performance is measured as the average across all the K runs err ← err + (y[i] − y_out)^2 as demons... |
H: Extra feature on test set
Suppose I convert categorical data into dummy variables with get_dummies and I get these columns in the training dataset:
x_A
x_B
x_C
0
1
0
0
0
1
1
1
0
But in the test dataset I have the following columns:
x_A
x_B
x_C
x_D
0
1
0
1
0
0
1
0
1
1
0
1
Should I cre... |
H: what is the formula used in the scale_quantile function in R?
I want to know what formula is being is in the package scale_quantile by the dynutils package. I want to check if I can achieve the same results as with manual calculations like this
# Air quality dataset
data = datasets::airquality
# Manual calculation... |
H: Using numpy to enter noise into data
I am new to data science and have to generate 200 numbers from a uniform distribution
set this as x and generate y data using x and injecting noise from the gaussian distribution y = 12x-4 + noise
My Approach:
x = numpy.random.rand(200) --> This will generate 200 numbers form... |
H: configuring axis in matplotlib
x = np.random.rand(200) and y = 12 * x - 4 + np.random.randn(200)
After ploting the (x,y) values I get the following graph in matplotlib:
How can I configure the axis so all samples are clearly visible?
AI: You could try the scatter function.
import matplotlib.pyplot as plt
import n... |
H: Run linear regression fit on 2 1D array
On doing this-
x = np.random.rand(200)
.
.
from sklearn.model_selection import train_test_split
x_train, x_test, y_train, y_test = train_test_split(x,y, test_size =0.20, random_state = 0)
reg = LinearRegression()
reg.fit(x_train,y_train)
I got the following error
... |
H: Handling conflicting cases pandas python
I have a data set where some rows are same but belong to different classes.
Example -
index
Heading 1
Heading 2
Heading 1b
Heading 2b
Class/Target
row -1
a
b
c
d
0
row -2
t
r
f
k
0
row -3
m
u
p
l
0
row -4
a
b
c
d
1
row -5
m
u
p
l
1
row -6
v
r
z
h
0
row -7... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.