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]

MATLAB is a high-level language and interactive programming environment for numerical computation and visualization developed by MathWorks. Don’t use both the [matlab] and [octave] tags, unless the question is explicitly about the similarities or differences between the two. When using this tag, please mention the MATLAB release you're working with (e.g. R2017a).

0
votes
2answers
22 views

Linear regression incorrect prediction using Matlab

In the plot below the red crossed line is the actual curve and the crossed blue line is the predicted curve. I am using least squares for linear prediction. I have used 1:79 examples in training and ...
4
votes
1answer
190 views

Training a classifier when some of the features are unknown

I am training a classifier in Matlab with a dataset that I created. Unfortunately some of the features in the dataset were not recorded. I currently have the unknown features set as -99999. So, for ...
1
vote
0answers
36 views

Why are pandas/R/etc so common in a data scientist or analyst's workflow when one can resort to UDFs in an RDBMS?

It seems common for an analyst to have this workflow when using an RDBMS: use SQL to get a subset of data from the database, export it or use a connector, and then apply a data mining / model ...
0
votes
1answer
32 views

Advice on transitioning from Andrew Ng's Stanford Coursera Machine Learning (in MATLAB) into Python?

I'm currently finishing up Andrew Ng's Coursera course, taught in MATLAB/Octave, but I'm looking to code in Python. The course is an introduction into how some algorithms work from scratch. These ...
1
vote
1answer
30 views

Tuning C hyper parameter in Soft Margin SVM in Matlab

How to tune the C 'BoxConstraint' hyperparameter in soft margin SVM to get the best optimal value?
1
vote
2answers
21 views

Where can I find an algorithm for human activity classification using thigh and shank sensors?

I am working on a project where I initially need to classify the type of activity a subject is performing based on raw accelerometer and gyroscope data from the thigh and shank of both legs. The type ...
0
votes
0answers
11 views

Hard margin SVM in Matlab

How can I build a hard margin svm model using matlab builtin functions such as fitcsvm and fitclinear? Should I set the ...
1
vote
0answers
24 views

SVM hard and soft margins in matlab,

I am comparing the performances of several SVM models in matlab using the fitcsvm function, and I want to double check that I am using the correct syntax for hard ...
0
votes
0answers
28 views

SVM hyperparameters using Matlab's fitcsvm and OptimizeHyperparameters

I am building SVM models and will compare their performances, linear vs RBF, and I'm using OptimizeHyperparameters to get best hyperparameters C (BoxConstraints) ...
0
votes
0answers
18 views

DNN practice: errors and strange behavior

I've built a neural net for regression, with stochastic updates, for practice (shared below). It's having trouble modeling test data if more than one hidden layer is used. The test outputs are a ...
0
votes
0answers
20 views

Local Binary Patterns features using matlab 'extractLBPFeatures'

I am trying to understand the extractLBPFeatures function to extract the 59 uniform features, here is a simple code that extracts the 59 features from an image <...
0
votes
0answers
10 views

Local Binary features with unit16 images vs unit8 images

I have unit16 image dataset, and I would like to extract LBP features from it using the Matlab function extractLBPFeatures, which uses uniform LBP (59 features). ...
2
votes
2answers
62 views

Setting best SVM hyper parameters

I have a non linear data set, and I am using SVM (RBF kernel) to build a classification model, but not sure how to set the best hyperparameters of the SVM, C and gamma in Matlab ...
0
votes
0answers
9 views

Local Binary Patterns features

I have a dataset of images that differ in sizes, and when I extract the local binary pattern (uniform local binary 59 feature) from them I get several features as zeros, is it acceptable as features, ...
1
vote
0answers
21 views

Plotting ROC curve in cross validation using Matlab perfcurve

I have the following code for a binary classifying using SVM, and 10 cross-validation, ...
5
votes
2answers
86 views

Data Visualization with multiple dimension, and linear separability

I have a dataset of two classes with several features, how can I visualise such data using Matlab to decide if it is linear separable or not?
2
votes
2answers
33 views

Convolution Neural Networks on microcontrollers

I am wondering if an already trained convolutional neural network can be represented as a formula just like a perceptron can ($x_1w_1 + x_2w_2 + \ldots =$ PREDICTION). I know that the formula could be ...
0
votes
0answers
23 views

Improve precision of binary classification - SVM in Matlab

I'm using linear SVM for binary classification. The classes were imbalanced so I decided to under-sample the majority class. I have 34 features and the data includes 2000 observations. I think now ...
2
votes
1answer
33 views

Is splitting the data set into train and validation applicable in unsupervised learning?

I am having a tough time implementing all the steps of setting up support vector machine (SVM) for unsupervised learning. My data set is labelled but for educational purposes I am learning ...
1
vote
0answers
20 views

How to create a timeline graph ( Date / time series) in MATLAB?

The data file is attached https://ufile.io/ttwi8.How may I create a timeline graph where my y-axis is the number of cases(Demand and prediction as sjown in attached graph) and my x axis is increasing ...
2
votes
0answers
67 views

How to implement Moving window with LSTM for Time Series Prediction?

I am trying to implement a moving window in my dataset. The window size=14 (for instance).After implemntinf sliding window how to prepare inputs and outputs for netwok? ...
1
vote
1answer
59 views

How do I use LSTM Networks for time-series classification problems?

I have 2 binary outputs (1 and 0) with time series data. The dataset order is shown in the image..Can anyone suggest me how to handle this problem with LSTM? Particularly in MATLAB or Python. Thanks ...
1
vote
0answers
68 views

convert 16-Bit to 8-Bit images

I am using matlab, and I need to convert 16-bit images to 8-bit images (tif extention) , and I used image = im2uint8(16bit_img); image = uint8(16bit_img/256); ...
0
votes
0answers
12 views

Open image saved using python in matlab

I want to save the image created by matplotlib in python in .fig format to open it for editing in matlab. But it seems that savefig(.) in matplotlib does not support .fig for saving. How can I save ...
1
vote
0answers
85 views

Training a convolutional neural network for image denoising in Matlab

first time posting in this stack exchange. I am currently trying to train CNNs to remove Poisson noise from images. The software I am using is Matlab 2018b, however the results I am getting are poor. ...
2
votes
2answers
64 views

Accuracy differs between MATLAB and scikit-learn for a decision tree

Is there any possibility to vary the accuracy of same data set in matlab and jupyter notebook by using python code ? For same data set, at first I applied it in matlab and get 96% accuracy for ...
0
votes
1answer
30 views

Fuzzy rule based system: Should rules contain all inputs and outputs?

I am trying to design an FRBS using Matlab fuzzy tool box. The fuzzy system will be used to predict player's type based on the inputs and a set of rules defined by experts. I have 6 inputs and 4 ...
1
vote
2answers
44 views

Poor performance for unbalanced dataset

Consider a dataset A which has examples for training in a binary classification problem. I have used SVM and applied the weighted method (in MATLAB) since the ...
0
votes
1answer
171 views

How can I increase the number of iterations per epoch in MATLAB?

I am training a deep learning network using MATLAB and would like to increase the number of iterations per epoch. Using trainingOptions ...
1
vote
0answers
40 views

Using machine learning algorithm to approximate a matrix? [closed]

I don't know if this is a good question. I would like to use machine learning to approximate a matrix. For example, a very simple one as \begin{align} A=\begin{pmatrix} 1 &0 \\ 0& 2 \end{...
1
vote
1answer
50 views

How can I create a pixel labelled image for Semantic Segmentation?

I am following the Semantic Segmentation Examples tutorial by MathWorks. I understand that I can load pixel labeled images ...
0
votes
1answer
74 views

Graphically Speaking - how weight vector is perpendicular to hyperplane

why-is-weight-vector-orthogonal-to-decision-plane-in-neural-networks vector-orthogonal-to-hyperplane I wanted to visualize this by drawing a 3d plane where and the weight vector. By definition of ...
0
votes
1answer
29 views

Higher dimension data visualization in Matlab/Octave

I am working on sparse recovery for a classification task. I use Pine hyperspectral dataset which is a freely available dataset and this image contains 200 Dimension (Depth/channels/bands). In ...
1
vote
2answers
98 views

why nobody uses matlab [closed]

I wonder why most people now don't use matlab. I guess the reason is matlab is not free, so companies don't want to use it, then interviewees don't use it, then schools don't encourage it, then nobody ...
0
votes
1answer
37 views

Why the results from Matlab curve fitting function differ when using custom equation?

I'm using Matlab's curve fitting app, When I select Power fitting it returns values which perfectly describe the data but when I use the custom equation and enter ax^b as the equation it returns very ...
1
vote
1answer
35 views

Problem with calculating error rate for KNN

I am trying to validate the accuracy of my KNN algorithm for the movie rating prediction. I have $2$ vectors: $Y$ - with the real ratings, $Y'$ - with predicted ones. When I calculate Standard ...
1
vote
0answers
42 views

How can I combine images for Matlab deep learning?

I have a data set which consist a number of instances (of two-three different classes), and for each instance I have a handful of monochrome images. This handful of images have different resolutions (...
2
votes
0answers
274 views

Matlab: setting static iterations per epoch in a CNN

I'm building a convolutional neural network using Matlab's neural network toolbox. I have code designed to cross-train the network with different data sets, using the previous network's layers in ...
1
vote
1answer
244 views

Poor performance of SVM after training for rare events

I found out that Weighted SVM is a classification approach to handle class imbalance problem. My data set is highly imbalanced with rare event (minority class, labeled as 1) and the majority class (...
0
votes
1answer
77 views

Confusion regarding classification accuracy calculation and result

The total number of data points for which the following result is obtained = 1500. Out of which, I have 1473 labelled as 0 and the remaining 27 as ...
2
votes
3answers
365 views

Which Format is Faster, Matlab (.mat) or NumPy (.npy)?

I am working on a deep learning problem to detect cancer in images of size 250 x 250. I have hardware limitations and I have been running out of memory. I decided to convert my images to Matlab ...
1
vote
2answers
253 views

Terminology - cross-validation, testing and validation set for classification task

Confusion1) If k=10 then does this mean that 90% is for training and 10% for testing? So always we have k% for testing? ...
0
votes
2answers
113 views

Is ensemble learning using different classifier combination another name for Boosting?

For implementation I am following the Matlab code for AdaBoost. Based on my understanding, AdaBoost uses weak classifiers known as base classifiers and creates several instances of it. For example, a ...
4
votes
2answers
251 views

How to make sense of confusion matrix

Consider a binary classification problem with 0 labels denoting normal and 1 abnormal or rare. The number of instances with <...
3
votes
2answers
466 views

Why training and validation similar loss curves lead to poor performance

I am training a binary classification neural network model using matlab the graph that I got using 20 neurons in hidden layer is given below. the confusion matrix and graph between cross entropy vs ...
0
votes
2answers
156 views

How to quantify the performance of the classifier (multi-class SVM) using the test data?

I am working on a traffic sign recognition code in MATLAB using Belgian Traffic Sign Dataset. The dataset consists of training data and test data. I resized the given images and extracted HOG ...
2
votes
1answer
78 views

i need a characters /letters dataset for matlab

My final project is number plate recognition.i need a data set of A-Z characters and 0-9 letters. i donot find it on any website give me a data set or send me a link. i have to make a neural network ...
1
vote
1answer
292 views

What is difference between detrend and normalization? [closed]

matlab function detrend subtracts the mean from data. If data contains several data columns, detrend treats each data column separately. One of the normalization technique is subtracting the mean ...
0
votes
1answer
249 views

Linear Regression of Sine wave using Gradient descent Not working [closed]

I am writing an algorithm to fit a sine wave. I want to have 4 parameters ( amplitude, frequency, phase & centre position). When I tried to program with all 4 parameters I wasn't able to find a ...
1
vote
0answers
215 views

How to identify ARIMA model parameters

I am trying to build ARIMA model, I have 144 terms in my standardized time series, which represent residuals form original time series. This residuals, on which I would like to build ARIMA model, are ...