Questions tagged [normalizing]

39 questions
67
votes
6 answers

What is the need for normalizing a vector?

Trying to understand vectors a bit more. What is the need for normalizing a vector? If I have a vector, N = (x, y, z) What do you actually get when you normalize it - I get the idea you have to divide x/|N| y/|N| & z/|N|. My question is, why do we…
HungryCoder
  • 1,029
  • 2
  • 10
  • 16
13
votes
4 answers

Normalizing dataset with ruby

I have a data set that ranges from 1 to 30,000 I want to normalize it, so that it becomes 0.1 to 10 What is the best method/function to do that? Would greatly appreciate it if you could give some sample code!
meow
  • 27,476
  • 33
  • 116
  • 177
9
votes
5 answers

Hierarchical tagging in SQL

I have a PHP web application which uses a MySQL database for object tagging, in which I've used the tag structure accepted as the answer to this SO question. I'd like to implement a tag hierarchy, where each tag can have a unique parent tag.…
Chris Johnson
  • 10,469
  • 4
  • 31
  • 35
9
votes
8 answers

Data structure for non-overlapping ranges within a single dimension

I need a data structure that can store non-overlapping ranges within a single dimension. The entire range of the dimension need not be completely covered. An example would be a conference room scheduler. The dimension is time. No two schedules may…
Steve Kuo
  • 61,876
  • 75
  • 195
  • 257
5
votes
10 answers

Looking for algorithm that reverses the sprintf() function output

I am working on a project that requires the parsing of log files. I am looking for a fast algorithm that would take groups messages like this: The temperature at P1 is 35F. The temperature at P1 is 40F. The temperature at P3 is 35F. Logger…
Klaus Graefensteiner
4
votes
10 answers

Dealing with "hypernormalized" data

My employer, a small office supply company, is switching suppliers and I am looking through their electronic content to come up with a robust database schema; our previous schema was pretty much just thrown together without any thought at all, and…
Wayne Molina
  • 19,158
  • 26
  • 98
  • 163
3
votes
7 answers

Address book DB schema

I need to store contact information for users. I want to present this data on the page as an hCard and downloadable as a vCard. I'd also like to be able to search the database by phone number, email, etc. What do you think is the best way to store…
palmsey
  • 5,812
  • 3
  • 37
  • 41
3
votes
4 answers

Normalizing an existing MS Access Database

I have one large access database that I need to normalize into five tables and a lookup table. I understand the theory behind normalization and have already sketched out the look of the tables but I am lost on how to transform my table to get the…
Donald
2
votes
1 answer

Weird output of MinMaxScaler

On my way through learning ML stuff I am confused by the MinMaxScaler provided by sklearn. The goal is to normalize numerical data into a range of [0, 1]. Example code: from sklearn.preprocessing import MinMaxScaler data = [[1, 2], [3, 4], [4,…
C4d
  • 3,183
  • 4
  • 29
  • 50
2
votes
1 answer

normalizing constant from kernel density in R

How can I get the normalizing constant from a non-standard distribution. Ex: x <- c(rnorm(500,10,1),rnorm(500,20,2),rnorm(500,35,1)) after using density in R dens<-density(x,n=length(x),adjust=0.4)
user2246905
  • 1,029
  • 1
  • 12
  • 31
2
votes
7 answers

Database denormalization opportunity

I'm looking for a strategy in as far as stopping the repetitive problem of branching out tables. For example as a fictitious use case, say I have a table with users that contains their name, login, password and other meta data. In this particular…
anon
1
vote
1 answer

Is the Fast Inverse Square Root Algorithm faster than C++'s standard library sqrt() function?

so recently I stumbled upon the fast inverse square root algorithm that goes like this. float inverse_rsqrt( float number ) { const float threehalfs = 1.5F; float x2 = number * 0.5F; float y = number; long i = * ( long * ) &y; i…
1
vote
0 answers

Scaling/Normalizing time series with extreme values

I am working on a convolutional GANs model for time series simulation. The time series includes the historical time-series demand (sales) data for the retail items. Comprising of different product-store items coming with different sales patterns,…
1
vote
1 answer

How to lemmatize a .txt file rather than a sentence with pywsd.utils?

I am quite new with Python that I try to learn for basic text analysis, topic modelling etc. I wrote the following code for cleaning my text file. I prefer pywsed.utils lemmatize.sentence() function to NLTK's WordNetLemmatizer() because it produces…
1
vote
0 answers

how to correct for a variable that will differ per individual

We're trying to launch a study that looks at requirement of pressers, which vasoconstrict, for ICU patients with physical interventions to raise pressure, but some of these patients are under sedation, which vasodilate. If a patient in the ICU…
ehandren
  • 23
  • 3
1
2 3