- title : Azure Functions
- description : Introduction to Azure Functions with F#
- author : Mathias Brandewinder
- theme : night
- transition : default
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// blog post: brandewinder.com/2016/08/06/gradient-boosting-part-1 | |
// https://en.wikipedia.org/wiki/Gradient_boosting#Algorithm | |
(* | |
Exploring the dataset | |
*) | |
#I "./packages/" | |
#r "fsharp.data/lib/net40/fsharp.data.dll" | |
open FSharp.Data |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
open System | |
open System.IO | |
let path = @"C:\Users\Mathias\Desktop\day-1-test\day-1\trainingsample.csv" | |
let data0 = File.ReadAllLines path | |
let data1 = | |
data0 |> Array.map (fun line -> line.Split ',') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let rng = System.Random() | |
// first interpretation: flip coins, | |
// and keep only the ones where heads (=0) | |
// until there is only 1 left. | |
let rec Strategy1 (rolls:int, choices:int list) = | |
match choices with | |
| [] -> failwith "unexpected" | |
| [x] -> rolls, x // only one result left: done | |
| _ -> |
let square (x:float) = x * x
square 10.0
// fsharp.formatting // fsharp project scaffold
// 1. promote script to unit test // 2. promote script to documentation // 3. discard :)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1) editor | |
VSCode + Ionide | |
Bonus: Ionide Paket for package management | |
http://ionide.io/ | |
https://fsprojects.github.io/Paket/ | |
2) presentations |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Observation = { | |
SearchTerms: string | |
ProductTitle: string | |
} | |
with member this.SearchLength = this.SearchTerms.Length |> float | |
type Relevance = float | |
type Predictor = Observation -> Relevance |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#I "../packages/" | |
#r @"FSharp.Data/lib/net40/FSharp.Data.dll" | |
#r @"StemmersNet/lib/net20/StemmersNet.dll" | |
#r @"FSharp.Collections.ParallelSeq/lib/net40/FSharp.Collections.ParallelSeq.dll" | |
#load "Utilities.fs" | |
open FSharp.Data |