# Questions tagged [algorithms]

An unambiguous list of computational steps involved in finding a solution to a class of problems.

737 questions
1k views

73 views

### Computing gradient w.r.t action, ReLU transfer

Foreword : I am new to machine learning and to this community, thank you in advance for your help. I am trying to implement this paper from Deepmind Continuous control for deep reinforcement ...
96 views

### Identify categorical versus continuous variables in Tree based models

$\newcommand{\R}{\mathbb{R}}$ In the context of the implementation of tree based models, suppose that a predictor space $X \in \R^n$ is under a partition process of the algorithm recursive binary ...
271 views

### Efficient KNN implementation which allows inserts

Suppose I have multi-dimensional datasets, which have many vectors as data. I am writing an algorithm which needs to do k nearest neighbour searches for all those vectors - classical KNN. However, ...
296 views

### How does R calculate the acf() function as quickly as it does?

I noticed that R computes the acf(data,n) in order $O(n)$ time, not $O(n^2)$, so it cannot compute it brute force using double for loops. How does R calculate it ...
59 views

### Why W is transposed in the final form of multiplicative updates of NMF - $H^*=H * \frac{W^T\frac{V}{WH}}{W^T 1}$

For NMF using Kullback-Liebler divergence \begin{equation*} d_{\mathrm{KL}} (\mathbf{V}\ \vert\vert \mathbf{WH})\stackrel{\hbox{cst.}}{\hbox{=}} \sum_{ij}-V_{ij}\log\sum_{k}{(WH)_{ij}} + \sum_{ij}\...
2k views

### Batch reinforcement learning: Algorithm example

I have been reading the Reinforcement learning: An Introduction by Sutton and Barto (2012) and I have come across the batch learning method. Unfortunately, this method is not very well described in ...
130 views

### Grouping large groups into smaller groups while keeping people together

Let's say we have a grouping of people as such: ...
41 views

### Which Machine Learning Algorithm to Look into?

I have tried googling and couldn't find much of relevance so I have come here to ask. In essence, I want to know which machine algorithm can be used to (well, to some extent) detect repeating ...
37 views

### Number of possible permutations for a Weighted Kendall Tau Measure

The Kendall-Tau distance can measure distance between rankings. If we would like to measure the number of possible combinations that arises for a particular Kendall-Tau distance, it can be calculated ...
855 views

### Training data has categorical target variable, but I want to get numeric target variable for new samples

I hope I am asking the question to the right section of StackExchange. I have data which consists of 5 independent variables, and 1 dependent (target) variable. The independent variables are numeric, ...
53 views

### How to regularize parameters across a 2D array

I'm attempting to fit a parameter (which will be a 2D array) to an array of data which corresponds to spatial locations (i.e. longitude/latitude). The parameter can vary from point to point but I want ...
1k views

### How to use predicted features in prediction?

I have ratings data. My ratings data contains some technical features like the Originator (Channel), the exact day & hour of the broadcast, duration of the program etc. and, obviously, the label, ...
53 views

### Physical meaning behind the choice of the proposal distribution in Markov Chain Monte Carlo (MCMC) methods

Let us consider the conventions on names used in the theoretical derivation of Metropolis-Hastings Monte Carlo as outlined here, for the sake of common nomenclature. What we are building is a step-...
38 views

### Algorithm to cluster chart type

So, I have more than 20,000 entities. Each entities has their own data point (time series). Let say entities A1 to A20000. A1 has data point from year 1 to year 60. A2 has data point from year 5 to 60,...
111 views

### PCA when # of features larger than # of samples? [duplicate]

I'm using this code that adopts PCA for domain adaptation. I have some questions regarding how it handles the situation when the # of features is larger than the # of samples. Here is the snippet of ...
27 views

In software development, unit testing is (basically) executing an algorithm with a fixed input and test if the output is as expected. Example : "test that MyFactorial(4) returns 24" where "MyFactorial"...
173 views

46 views

### Is there an easy algorithm for generating a random distribution within a range but skewed toward the ends?

Is there an easy algorithm for generating a random distribution within a range but skewed toward the ends? I guess I am looking for some random distribution $x$ that is parameterized with some ...
860 views

### Back propagation and and various cost functions

I want to understand and extract a codeable back propagation algorithm. I'm mostly pure ignorant coder and my math skills are very weak. And that what I want to go further with is an extendable ...
157 views

### Statistical analysis to test algorithm robustness

I'm testing the robustness of an image processing algorithm to measure certain feature of images. The output of the algorithm is simple: 1 if the feature is found, 0 if the feature is not found. An ...
73 views

### Machine learning algorithms “from the book” [closed]

The prolific combinatorialist Paul Erdős used to say that God keeps the most elegant proof of each theorem in "The Book". This inspired the following attempt to capture what some of the book might ...
487 views

### Clara algorithm

Here is an algorithm for clustering that calls Clara. I did not understand the final step. I mean step 3, 4. For i ¼ 1 to 5, repeat the following steps: Draw a sample of 40+2k objects randomly from ...
61 views

### machine learning on data with lots of fluctuation

I have CSV files that contains data of Cache performance on a source with different workloads for a particular time period ! For each time interval data is recorded , It includes columns like ReadHits ...
55 views

### How can I rate the difficulty of a question in an adaptive learning platform?

I'm working on an adaptive learning platform with some friends for a project that helps students to prepare their university admission test. We provide different kind of practice sessions and we have ...
73 views

### An efficient algorithm for sliding mean deviation

I'm searching for a computationally efficient algorithm to calculate the sliding mean deviation from sample $x_a$ to sample $x_b$ belonging to a large set $x_0, x_1 ... x_n$ with the condition that $a$...
2k views

### Classification and mixed categorical and numeric variables

I've been working a little with weka and so far I haven't made my own database to apply a classifier but I've tried to look at the already existing files and from what I've seen there is absolutely no ...
2k views

### what is the “learning” that takes place in Naive Bayes?

As I recall algorithms like nearest neighbor don't build a model based on training data and then apply that model to test data. It just takes each new instance and compares it to all the data to find ...
128 views

### what are mixed variables in data mining?

I read that neural networks, SVM and neuro-fuzzy don't support "mixed variables." So what are those exactly? Does it refer to mixed types (numeric and non-numeric)? And if so, does that mean the ...
33 views

### How to improve algorithm for determining binge usage on a service?

For a side project I am trying to determine if users in a dataset are either "binge" users or not. I have a dataset of user log data, where each row is a user event. Right now my algorithm is ...
829 views

### Policy and value iteration algorithm convergence conditions

Policy and value iteration algorithms can be used to solve Markov decision process problems. I have a hard time understanding to necessary conditions for convergence. If the optimal policy does not ...