Skip to main content
added 169 characters in body
Source Link
kjo
  • 11.9k
  • 1
  • 35
  • 92

to create a file at pathToTSV that is comparable to the input file I used for the EXAMPLE below. Also, the following definition of the types parameter (which the EXAMPLE refers to) is consistent with the sample input file.

types = Table["Real", {400}]; 

to create a file at pathToTSV that is comparable to the input file I used for the EXAMPLE below.

to create a file at pathToTSV that is comparable to the input file I used for the EXAMPLE below. Also, the following definition of the types parameter (which the EXAMPLE refers to) is consistent with the sample input file.

types = Table["Real", {400}]; 
Tweeted twitter.com/#!/StackMma/status/598160464502267904
added 566 characters in body
Source Link
kjo
  • 11.9k
  • 1
  • 35
  • 92

The output produced by the calls to printTime are shown belowbelow; the first column shows the timing results for the expression in the second column:

The output produced by the calls to printTime are shown below:

The output produced by the calls to printTime are shown below; the first column shows the timing results for the expression in the second column:

added 566 characters in body
Source Link
kjo
  • 11.9k
  • 1
  • 35
  • 92
 

The example below illustratesEDIT

In response to episanty's request:

makeRow[ncols_, withNaNs_] := If[withNaNs, RandomSample[Prepend[makeRow[ncols - 1, False], "nan"]], RandomReal[{0, 1}, ncols]]; makeSampleInput[path_, nrows_, ncols_, nnans_] := Export[path, RandomSample[Table[makeRow[ncols, i <= nnans], {i, nrows}]], "TSV"]; 

Given these helper functions, one can use

makeSampleInput[pathToTSV, 40000, 400, 10]; 

to create a file at pathToTSV that is comparable to the probleminput file I used for the EXAMPLE below.

 

EXAMPLE

First some setup:

Now, a data import sequence, as described aboveat the beginning of this post:

The example below illustrates the problem.

First some setup:

Now, a data import sequence, as described above:

 

EDIT

In response to episanty's request:

makeRow[ncols_, withNaNs_] := If[withNaNs, RandomSample[Prepend[makeRow[ncols - 1, False], "nan"]], RandomReal[{0, 1}, ncols]]; makeSampleInput[path_, nrows_, ncols_, nnans_] := Export[path, RandomSample[Table[makeRow[ncols, i <= nnans], {i, nrows}]], "TSV"]; 

Given these helper functions, one can use

makeSampleInput[pathToTSV, 40000, 400, 10]; 

to create a file at pathToTSV that is comparable to the input file I used for the EXAMPLE below.

 

EXAMPLE

First some setup:

Now, a data import sequence, as described at the beginning of this post:

added 977 characters in body
Source Link
kjo
  • 11.9k
  • 1
  • 35
  • 92
Loading
Source Link
kjo
  • 11.9k
  • 1
  • 35
  • 92
Loading