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
1answer
13 views

Identifying a distribution

I am trying to understand what sort of distribution is produced by the following code. Using the following Matlab code we can generate a distribution (normalized such that the sum of the set is equal ...
0
votes
0answers
14 views

SVM on small dataset: no difference in loss value after feature selection and small lambda

I am running an SVM on a very small dataset of 56 items, 20 features and 4 classes. I want to know which features are the most important for classification, and how they interact (no future real ...
1
vote
0answers
14 views

MATLAB imageInputLayer vs sequenceInputLayer [on hold]

I have two networks: layers = [ ... sequenceInputLayer(250) fullyConnectedLayer(100) fullyConnectedLayer(1) regressionLayer]; and ...
0
votes
0answers
20 views

Correlated samples from t copula

I want to generate correlated samples from t copula for some data. If I cannot estimate linear correlation parameters and degrees of freedom from copulafit, can I ...
1
vote
1answer
31 views

Implementation of Shanken (1992) Adjustement for Fama MacBeth Asset Pricing Tests

I am trying to implement an unconditional asset pricing test according to the Fama & MacBeth (1973) method. The calculation of the factor-loadings as average of monthly cross-sectional regressions ...
-1
votes
0answers
8 views

Implementation of Expectation - Maximisation Algorithm

I am trying to implement expectation maximisation algorithm for a multivariate Bernoulli model applied to the following file of binary digits: http://www.gatsby.ucl.ac.uk/teaching/courses/ml1-2017/...
0
votes
0answers
5 views

Why 'sequentialfs' of MATLAB stops before the optimum feature subset is selected?

I am using "sequentialfs" of MATLAB to select features from 271 features for 871 subjects over 2 classes. I used the backward sequential function. I noticed the features selected after using the ...
3
votes
2answers
47 views

Matlab Regenerating figures: Simulating Brownian Motion via Random Walks

I'm trying to understand the relation between discrete-time random walk process and continuous-time wiener process. I'm reading this lectures and to understand concepts and proofs I need to ...
1
vote
1answer
36 views

Re-scaling of exponentially distributed random numbers

I am trying to generate $M$ random numbers which are exponentially distributed and whose sum adds up to $N$ (for simplicity, $N=1$). I found that the generated numbers are initially exponentially ...
0
votes
0answers
29 views

Estimation of NegEntropy

I am trying to evaluate the different ICA algorithms. To do that, one of the measure which I use, is to estimate the non-gaussianity using NegEntropy. I am trying to find a formula/function which can ...
0
votes
0answers
6 views

How to calculate accuracy of Mamdani fuzzy inference system?

I have make a Mamdani fuzzy system and know I want to test my 25% test data in that in MatLab, Firstly, I made c4.5 decision tree based on 75% of data then I extract the rules from them, and I import ...
0
votes
0answers
8 views

MLE standard errors: complex from optimizing negative loglikelihood using fminunc

Does anyone know what goes wrong when fminunc in matlab returns a hessian of which the square root of the diagonal of the inverse hessian provides complex numbers? The complex numbers arise due to ...
0
votes
0answers
10 views

What is Supremal/Infimal Convolution

I'm currently reading a paper which mentions supremal and infimal convolutions. As I understood, they are upper and lower bounds for a joint distribution. One of the formulas in that paper is as ...
0
votes
1answer
24 views

Convolution of two dependent distributions in MATLAB

Assume that I have two discrete random variables $X$ and $Y$. $X ∈ \{1,3,3,5,7,7,7,9,9,9,9,9\}$ and $Y ∈ \{5,5,9,9,10,12,13\}$ Where their empirical CDFs are given as: $F_x(1) = 0.0833, F_x(3) = ...
1
vote
0answers
15 views

How to find groups inside the dataset (test for bi-multimodality)

I have non-normally distributed dataset, a record of a parameter, e. g. 50 subjects reacted to stimulation, (9 periods of time in total). So I have a matrix of 50x9 numbers, 9 medians for each time-...
0
votes
2answers
34 views

Should feature normalization be done for training , test set and target variables together? [duplicate]

Consider a matrix X where the columns are the attributes and each row is an example. There is no order of occurrence of the examples. The target variables are ...
0
votes
1answer
32 views

How do you find the most probable state path given an observed sequence with infinite emissions values in MATLAB?

I have created code to output observed values of a Hidden Markov Model. I see that 'hmmviterbi' would give you the most probable state sequence given an observed sequence, transmission matrix, and ...
0
votes
0answers
37 views

How to choose the right forecast method for variable 'X' when I have some available forecast for variable 'Y' with historical data of X and Y?

I have yearly historical data for variables 'X' and 'Y'. Say the time frame is 't'. In addition to available historical data, I also have the forecast data of variable 'Y' for t+1. My aim is to ...
2
votes
0answers
40 views

Statistical significance of parameters in nonlinear model

I have historical data for mineral production in a specified region, from 1972 to 2014. I fitted the data to a model following a bell shape, in order to estimate the peak year and production. The ...
0
votes
0answers
27 views

SVM one class outlier detection/classifier with Matlab

I have several independent time series (a small sample is in the end of the question) and I am trying to find the outliers using SVM. I have used this to find the outliers ...
1
vote
1answer
31 views

Standardize betas in logistic regression

I want to compare beta weights across different logistic regression models (one per subject) and therefore standardize beta weights. I would use t-scores and then test t-scores from different models ...
1
vote
1answer
30 views

How do you verify independence of a pair of uniform random variables in MATLAB? [closed]

If $A$ is a subset of $R$ and $X$ is a random variable. I have two variables $X_1$ and $X_2$. $I$ being $1$ if $X$ in subset $A$, and $0$ if not in $A$. Let $U$~$U(0;1)$ and determine if this pair ...
0
votes
0answers
26 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
vote
0answers
28 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
21 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
18 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
19 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
33 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
38 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
16 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
40 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
13 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
121 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
25 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
28 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
24 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
83 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
53 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
13 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
11 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
38 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
24 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
48 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
196 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
31 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
32 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
148 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
77 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
52 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
37 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 ...