Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [matlab]

High-level language and interactive programming environment for numerical computing developed by MathWorks.

0
votes
0answers
7 views

Cost function increases dramatically at first then starts decreasing

I am training a simple linear regression algorithm using stochastic gradient descent. When plotting cost (MSE) vs number of iterations I get a plot which looks very strange: What would be the ...
0
votes
0answers
13 views

Using canonical correlation analysis with leave one out prediction

I am trying to use canonical correlation to predict a set of held out x variables from a multivariable set of X and Y data. In this particular case I am only interested in X. In the real data X is a ...
-1
votes
0answers
19 views

How do you normalize an array of test scores in MATLAB without using loops? [closed]

Write a function called normalizeGrades that receives a row array of test scores of arbitrary length and positive values, and produces two outputs: A row array array containing the grades normalized ...
1
vote
0answers
15 views

Sum of two dependent random variables with copula

I'm trying to calculate sum of 2 random variables by using Copula Theory in R or Matlab. However, I have very limited knowledge about probability. Actually I read a lot of theoretical information ...
0
votes
0answers
8 views

Denoising brownian noise type signal (piecewise continuous noise) at known time samples [closed]

Posting here because I didn't have much success in dsp. Hopefully some of your skillsets might be more valuable in this situation. Original question here: ORIGINAL QUESTION I have a signal which at ...
0
votes
0answers
19 views

How do you actually use PCA in MATLAB?

I'm trying to use the pca command in MATLAB for dimensionality reduction. I know that [U, V] = pca(X) will yield the principal components in U and the scores in V,...
0
votes
0answers
3 views

RusBoost (MATLAB and imblearn) & data preprocessing

I have a question about the differences between the MATLAB implementation of RusBoost and the implementation in the imbalanced-learn python package. Using RusBoost in MATLAB with a deep tree and ...
0
votes
0answers
6 views

The default output of Matlab fitcsvm function for SVM classifier

I would like to know the default model of 'fitcsvm' function, does it considered soft linear model? if so, how can I build a hard margin SVM model in matlab?
0
votes
0answers
25 views

Gaussian Process predictive gradient with GPML

Given a Gaussian Process $f(x) = \mathcal{GP}\big( m(x), k(x,x') \big)$ with $x\in\mathbb{R}^d$, I would like to calculate $\mathbb{E}\left[ \frac{\partial f}{\partial x_i} \right]$; that is, the $i^\...
0
votes
1answer
20 views

CrossValidation in ElasticNet Lambda Parameter

Generally, 10-fold CV is used to find the best $\lambda$ (the shrinkage parameter, not the trade-off between L1 and L2 norm $\alpha$ - see https://stats.stackexchange.com/a/64278/185237) in an elastic ...
0
votes
0answers
10 views

cross validation methods in matlab

while i was working on a binary classification problem using SVM, I found two ways of crossvalidation and I don't know which works best? first way using crossvalind...
1
vote
0answers
24 views

Full (approximated) posterior covariance matrix - GPML toolbox

I am trying to implement the paper "Streaming Sparse Gaussian Process Approximations" by - Thang D. Bui, Cuong V. Nguyen, Richard E. Turner in matlab. As a start, I create a sparse GP using the GPML ...
0
votes
0answers
10 views

what does the DeltaCriterionDecisionSplit and NumPredictorSplit in CompactTreeBagger (Matlab)means?

when I try to use CompactTreeBagger in Matlab, I do not know what does the DeltaCriterionDecisionSplit and NumPredictorSplit means. Even though I search the offical guidence https://ww2.mathworks.cn/...
2
votes
1answer
56 views

Dealing with imbalanced data-set and cross-validation

I have a data set of brain tumours, 700 malignant, and 225 benign. And I want to build a classification model using SVM, to classify the tumours types based on the data I have. My first question, is ...
1
vote
1answer
18 views

Is it a good idea to do Cross-Validation for LASSO with a small sample size?

I have a dataset consist of 40 rows and 15 terms as variables. I need to develope a "prediction model" based on LASSO classification. Thus, I want know the best significant terms with their ...
0
votes
0answers
18 views

How does Cross Validation work in Matlab

I am doing some research on Lasso classification method. I have a 40x15 dataset and I want to develop a binomial equation without dividing data into train and test set (because of small sample size). ...
0
votes
0answers
19 views

How exactly Matlab performs the Lasso classification?

I am doing some research on Lasso classification method. I have a 40x15 dataset and I want to develop a binomial equation without dividing data into train and test set (because of small sample size). ...
0
votes
1answer
41 views

Why Lasso classification results changes in Matlab?

I am doing lasso classification using Lassoglm command in Matlab. I have a problem and that is, every time I run the program for my dataset I get different variables to have non-zero coefficients. I ...
2
votes
1answer
37 views

Perplexity formula in the t-SNE paper vs. in the implementation

The perplexity formula in the official paper of t-SNE IS NOT the same as in its implementation. In the implementation (MATLAB): ...
0
votes
0answers
11 views

Implement repeated measure model Matlab

How to use the fitrm() fuction for the repeated measures class in a within subject experiment? The example (Specify the Within-Subject Hypothesis) confuses me, as I do not have a between subject ...
0
votes
0answers
9 views

Multivarite ARCH, which model should I simulate

I am trying to simulate the following model in MATLAB if this helps: I set the k matrix to all 1's and the a matrix is going to be various values. How could I simulate this in MATLAB. I know I ...
0
votes
0answers
18 views

I am getting 0 percent accuracy when using 3-fold cross validation

I want to train a CNN that will be k-fold cross-validated. for that, I have divided my signature data set in three equal part. using the two parts training is happening and from the remaining part, ...
0
votes
0answers
12 views

chi square distribution as a function of other variables

I'm minimizing $\chi^2$ between some data and a function. The expression $\chi^2 = \sum\frac{1}{\sigma_i^2}(y_i-f(A,B))^2$ happens to be analytically solvable, so I have a value for the minimum $\chi^...
0
votes
0answers
19 views

Can anyone help me with step by step procedure in MATLAB for missing data imputation using Singular Value Decomposition (SVD [duplicate]

I need step by step procedure for imputing data using SVD in Matlab. Please provide resources if any !
1
vote
1answer
95 views

How to interpret PCA coefficients to reduce dimension

I have read about similar questions. I have data which has 68 columns and about 800 samples. The 68. column is the output the rest 67 is the input variables. I want to reduce the size of my input ...
1
vote
0answers
25 views

How can I determine, in what extent the fit to experimental data is good in Matlab?

I have experimental spectrum in which y-axis is intensity values, and x-axis is frequency values. Int - array of experimental intensities (y-axis). w - array of frequencies (x-axis). I know the view ...
3
votes
1answer
29 views

Quantifying a manifold folding unto itself

I have a dataset of ~7k scattered points in 3D which represents a manifold that may or may not "fold unto itself". Here's an example where this does happen (look at the top-right yellow triangles): ...
3
votes
0answers
85 views

How to train CNN for noise removal from images using Matlab [closed]

I am currently working on a project of mine where I want to use Convolutional neural networks for noise removal from images. I am talking about removing Poisson type of noise. The software that I am ...
0
votes
0answers
43 views

interprete and calculate Area Under the Curve of classifier in Matlab using perfcurve?

I hope that somebody could help me with the following question. I would like to calculate the Area Under the Curve (AUC) of a classifier (Linear Discrimiant Analyses). To do this, I am using the ...
0
votes
0answers
50 views

Compute log-likelihood from sum of squares?

I have fit a 2D Gaussian to a surface in Matlab and need to compute the log-likelihood of this fit. Can One use the sum of squares between the Gaussian model and the actual surface to compute the log-...
0
votes
0answers
28 views

FAVAR estimation Boivin et. al.(2009)

Boivin et. al. (2009) following the paradigm of BBE(2005) manages to decompose the fluctuations of each series into common and series specific components and study shocks into these components ? Do ...
0
votes
0answers
18 views

About the power spectrum and confidence upper limit

For now, I have a coupled system with 5 variables and use the Runge-Kutta method to integrate. ...
0
votes
0answers
19 views

Why LIBSVM provides incorrect accuracy when I am using it with '-b 1'?

I a beginner and trying to explore the libsvm library in MATLAB. I am giving exactly the same data for training and testing using,...
0
votes
0answers
41 views

Statistical test for binned proportion data in JMP / MATLAB

I have been trying to determine the proper statistical test for comparing binned proportional data between groups. My data set is individual subjects (4-5 per group) with 76-165 cells per individual. ...
0
votes
0answers
53 views

Naive Bayes where posterior almost always equals prior (in MATLAB)

I have trained a naive Bayes classifier in MATLAB using fitcnb (description link) and 11 variables, seven of which are numeric (normal) and four of which are categorical ("mvmn" distribution name). I ...
0
votes
0answers
13 views

Bayesian network (learn_struct_mwst)

I want to modeling a network with bayesian network. for finding the order i want to use learn_struct_mwst from nbt toolbox in matlab. can anybody help me to use this function? The code that i write ...
0
votes
0answers
23 views

possible to identify (2 or more) phases (left/right step) with SVM?

I am new to the field of machine learning and I am trying to create a tool which is able to identify if a left or a right step is performed on a wearable sensor which consists out of 3 sensors (...
1
vote
2answers
131 views

Distribution fitted well but kolmogorov -smirnov test not showing right results? Am I doing it right?

I want to do Kolmogorov -Smirnov test to see whether my data follows a particular distribution or not? When I fitted my data to lognormal distribution it fitted well. But When I am doing ks test, it ...
0
votes
0answers
17 views

Fluctuation in mean squared error

I am minimizing mean square error to find vector $f$, with some constraints, and my objective function is \begin{equation} E = f^{T}(R_{aa}-R_{ya}^{T}R_{yy}^{-1}R_{ya}^{})f^{} \end{equation} where $...
0
votes
0answers
22 views

Explain the results of the 2-sample Kolmogorov-Smirnov test for two random Gaussian sets of numbers

Suppose I have two sets of random numbers drawn from the Gaussian distribution, $\mathbf{r_1}$ and $\mathbf{r_2}$. I then do a 2-sample Kolmogorov-Smirnov test (KS test) between the two to determine ...
0
votes
0answers
149 views

Trying to understand the Kolmogorov-Smirnov test in MATLAB

I have two sets of data, $\mathbf{d_1}$ and $\mathbf{d_2}$ which I want to test to see if they are drawn from the same distribution using the two-sample KS test in MATLAB. My understanding of the KS ...
1
vote
0answers
36 views

How to understand the results of nonlinear mixed-effects regression model

I have some data, obtained from 4 different groups. Each repeat is some 4 parametric sigmoid. I need to fit the data to sigmoidal function and answer the question, whether sigmoids are different ...
0
votes
0answers
25 views

How to obtain the 1D radial correlation function from the 2D ACF

The two-point correlation function Z2 is defined as the probability that two points separated by a distance r will both lie in ...
0
votes
1answer
40 views

Algorithmic or structural limitations of space-filling Latin hypercube sampling

I'm new to Latin hypercube sampling, and am trying to understand if the somewhat odd sampling that results from the Matlab function lhsdesign is a limitation of the ...
0
votes
0answers
92 views

Logistic regression with negative weights in Matlab

I want to apply a logistic regression to a set of data where observations have been assigned weights depending on their "distance" from {0,1}. Most of the observations have weights within [0,1] range, ...
2
votes
1answer
63 views

Backpropagation in a logarithmic layer of a regression NN

A "logarithmic neuron" is defined as follows [1]: Which for inputs $\left\{ {{x_1},...,{x_n}} \right\}$ yields an output of $z=\prod\limits_{i = 1..n} {x_i^{{w_i}}}$ (in MATLAB, the activation ...
2
votes
0answers
104 views

Robust Regression in MATLAB's robustfit: what is the optimal weight function to tackle heteroskedasticity?

I'm currently performing a linear regression analysis and encountered a fair amount of heteroskedasticity. Increases in predicted values go along with decreases in residual variance. Otherwise, the ...
0
votes
0answers
20 views

How to calculate image similarity between 2 images using DTV?

I try to implement Differential total variation (DTV) as described in (Wu, Y. et al 2017) or (Li, Y. et al 2015). (Wu, Y. et al 2017) describe DTV as following My DTV Matlab function is ...
0
votes
1answer
70 views

Tukey-Kramer or Nemenyi following Friedman

I previously asked a question here after discovering an option by MATLAB to run Tukey-Kramer for multiple comparison multcompare following Friedman test and many ...
2
votes
0answers
57 views

Why Linear Discriminant analysis in MATLAB and R are producing different results

I am applying manova and lda to my data 12 samples (6 groups with 2 samples in each) and 6 measurements. I used lda form MAS5 package in R and different LDA functions in MATLAB. They all gave me ...