Comments (3)
Thanks for reporting!🚀
I've traced down the issue to the following two lines:
The Array.rev
must be removed at:
FSharp.Stats/src/FSharp.Stats/Signal/Padding.fs
Lines 140 to 144 in 3d6a220
The last point has to be integrated here:
FSharp.Stats/src/FSharp.Stats/Signal/Padding.fs
Lines 164 to 167 in 3d6a220
After these modifications the result looks as follows:
//#r "nuget:FSharp.Stats"
#r @"C:\Users\bvenn\source\repos\FSharp.Stats\src\FSharp.Stats\bin\Release\netstandard2.0\FSharp.Stats.dll"
#r "nuget:Expecto"
#r "nuget: Plotly.NET"
open Plotly.NET
open System
open FSharp.Stats.Signal
open Expecto
let dataLength = 20
let padding = 10
let data =
Array.init dataLength (
fun i ->
(3.0 + float i, 7.0 - float i)
)
let expectLeadIn = Array.init padding (fun i -> (3.0 - float (padding-i), 0.0))
let expectLeadOut = Array.init padding (fun i -> (3.0 + float (dataLength + i), 0.0))
let expectedPadded = Array.concat [expectLeadIn; data; expectLeadOut]
let padded =
Padding.pad data 1.0 Double.PositiveInfinity (-) (+) padding Padding.BorderPaddingMethod.Zero Padding.InternalPaddingMethod.NaN Padding.HugeGapPaddingMethod.NaN
let indices = Array.init padded.Length (fun x -> string x)
[
Chart.Point(data,Name="raw data") |> Chart.withMarkerStyle (Size=10)
Chart.Point(expectedPadded,Name="expected") |> Chart.withMarkerStyle (Size=8)
Chart.Point(padded,Name="actual",MultiText=indices,TextPosition=StyleParam.TextPosition.TopRight) |> Chart.withMarkerStyle (Size=6)
]
|> Chart.combine
|> Chart.show
@marklam, if it is ok for you I would integrate your tests into the test project. Of course you can add them yourself and file a PR if you want to.
from fsharp.stats.
@bvenn I'm more than happy for you to integrate those tests. Thanks for responding so quickly!
from fsharp.stats.
closed by 153d95e
from fsharp.stats.
Related Issues (20)
- [Feature Request] Module Restructuring Part 1 HOT 2
- [Feature Request] Add Parameter field to Distributions HOT 1
- [BUG] documentation issue: Statistical Testing / SAM HOT 8
- [Feature Request] Update all comments according to XML documentation styling HOT 1
- Separate Akima interpolation from cubic spline interpolation HOT 1
- [Duplicate] Brent minimization seems to be duplicated within FSharp.Stats
- Move regularize anywhere more appropriate
- Update Interval module HOT 3
- Addition of Bezier curves HOT 1
- [BUG] In Akima interpolation, the slope at the last point is determined incorrectly. HOT 2
- [Feature Request] Integration procedures for Interpolation and LinearRegression
- Update `Support` member for all probability distributions HOT 2
- Add Wilcoxon Distribution HOT 2
- Hamming distance HOT 1
- Kolmogorov-Smirnov Distribution
- Minkowski distance HOT 4
- Documentation for Savitzky Golay filter
- t-Distributed Stochastic Neighbour Embedding (tSNE)
- Decision trees and random forest
- kNN classification HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fsharp.stats.