Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update ParseCSVLine.cs to fix the behaviour in case of null or missing values #118

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

asad4237
Copy link

@asad4237 asad4237 commented May 3, 2018

I am using this program in stock prediction and this is a common scenario in the stock prediction that value of some new ticker may be unknown.

First case: first expected value is missing in CSV, In this case, the first line was having less number of columns than the current line.
//Sample data
//0,0,
//0,1,1
//1,0,1
//1,1,0
Second case: after first-line expected value is missing in CSV, In this case, the previous line was having more columns than current line, So reset the array so that it does not carry the old values into missing column.
//Sample data
//0,0,0
//0,1,
//1,0,1
//1,1,0

This fix is going to treat missing values as "?" which is a native representation of missing values in Encog Framework

I am using this program in stock prediction and this is a common scenario in the stock prediction that value of some new ticker may be unknown.

First case: first expected value is missing in CSV, In this case, the first line was having less number of columns than the current line.
//Sample data
//0,0,
//0,1,1
//1,0,1
//1,1,0
Second case: after first-line expected value is missing in CSV, In this case, the previous line was having more columns than current line, So reset the array so that it does not carry the old values into missing column.
//Sample data
//0,0,0
//0,1,
//1,0,1
//1,1,0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant