Questions tagged [frequency]

The rate at which a thing occurs or is found.

The rate at which a thing occurs or is found.

2858 questions
8
votes
3 answers

How to organize list by frequency of occurrence and alphabetically (in case of a tie) while eliminating duplicates?

Basically if given a list: data = ["apple", "pear", "cherry", "apple", "pear", "apple", "banana"] I'm trying to make a function that returns a list like this: ["apple", "pear", "banana", "cherry"] I'm trying to make the return list ordered by most…
user2180683
  • 209
  • 3
  • 6
8
votes
10 answers

Finding Frequency of numbers in a given group of numbers

Suppose we have a vector/array in C++ and we wish to count which of these N elements has maximum repetitive occurrences and output the highest count. Which algorithm is best suited for this job. example: int a = { 2, 456, 34, 3456, 2, 435, 2, 456,…
Abhishek Mishra
  • 5,002
  • 8
  • 36
  • 38
8
votes
4 answers

Mysql count frequency

I've checked similar questions but it didnt help in my precise question. So, my table goes like this: id age 1 30 2 36 3 30 4 52 5 52 6 30 7 36 etc.. I need to count the frequency of ages: age freq 30 2 36 3 52 2 How can I grab this…
noneJavaScript
  • 835
  • 3
  • 21
  • 41
7
votes
2 answers

How do I count the number of times any two given values occur together in a row in R?

I am working with a data frame like this, with the ID column indicating a specific publication: ID AuthorA AuthorB AuthorC 1 Chris Lee Jill 2 Jill Tom Lee 3 Tom Chris Lee 4 Lee Jill NA 5 Jill Chris NA I…
Frowin Becker
  • 203
  • 1
  • 4
7
votes
3 answers

Create a variable capturing the most frequent occurence by group

Define: df1 <-data.frame( id=c(rep(1,3),rep(2,3)), v1=as.character(c("a","b","b",rep("c",3))) ) s.t. > df1 id v1 1 1 a 2 1 b 3 1 b 4 2 c 5 2 c 6 2 c I want to create a third variable freq that contains the most frequent observation…
Fred
  • 1,833
  • 3
  • 24
  • 29
7
votes
2 answers

How to properly scale frequency axis in Fast Fourier Transform?

I am trying some sample code taking the FFT of a simple sinusoidal function. Below is the code import numpy as np from matplotlib import pyplot as plt N = 1024 limit = 10 x = np.linspace(-limit, limit, N) dx = x[1] - x[0] y = np.sin(2 * np.pi * 5 *…
MasterYoda
  • 220
  • 3
  • 10
7
votes
0 answers

Sound frequency detection

I am currently attempting to create a sound frequency detection application on the iPhone. I have been informed that the algorithm I need for frequency detection of a single frequency is the goertzel algorithm. However, I am currently struggling to…
123hal321
  • 2,080
  • 4
  • 24
  • 25
7
votes
1 answer

How to generate sounds by frequency in Java?

How do I generate my own sound by frequency in Java? I can play WAV files or MIDI files, but now I don't need this. I want to create a simple guitar program, and I want to play chords with this program. But I don't know how to make the sounds to the…
victorio
  • 6,224
  • 24
  • 77
  • 113
7
votes
2 answers

How to collapse rows of a frequency table to add their counts in a new column?

I have a dataframe with sample classifications: Seq_ID Family Father Mother Sex Role Type 1 SSC02219 11000. 0 0 Male Father Parent 2 SSC02217 11000. 0 …
Carmen Sandoval
  • 2,266
  • 5
  • 30
  • 46
7
votes
1 answer

What is the most reliable way to determine the CPU clock frequency of Android phones?

I found some references and ended up with the following code: String[] args = { "/system/bin/cat", "/sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_max_freq" }; cmd = new ProcessBuilder(args); Process process = cmd.start(); InputStream in =…
Bob
  • 111
  • 1
  • 4
7
votes
6 answers

Does gensim.corpora.Dictionary have term frequency saved?

Does gensim.corpora.Dictionary have term frequency saved? From gensim.corpora.Dictionary, it's possible to get the document frequency of the words (i.e. how many document did a particular word occur in): from nltk.corpus import brown from…
alvas
  • 115,346
  • 109
  • 446
  • 738
7
votes
3 answers

How to change clock frequency in Android?

I'm a new to software development on Android. I want to make an application like SetCPU that can manipulate CPU frequency in Android. But I couldn't find some related APIs or materials. I want to know following two things sincerely. Are there APIs…
zephyrus
  • 71
  • 1
  • 1
  • 2
7
votes
1 answer

What range sound frequency can be measured from iPhone's microphone?

I want to know the range of frequency that the iPhone's microphone can listen and can we play the least frequency sound recorded by iPhone's microphone?
rockey
  • 638
  • 4
  • 16
  • 34
7
votes
1 answer

calculate the frequency in R

Here is my data > a [1] Male Male Female Male Male Male Female Female Male Male Female Male Male Male [15] Female Female Female Male Female Male Female Male Male Female Male Male Female Male [29] Male Male …
lightsnail
  • 788
  • 5
  • 20
7
votes
1 answer

Counting number of instances of a condition per row R

I have a large file with the first column being IDs, and the remaining 1304 columns being genotypes like below. rsID sample1 sample2 sample3...sample1304 abcd aa bb nc nc efgh nc nc nc nc…
nchimato
  • 443
  • 4
  • 8
  • 18