question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

How normalize discrete data input

See original GitHub issue

Hi! How can I read readme.md, I need normalize input data to range 0…1. That’s ok with linear data, same as color, price, year, etc.

But look at my example: Form in my web page have one field with radio button, like:

  • credit;
  • debet;
  • personal card;
  • other.

How I need provide this data for train nn? Ok, I can send something like:

  • type__credit: 0;
  • type__debet: 0;
  • type__personal_card: 1;
  • type__other: 0.

But this make more input columns, even for many fields/values, as i showed. Then I thought, what will be if I will make this:

  • for «credit»: type=0.25;
  • for «debet»: type=0.5;
  • for «personal card»: type=0.75;
  • for «other»: type=1.

That’s save me from many columns, but will be work?

And what I can do for checkboxes? Maybe:

var typeForInputBrain = 0;

typeForInputBrain += (typeFromForm.indexOf('credit')) ? 0.04 : 0;
typeForInputBrain += (typeFromForm.indexOf('debet')) ? 0.08 : 0;
typeForInputBrain += (typeFromForm.indexOf('personal card')) ? 0.16 : 0;
typeForInputBrain += (typeFromForm.indexOf('other')) ? 0.32 : 0;

Then even if all values was checked input value save in range between 0 to 1. Ok? Is it working method, or, that’s way require something new activation function?

P.S. Sorry for my english 😃

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:34 (22 by maintainers)

github_iconTop GitHub Comments

1reaction
robertleeplummerjrcommented, Dec 25, 2016

Forgot to mention: I’m working to try and make it so you could use numbers, or really whatever type of data on either side of the input or output.

0reactions
mubaidrcommented, Jul 18, 2018

If you still need help, feel free to re-open this issue.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to normalize a data set that contains both continuous and ...
First off, you don't normalize a data set, you normalize a variable. Second, you can't normalize categorical variables, which are the ones that...
Read more >
How to normalize mixed continuous/discrete features for DNN?
Each sample of my data set has 600+ values. Majority of them are continuous but a handful or columns are symbolic / discrete...
Read more >
Normalize discrete numerical variables | Data Science and ...
Hi! If your numerical feature takes only a few discrete values its better to treat them as a categorical feature. The only thing...
Read more >
Handout Normalizing Variables
This is a discussion of how to normalize (aka standardize) variables. The point of normalization is to make variables comparable to each other....
Read more >
How to Normalize and Standardize Your Machine Learning ...
Data normalization is the process of rescaling one or more attributes to the range of 0 to 1. This means that the largest...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found