Comments (3)
I'm updating the Interval module and move all functions within Intervals to members of an extended Interval<'a> type.
I noticed Intervals.getValueAt
doesn't do what I'd expect.
/// Get the value at a given percentage within (0.0 - 1.0) or outside (< 0.0, > 1.0) of the interval. Rounding to nearest neighbour occurs when needed.
let inline getValueAt percentage (interval: Interval<'a>) =
match interval.trySize with
| Some size -> percentage * (float size)
| None -> nan
The description suggests to have
from fsharp.stats.
https://github.com/fslaborg/FSharp.Stats/tree/update-interval
I ran into an issue when modeling the current functionalities as type members. Sometimes it is required to have a generic zero or to be able to divide interval endpoints:
These constraints limit the Interval type for numeric values only and don't allow strings to be modeled as interval. I don't have a solution except for constraining all members of the Interval<'a> type to handle generic 'a and move specialized functions that only handles numeric values to a interval module (as it was before).
from fsharp.stats.
Should the implementation do a comparison in case the values are swapped, and what should occur if they are? - @smoothdeveloper
Mathematically intervals are invalid if the end is lower than the start. A comparison prior to the interval creation poses an issue. The endpoints of intervals can be defined by e.g. tuples, where the first element may be an index that has nothing to do with the interval itself.
let values = [(1,1); (2,5); (3,-3)]
Interval.ofSeqBy snd values
// throws an error because (3,-3) < (2,5) despite the fact, that the actual interval [-3,5] is valid
Of course we could limit the input types to be the comparable interval endpoints only, thereby removing the possibility to have custom types as input. But when thinking of multidimensional data, an interval of [(1,2,3),(2,1,4)] is invalid but [1,2,3] < [2,1,4] returns true. I thought the simpe check if start < end would be a simple solution, but obviously its not..
from fsharp.stats.
Related Issues (20)
- 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
- Documentation request for X² test
- [Feature Request] Surface fitting for simple data, and example that shows the surface in plotly HOT 5
- [Feature Request] NaN safety, we probably need something more than doc strings. HOT 2
- [Feature Request] review / remove [<AutoOpen>] on modules that overlay FSharp.Core collection types. HOT 2
- [Feature Request]addition of Normalized Mutual Information
- [BUG] Incorrect Behavior in FSharp.Stats.SpecializedGenericImpl.setColM for Non-Square Matrices
- [Feature Request] QR Matrix Decomposition using Gram-Schmidt HOT 2
- [Feature Request] weighted KNN imputation
- `JaggedCollection.transpose` results in wrong result when applied to rows of varying length
- [BUG] HierarchicalClustering cannot digest data of generic type anymore
- [BUG] Interval.isIntersection false positive on one-sided open intervals HOT 1
- [Feature Request] Support intersect on mixed interval types
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.