Commit Graph

68 Commits

Author SHA1 Message Date
Gabriel Ozouf
89c50509d8 [shared] InteractiveCurveViewRange::isOrthonormal
The old method isOrthonormal has been split into two :
  - shouldBeNormalized tests whether the range is close enough to a
    normal range
  - isOrthonormal tests whether the range is strictly orthonormal, but
    takes into account imprecisions of floating-point arithmetic
2021-01-05 11:01:45 +01:00
Hugo Saint-Vignes
357db4493d [apps/regression] Add TODO to improve coefficient update 2020-12-09 17:31:14 +01:00
Hugo Saint-Vignes
f2ba5daab9 [apps/regression] Comment assert that cannot be satisfied
Change-Id: Iaae5ee4292e33f923f47590ee4520bac44c5d750
2020-11-04 15:58:31 +01:00
Hugo Saint-Vignes
f58633b03c [apps/regression] Add escape case if data is not suitable for regression
Change-Id: Ie2e028a5030e1b0d3f133efdde971645d5b4687b
2020-11-04 15:58:31 +01:00
Hugo Saint-Vignes
bb8a28ade0 [poincare/zoom] Simplify plot ranges after adding margins
Change-Id: If8904ca4e7d306376de785a125fe5fba168de718
2020-11-04 15:58:26 +01:00
Gabriel Ozouf
6f8d80f8ae [regression/store] Sanitize default range
Add range sanitation and checks for orthonormal ranges in setDefault.

Change-Id: I733a8808e944a477573a76b52fef479853b8ad6d
2020-11-04 15:58:22 +01:00
Gabriel Ozouf
6be5e7d62c [apps/shared] Change Zoom API
Moved some code around to decrease redundancy and put more of the logic
into Poincare::Zoom

Change-Id: I4804cf39493ac7f2f0b3c4eb554e5c15c3cef1c9
2020-11-04 15:58:18 +01:00
Gabriel Ozouf
7322751453 [regression] Compute Y range for curve
Regression's automatic Y range used to rely on the Yauto feature. Since
it has been removed, it is now done in Store::setDefault.

Change-Id: I1b6653bb8ebe0ba99decff05bae29bd5a69a9f6c
2020-11-04 15:58:13 +01:00
Gabriel Ozouf
1a5661fd4c [apps/range_parameter_controller] Remove YAuto
This allows for a great deal of simplifications in the class
RangeParamterController.

Change-Id: I5de55d4e8e1f598eb13b08fb8f042907f55b2fa8
2020-11-04 15:58:08 +01:00
Hugo Saint-Vignes
fa9c9c1567 [apps/regression] Add todos for logistic regressions
Change-Id: If2ddc0527d8be89970803de240a6760d037570e2
2020-11-04 15:33:03 +01:00
Hugo Saint-Vignes
e517128a9e [apps/regression] Compute R2 better when dealing with constant regression
Change-Id: Ic724d8d96cb723718a1ce57e72132972a782fc5e
2020-11-04 15:33:03 +01:00
Hugo Saint-Vignes
eed1648363 [apps/statistics] Improve variance accuracy for statistics
Change-Id: Ie8f6f93c8e95940662e72a23619b53ac4ab0d6b6
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
d16e49fc5f [apps/regression] Improve Variance precision
Change-Id: Ia9e406b14c0baec76835e226a7801ba73ff9174e
2020-11-04 14:45:34 +01:00
Hugo Saint-Vignes
db69f6a6f5 [regression] Implement R2 computation using evaluated values
Change-Id: Iecf8cb84f092c2ec8a9bc17bc0265d7dddaac36c
2020-11-04 14:45:34 +01:00
Léa Saviot
2e5e2a3258 [apps/regression] Rename Affine -> Linear and Linear -> Proportional 2020-05-13 15:25:33 +02:00
Joachim LF
5297f28ffa [Regression] Switched affine and linear 2020-05-13 15:25:33 +02:00
Joachim LF
833f6ec778 [Regression] Add affine regression 2020-05-13 15:25:33 +02:00
Romain Goyet
84768472bd Explicit std::min/max template usage
This is unfortunately required in several cases:
 - Sometimes when we use either float and double (this should be changed)
 - Because KDCoordinate is not an int, so any arithmemtic promotes it to
an int
 - Because we mix pointer differences and ints
2020-04-14 09:31:02 -04:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Léa Saviot
702772a7c9 [apps/reg] Store::m_seriesChecksum is Snapshot::m_prevModelsVersions
Share these objects instead of duplicating them
2020-03-11 11:43:36 +01:00
Léa Saviot
f6c15198bc [apps/regression] Power regression uses logarithm of series
This matches other apps results and we directly compute the values from
the data instead of doing a gradient descent.
2020-02-12 15:13:21 +01:00
Émilie Feral
45d42287e2 [apps/shared] MemoizedCurveViewRange is composed of two Range1D to
factorize setters and getters
2019-09-03 15:34:35 +02:00
Ruben Dashyan
e99196b2ea [apps/interactive_curve_view_range] Clean yAuto 2019-08-29 15:13:41 +02:00
Ruben Dashyan
62cec10b46 [apps] Clean unnecessary AppsContainer class declarations and header inclusions 2019-07-19 15:06:25 +02:00
Ruben Dashyan
a36ea6d1e3 [apps/regression] Use a new helper to compute linear regression coefficients 2019-05-29 11:27:30 +02:00
Ruben Dashyan
67f9f79322 [apps] Implement InteractiveCurveViewController::isCursorVisible
It was a pure virtual method implemented in derived classes
  Shared::FunctionGraphController,
  Regression::GraphController.
InteractiveCurveViewRange does not need anymore to hold CurveViewCursor
* m_cursor.
2019-05-03 15:54:21 +02:00
Léa Saviot
496d346049 Remove max/min inline from KDCoordinate header 2019-05-03 15:53:19 +02:00
Léa Saviot
42cdf95e9f [apps/regression] Improve vertical navigation
Data set:
X1 2 3 2   1
Y1 0 1 0.5 5
X2 1 10 2
Y2 0 25 0.5

There was circular navigation on series 2 mean point
2018-12-13 15:56:33 +01:00
Léa Saviot
15c5d2af1b [apps/regression] Fix vertical navigation if 2 series have same point
Data set:
X1: 8 9 10 10
Y1: 2 5 1  2

X2: 10 12 5
Y2: 2  0  8
2018-12-12 17:50:03 +01:00
Léa Saviot
460c21801f [apps/regression] More intuitive curve/dot vertical navigation 2018-12-12 11:14:51 +01:00
Léa Saviot
e3935fd9c0 [apps] Factorize closestCurveIndexVertically from Regression and Graph 2018-11-23 12:04:08 +01:00
Léa Saviot
28189aadac [apps/regression] Fix selection problem when 2 regressions are equal
When going down, the cursor would loop between the 2 equal regressions
without going to lower regressions
2018-11-23 12:04:08 +01:00
Émilie Feral
1b0cd43b56 [regression] Tidy the models' layouts before leaving the app 2018-09-14 15:13:20 +02:00
Émilie Feral
3268a0cb41 [regression] Get rid of dynamic allocation in Store 2018-09-11 13:20:06 +02:00
Émilie Feral
48f890ef93 [poincare] AngleUnit, FormatComplex and PrintFloatMode are now
enumeration of Preferences class
2018-07-30 13:48:04 +02:00
Émilie Feral
e61a408a0a [poincare] Get rid of AngleUnit::Default 2018-07-18 17:09:07 +02:00
Léa Saviot
42d2a06eee [apps/reg] Fix cursor navigation bug
When going UP, the cursor was sometimes stuck on a point on a regression, switching
between the point and the regression endlessly. Example data set:
X1 = [1, 2, 3, 4, 5] and Y1 = [1, 5, 6, 77, 5]
2018-07-18 10:32:46 +02:00
Léa Saviot
68d915fb3e [apps/reg] Fix window sizing: cursor appears even with big bannerview 2018-07-18 10:32:46 +02:00
Léa Saviot
6e888fb718 [apps/reg] Recompute trigonometric regressions if angle unit changed 2018-07-18 10:32:46 +02:00
Léa Saviot
7a114f525e [apps/reg] Implement numerical level set 2018-07-18 10:32:46 +02:00
Léa Saviot
5f865814f0 [apps/reg] Each regression model can evaluate levelSets (= antecedents) 2018-07-18 10:32:45 +02:00
Léa Saviot
faa52fc66f [apps/reg] Memoize the regression coefficients 2018-07-18 10:32:45 +02:00
Léa Saviot
e777a191c6 [apps/regression] Draw the right regression curve 2018-07-18 10:32:45 +02:00
Léa Saviot
6ca4ecb635 [apps/regression] Display the regression type menu 2018-07-18 10:32:45 +02:00
Léa Saviot
a83ef756b3 [apps/stats/reg] Share Store methods 2018-06-12 15:50:42 +02:00
Léa Saviot
70ad21232d [apps/shared] FloatPairStore -> DoublePairStore 2018-06-11 13:58:25 +02:00
Léa Saviot
0c2c998362 [apps/regression] Navigation between different series in graph 2018-06-11 13:58:24 +02:00
Léa Saviot
060d2a7c43 [apps/regression] Fix graph cursor navigation 2018-06-11 13:58:24 +02:00
Léa Saviot
32e00b5e1e [apps/reg] Init the graph selected series at cursor initialization 2018-06-11 13:58:24 +02:00
Léa Saviot
f6823c038f [[apps/regression] Fix regression (now compiles) 2018-06-11 13:58:24 +02:00