[Haskell-beginners] 2D rectanlge array type

Bob Ippolito bob at redivi.com
Thu Sep 12 21:13:28 CEST 2013


I would probably use repa for this sort of application.
http://hackage.haskell.org/package/repa

On Thursday, September 12, 2013, Nathan Hüsken wrote:

> Hey,
>
> I am experimenting with machine learning in haskell. For training a model,
> I need to input a list of features. A features itself is a set of floating
> point numbers. So my training data has the type:
>
>     [Feature]
>
> What I am wondering is which type I should use for Feature. As I said, it
> is a set of floats. But every feature must have exactly the same number of
> floats. I could use
>
> type Feature = [Float]
>
> but that would not ensure that every feature has the same number of
> flaots. I could use tuples
>
> type Feature = (Float,Float,Float,Float,Float ...)
>
> The number of features varies from application to application. And I do
> not know how to encode that with tuples. Also the number of features can
> get very big (in extreme cases up to ~1000, in normal cases ~100).
>
> How would you do that?
>
> Thanks!
> Nathan
>
>
> ______________________________**_________________
> Beginners mailing list
> Beginners at haskell.org
> http://www.haskell.org/**mailman/listinfo/beginners<http://www.haskell.org/mailman/listinfo/beginners>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/beginners/attachments/20130912/4cfc6097/attachment.htm>


More information about the Beginners mailing list