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
17
votes
1 answer

Most Efficient way to calculate Frequency of values in a Python list?

I am looking for a fast and efficient way to calculate the frequency of list items in python: list = ['a','b','a','b', ......] I want a frequency counter which would give me an output like this: [ ('a', 10),('b', 8) ...] The items should be…
demos
  • 2,630
  • 11
  • 35
  • 51
16
votes
2 answers

Split multiple delimiters in Java

How I can split the sentences with respect to the delimiters in the string and count the frequency of words ? String delimiters = "\t,;.?!-:@[](){}_*/"; My text file…
Büşra GÜL
  • 323
  • 1
  • 4
  • 16
16
votes
2 answers

Determine frequency from signal data in MATLAB

I have data from a sensor and I need to find the frequency of it. It looks like fft() seems to be the way to go, but the MATLAB docs only show how to get a graph of the frequencies, I don't know what to do from there. Here's what my data looks…
edc1591
  • 10,146
  • 6
  • 40
  • 63
15
votes
5 answers

How to get the most frequent row in table

How to get the most frequent row in a DataFrame? For example, if I have the following table: col_1 col_2 col_3 0 1 1 A 1 1 0 A 2 0 1 A 3 1 1 A 4 1 0 B 5 1 0 …
Mykola Zotko
  • 15,583
  • 3
  • 71
  • 73
15
votes
10 answers

C# Why are timer frequencies extremely off?

Both System.Timers.Timer and System.Threading.Timer fire at intervals that are considerable different from the requested ones. For example: new System.Timers.Timer(1000d / 20); yields a timer that fires 16 times per second, not 20. To be sure that…
Daniel Wolf
  • 12,855
  • 13
  • 54
  • 80
15
votes
3 answers

Explain the FFT to me

I want to take audio PCM data and find peaks in it. Specifically, I want to return the frequency and time at which a peak occurs. My understanding of this is that I have to take the PCM data and dump it into an array, setting it as the real values…
user143879
  • 257
  • 3
  • 8
14
votes
4 answers

Divide each each cell of large matrix by sum of its row

I have a site by species matrix. The dimensions are 375 x 360. Each value represents the frequency of a species in samples of that site. I am trying to convert this matrix from frequencies to relative abundances at each site. I've tried a few ways…
Zane.Lazare
  • 155
  • 1
  • 1
  • 4
14
votes
1 answer

Swift FFT - Complex split issue

I am trying to perform FFT on an audio file to find frequency using the Accelerate framework. I have adapted code (probably wrong) from this question: Spectrogram from AVAudioPCMBuffer using Accelerate framework in Swift Although, the magnitudes…
user98874
  • 189
  • 1
  • 10
14
votes
7 answers

Determining Word Frequency of Specific Terms

I'm a non-computer science student doing a history thesis that involves determining the frequency of specific terms in a number of texts and then plotting these frequencies over time to determine changes and trends. While I have figured out how to…
fdsayre
  • 175
  • 2
  • 11
14
votes
2 answers

Calculating Entropy

I've tried for several hours to calculate the Entropy and I know I'm missing something. Hopefully someone here can give me an idea! EDIT: I think my formula is wrong! CODE: info <- function(CLASS.FREQ){ freq.class <- CLASS.FREQ info <-…
Codex
  • 193
  • 1
  • 2
  • 8
14
votes
4 answers

Python - Finding word frequencies of list of words in text file

I am trying to speed up my project to count word frequencies. I have 360+ text files, and I need to get the total number of words and the number of times each word from another list of words appears. I know how to do this with a single text file.…
CoS
  • 143
  • 1
  • 1
  • 7
14
votes
1 answer

iOS FFT Accerelate.framework draw spectrum during playback

UPDATE 2016-03-15 Please take a look at this project: https://github.com/ooper-shlab/aurioTouch2.0-Swift. It has been ported to Swift and contains every answer you're looking for, if you cam here. I did a lot of research and learned a lot about FFT…
benjamin.ludwig
  • 1,575
  • 18
  • 28
13
votes
3 answers

Plot weighted frequency matrix

This question is related to two different questions I have asked previously: 1) Reproduce frequency matrix plot 2) Add 95% confidence limits to cumulative plot I wish to reproduce this plot in R: I have got this far, using the code beneath the…
Frank Zafka
  • 829
  • 9
  • 30
13
votes
6 answers

Count appearances of a value until it changes to another value

I have the following DataFrame: df = pd.DataFrame([10, 10, 23, 23, 9, 9, 9, 10, 10, 10, 10, 12], columns=['values']) I want to calculate the frequency of each value, but not an overall count - the count of each value until it changes to another…
Sascha
  • 687
  • 1
  • 8
  • 22
13
votes
1 answer

Elasticsearch word frequency and relations

I am wondering if it is possible at all to get the top ten most frequent words in an Elasticsearch field across an entire index or alias. Here is what I'm trying to do: I am indexing text documents extracted from various document types (Word,…
Zaid Amir
  • 4,727
  • 6
  • 52
  • 101