Hot answers tagged

144 votes

How to draw Deep learning network architecture diagrams?

I recently found this online tool that produces publication-ready NN-architecture schematics. It is called NN-SVG and made by Alex Lenail. You can easily export these to use in, say, LaTeX for ...
Pablo Rivas's user avatar
  • 1,541
90 votes

How to draw Deep learning network architecture diagrams?

I wrote some latex code to draw Deep networks for one of my reports. You can find it here: https://github.com/HarisIqbal88/PlotNeuralNet With this, you can draw networks like these:
Haris Iqbal's user avatar
28 votes

Can you explain the difference between SVC and LinearSVC in scikit-learn?

A regular SVM with default values uses a radial basis function as the SVM kernel. This is basically a Gaussian kernel aka bell-curve. Meaning that the no man's land between different classes is ...
AN6U5's user avatar
  • 6,808
27 votes
Accepted

How to calculate mAP for detection task for the PASCAL VOC Challenge?

To answer your questions: Yes your approach is right Of A, B and C the right answer is B. The explanation is the following: In order to calculate Mean Average Precision (mAP) in the context of ...
Dani Mesejo's user avatar
  • 2,226
22 votes

SVM using scikit learn runs endlessly and never completes execution

SVM solves an optimization problem of quadratic order. I do not have anything to add that has not been said here. I just want to post a link the sklearn page about SVC which clarifies what is going on:...
Ricardo Cruz's user avatar
  • 3,410
19 votes

How to draw Deep learning network architecture diagrams?

For automated drawing, see How do you visualize neural network architectures?, https://softwarerecs.stackexchange.com/q/28169/903 and https://softwarerecs.stackexchange.com/q/47841/903 For manual ...
Franck Dernoncourt's user avatar
15 votes

How to calculate mAP for detection task for the PASCAL VOC Challenge?

There is a nice and detailed explanation with an easy to use code on my Github. Certainly it will help you guys.
Rafael Padilla's user avatar
14 votes
Accepted

Kernel trick explanation

The kernel trick is based on some concepts: you have a dataset, e.g. two classes of 2D data, represented on a cartesian plane. It is not linearly separable, so for example a SVM could not find a line ...
dante's user avatar
  • 256
12 votes
Accepted

What kinds of learning problems are suitable for Support Vector Machines?

SVM can be used for classification (distinguishing between several groups or classes) and regression (obtaining a mathematical model to predict something). They can be applied to both linear and non ...
hoaphumanoid's user avatar
11 votes
Accepted

Where exactly does $\geq 1$ come from in SVMs optimization problem constraint?

First problem: Minimizing $\|w\|$ or $\|w\|^2$: It is correct that one wants to maximize the margin. This is actually done by maximizing $\frac{2}{\|w\|}$. This would be the "correct" way of doing it,...
hbaderts's user avatar
  • 1,114
11 votes

In SVM Algorithm, why vector w is orthogonal to the separating hyperplane?

Let the decision boundary be defined as $w^Tx + b = 0$. Consider the points $x_a$ and $x_b$, which lie on the decision boundary. This gives us two equations: \begin{equation} w^Tx_a + b = 0 \\ w^Tx_b +...
adityagaydhani's user avatar
11 votes

Are Support Vector Machines still considered "state of the art" in their niche?

In answering this question one significant distinction to make is whether we are talking about linear Support Vector Machines or non-linear, that is, kernelized Support Vector Machines. Linear SVMs ...
albarji's user avatar
  • 241
11 votes

SVM using scikit learn runs endlessly and never completes execution

Did you include scaling in your pre-processing step? I had this issue when running my SVM. My dataset is ~780,000 samples (row) with 20 features (col). My training set is ~235k samples. It turns out ...
Shelby Matlock's user avatar
11 votes
Accepted

The differences between SVM and Logistic Regression

If you use logistic regression and the cross-entropy cost function, it's shape is convex and there will be a single minimum. But during optimization, you may find ...
Green Falcon's user avatar
10 votes
Accepted

how to make sklearn pipeline using custom model?

Implementing a custom transformer is simple. You have to implement the fit and transform methods like below. Since your ANN is already trained (right?) the fit method has to do nothing, just return ...
stmax's user avatar
  • 1,637
9 votes

Is there any domain where Spiking Neural Networks outperform other algorithms (non-spiking)?

My answer comes from experience more than from experiments or benchmarks published. As far as I know, Spiking Neural Networks do not outperform other algorithms in any task. There have been advances ...
wacax's user avatar
  • 3,390
9 votes
Accepted

Predicting probability from scikit-learn SVC decision_function with decision_function_shape='ovo'

Your link has sufficient resources, so let's go through: When you call decision_function(), you get the output from each of the pairwise classifiers (n*(n-1)/2 numbers total). See pages 127 and 128 ...
SmallChess's user avatar
  • 3,520
8 votes
Accepted

What's the relationship between an SVM and hinge loss?

They are both discriminative models, yes. The logistic regression loss function is conceptually a function of all points. Correctly classified points add very little to the loss function, adding more ...
Sean Owen's user avatar
  • 6,595
8 votes

SVM using scikit learn runs endlessly and never completes execution

With such a huge dataset I think you'd be better off using a neural network, deep learning, random forest (they are surprisingly good), etc. As mentioned in earlier replies, the time taken is ...
Leela Prabhu's user avatar
8 votes

How to draw Deep learning network architecture diagrams?

Netron viewer is the best tool to draw your model architecture I suppose you have a pretrained model stored in .h5 file.
oussama aatiq's user avatar
8 votes

Outlier detection by unsupervised algorithm: Fraud Detection

First of all, start with a subset until you know what you are doing. There is no use in waiting for hours for a result that doesn't work, or to run out of memory, or to optimize, just to find out it ...
Has QUIT--Anony-Mousse's user avatar
8 votes
Accepted

SVM on sparse data

Support Vector Machines (SVM) represent data examples as points in space and tries to create a mapping with a wide as possible gap between the separate categories. The data examples closest to the gap ...
Brian Spiering's user avatar
8 votes
Accepted

Multi-class classification v.s. Binary classification

The greater the number of output nodes the higher complexity you will add to your model. This means that given a fixed amount of data, a greater number of output nodes will lead to poorer results. I ...
JahKnows's user avatar
  • 8,856
8 votes
Accepted

How do I interpret the length-scale parameter of the RBF kernel?

Even though I am more familiar with the use of RBF kernel with Gaussian Processes, I think your intuition is correct since, generally speaking, a larger lengthscale means that the learnt function ...
Pablo Lopez Alvarez's user avatar
7 votes

Improving accuracy of Text Classification

First of all good job done in processing the data and coming up with your base model. I would suggest few things that you can try: Improve your model my adding bigrams and tri-grams as features. Try ...
Santanu_Pattanayak's user avatar
7 votes

Passing a custom kernel with more than two arguments into `svm.SVC` in scikit-learn

That can be done with a closure like: Code: ...
Stephen Rauch's user avatar
  • 1,783
7 votes
Accepted

How to use k-means outputs (extracted features) as SVM inputs?

'Prediction' of k-means algorithm for each observation is just the corresponding centroid. So you can take vector of predicted centroids and use it as a categorical feature (maybe one-hot encoded). ...
David Dale's user avatar
  • 1,541
7 votes
Accepted

SVDD vs once Class SVM

Support vector data description (SVDD) finds the smallest hypersphere that contains all samples, except for some outliers. One-class SVM (OC-SVM) separates the inliers from the outliers by finding a ...
timleathart's user avatar
  • 3,930
7 votes
Accepted

How to plot mean_test score and mean_train score of GridSearchCV

You could visualize them as a heatmap. For example you could use the C values as the rows, the gamma values as the columns and ...
Mnng's user avatar
  • 311
7 votes
Accepted

What is the difference between SVM and logistic regression?

Both logistic regression and SVM are linear models under the hood, and both implement a linear classification rule: $$f_{\mathbf{w},b}(\mathbf{x}) = \mathrm{sign}(\mathbf{w}^T \mathbf{x} + b)$$ Note ...
KT.'s user avatar
  • 2,121

Only top scored, non community-wiki answers of a minimum length are eligible