Questions tagged [sample]

Small part of or a selection from something (code, logs, data etc.), intended to show the structure, style, or nature of the whole.

In statistics, the process of generating random samples is called .

In and some other programming languages, the function sample performs random sampling of a set with or without replacement.

1672 questions
0
votes
1 answer

Why alaw generates noise and ulaw does not

I use socket to send some voice data to another PC and I encoded my data before sending it using ALAW with this "setup": AudioFormat.Encoding.ALAW, 8000.0f // sampleRate 8, // sampleSizeInBits 1, // channels 1, …
Catalin Bcn
  • 13
  • 1
  • 6
0
votes
3 answers

SAS how to get random selection by group randomly split into multiple groups

I have a simple data set of customers (about 40,000k) It looks like: customerid, group, other_variable a,blue,y b,blue,x c,blue,z d,green,y e,green,d f,green,r g,green,e I want to randomly select for each group, Y amounts of customers (along with…
shecode
  • 1,716
  • 6
  • 32
  • 50
0
votes
1 answer

How To Compare two dates, SQL/SSIS Task

So I've got a task that takes a random 20% of a table's results from the previous day to use as a control group. These results are put into a table, and then shoved into a .CSV file for use by the employer. That works perfectly well. The only…
Alex
  • 1
  • 4
0
votes
2 answers

Obtaining a number of (x, y) points that correspond to specific values of concentration that are chosen at random

I need to generate a matrix of points given that they meet the condition that at these (x,y) points concentration is greater than 10. Note that I first run a code that gives me concentration at each location c(x,y,t), and now from the results of the…
s2015
  • 37
  • 3
0
votes
1 answer

How to randomly assign each observation to one of two labels

I have a data matrix in R as follows: [,1] [,2] [1,] 1 4 [2,] 1 3 [3,] 0 4 [4,] 5 1 [5,] 6 2 [6,] 4 0 Now I want to randomly assign each observation to either 1 or 0 cluster. Basically I am trying to do…
Baktaawar
  • 7,086
  • 24
  • 81
  • 149
0
votes
1 answer

R creating multiple samples with non integer sample size

I’m using R and I have a vector, lets just say vec <- c(1:10). I need to sample from this vector about 1000 times, however the sample size that I need to use is a noninteger, for example 3.66666. Obviously when I input this in, it rounds down to 3.…
ricks.k
  • 101
  • 3
0
votes
1 answer

TSQL - 50:50 split of records in group by

I am trying to find a way to split records for a test. I have a couple of columns that I need to consider like mailsegment and pack. I am wanting to get an even (or as close to) split at both levels and rolled up. I have seen this solution (How do I…
Dan
  • 2,625
  • 5
  • 27
  • 42
0
votes
0 answers

Quickblox iOS location sample error

I'm trying to start a new project with QuickBlox framework. I created an account and an application on the admin panel and got my precious keys. Then I downloaded the iOS-location-sample code and just replaced in AppDelegate.m these lines with my…
user4617743
0
votes
1 answer

The length of sample string doesn't match the value I have given it

I have created this silly cipher but I can't get it to work properly.. Let's say i type a single letter "h" and let the script do it's work. I've created a method which counts the length of an string (in this case hash value) minus a the value of…
0
votes
1 answer

Select not matching rows from two matrices

How can I select rows from one matrix which don't match the rows from another matrix. The case is that I want to train a model over a sample of my data and validate over the other part of the data. Thanks in advance.
0
votes
1 answer

Randomly choosing multiple groups of "strings" in R

So basically I would like to randomly sort ~200 unique ID "numbers" (strings consisting of a letter and a number e.g. x1, x2, y40, ... ) into multiple groups of 5 without replication and with some ID "numbers" not being assigned a group. For a…
CarinaDSLR
  • 17
  • 1
  • 8
0
votes
1 answer

Using libpcap to library sample dump files

Using libpcap has proven really easy, but, speed is always an issue with giant (in an arbitrary sense) .pcap dumps. Are there any common practices for just sampling a dump? Perhaps something that effectively says "Read every fifth frame" as the pcap…
Aage Torleif
  • 1,907
  • 1
  • 20
  • 37
0
votes
1 answer

a sample to create intro for android application

I want to find a sample of an intro for my application.to be more clear I want something like intro of SoundCloud application or linkedin (when you first time run them you see some pages like slideshows with texts and animations) but I don't know…
Majid Hojati
  • 1,740
  • 4
  • 29
  • 61
0
votes
1 answer

DirectX sample code c++

I'm looking for source code (as I bet a lot of others are / were and will) for learning purposes of DirectX. I would like something similar to the vs2013 Graphics Editor when dealing with *.fbx files, etc. Every thing I find is old and outdated, or…
Tony Teveris
  • 165
  • 10
0
votes
1 answer

Trouble installing sample portio driver from winDDK

I am currently trying to build an application, that will talk to the super IO chip using port IO. As part of that, I am trying to develop a kernel-mode windows driver that I can contact, and which will do the IO for me. I have therefore downloaded…
Boris
  • 5,094
  • 4
  • 45
  • 71