Loading (large) text file, "error: load: unable to dermine file format of 'trainsetdata.txt'

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Loading (large) text file, "error: load: unable to dermine file format of 'trainsetdata.txt'

Jean-Etienne Verrot
Hello,

I'm trying to load the enclosed dataset in octave, and get the following error:
error: load: unable to dermine file format of 'trainsetdata.txt'
which I am unable to debug.

Can you help me?


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave

trainsetdata.txt (1M) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: Loading (large) text file, "error: load: unable to dermine file format of 'trainsetdata.txt'

Doug Stewart-4


On Wed, Dec 6, 2017 at 8:30 AM, Jean-Etienne Verrot <[hidden email]> wrote:
Hello,

I'm trying to load the enclosed dataset in octave, and get the following error:
error: load: unable to dermine file format of 'trainsetdata.txt'
which I am unable to debug.

Can you help me?



line 207 has NA   #value!



152 367 1 50 2.05941337 0.084131208
168 52 1 100 2.993693694 0.082894363
175 226 1 100 3.552941176 0.077666667
176 226 1 100 3.606896552 0.115757576
192 236 1 NA #VALUE! 0.5625
196 242 1 45 1.989 0.02797619
5 37 1 200 5.157006082 2.019500876
21 273 1 100 3.631901579 1.106476668
24 264 1 200 5.887022049 2.214904401


--
DAS


_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Loading (large) text file, "error: load: unable to dermine file format of 'trainsetdata.txt'

Jean-Etienne Verrot
Thanks Doug, that solves it.

2017-12-06 18:02 GMT+01:00 Doug Stewart <[hidden email]>:


On Wed, Dec 6, 2017 at 8:30 AM, Jean-Etienne Verrot <[hidden email]> wrote:
Hello,

I'm trying to load the enclosed dataset in octave, and get the following error:
error: load: unable to dermine file format of 'trainsetdata.txt'
which I am unable to debug.

Can you help me?



line 207 has NA   #value!



152 367 1 50 2.05941337 0.084131208
168 52 1 100 2.993693694 0.082894363
175 226 1 100 3.552941176 0.077666667
176 226 1 100 3.606896552 <a href="tel:01%2015%2075%2075%2076" value="+33115757576" target="_blank">0.115757576
192 236 1 NA #VALUE! 0.5625
196 242 1 45 1.989 0.02797619
5 37 1 200 5.157006082 2.019500876
21 273 1 100 3.631901579 1.106476668
24 264 1 200 5.887022049 2.214904401


--
DAS



_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Loading (large) text file, "error: load: unable to dermine file format of 'trainsetdata.txt'

Przemek Klosowski-7
In reply to this post by Doug Stewart-4
On 12/06/2017 12:02 PM, Doug Stewart wrote:
On Wed, Dec 6, 2017 at 8:30 AM, Jean-Etienne Verrot <[hidden email]> wrote:

I'm trying to load the enclosed dataset in octave, and get the following error:
error: load: unable to dermine file format of 'trainsetdata.txt'

line 207 has NA   #value!
...
192 236 1 NA #VALUE! 0.5625
This of course doesn't work, but Octave can read some non-numerical values like
NaN (not-a-number) and  Inf. so you can replace NA with NAN and #VALUE! with either NaN or Inf, whichever seems more appropriate:

perl -i.bak -pe 's/NA/NaN/g; s/#VALUE!/Inf/g' trainsetdata.txt

It's also possible to use textread() which is not fazed by non-numeric values, but it requires more decisions and processing of the result.

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave
Reply | Threaded
Open this post in threaded view
|

Re: Loading (large) text file, "error: load: unable to dermine file format of 'trainsetdata.txt'

Siki Zoltan
In reply to this post by Jean-Etienne Verrot
Dear Jean-Etienne,

I could read your file on Ubuntu, OCtave 4.0.0 using dlmread function.
Your text file is in Unix format (\n at the line end). IFyou use it on
Windows, it may cause problem.

Zoltan

On Wed, 6 Dec 2017, Jean-Etienne Verrot wrote:

> Hello,
>
> I'm trying to load the enclosed dataset in octave, and get the following
> error:
> error: load: unable to dermine file format of 'trainsetdata.txt'
> which I am unable to debug.
>
> Can you help me?
>

_______________________________________________
Help-octave mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/help-octave