in reply to Gender prediction
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Gender Prediction
by moritz (Cardinal) on Jun 06, 2007 at 09:50 UTC | |
If there is anything in particular that you don't like about the code, tell us so. And tell us what you tried, and why you are not satisfied with it. | [reply] |
|
Re^2: Gender Prediction
by robot_tourist (Hermit) on Jun 06, 2007 at 10:55 UTC | |
My untrained eye can't spot any particular code smells. Though I have learned to use fetchrow_hashref, because it means you don't have to care about the order of the returned data, you just use the field names, but it does force you to learn about references. The code you have is already pretty concise and would only need a little more formatting to be more readable. Also note that if you don't need the code you commented out, get rid of it or it will accumulate. I know it's something I have to fix in my own code. The odd #print ... is OK, but if you have version control you don't need big blocks of code commented out 'just in case you need to uncomment it one day' How can you feel when you're made of steel? I am made of steel. I am the Robot Tourist. | [reply] |
|
Re^2: Gender Prediction
by Limbic~Region (Chancellor) on Jun 06, 2007 at 12:23 UTC | |
I understand what it is like to want to write code that is above my head. While the intent of Re: Refactoring a large script is not applicable to your situation, a lot of the advice inside is. The following is unfinished code that should give you some help as well.
Cheers - L~R | [reply] [d/l] |
|
Re^2: Gender Prediction
by lima1 (Curate) on Jun 06, 2007 at 09:58 UTC | |
Yeah, like everybody else here. But what are exactly your problems? I suggest compiling a training/test set and then thinking why your algorithm does not classify some addresses correctly. If you then have a real question, ask the question here and don't forget to post the relevant data. | [reply] |
|
Re^2: Gender Prediction
by samsonp81 (Initiate) on Jun 08, 2007 at 11:07 UTC | |
| [reply] [d/l] |