Closed willwerscheid closed 6 years ago
Merging #84 into master will decrease coverage by
0.77%
. The diff coverage is82.3%
.
@@ Coverage Diff @@
## master #84 +/- ##
==========================================
- Coverage 85.79% 85.01% -0.78%
==========================================
Files 17 22 +5
Lines 1028 1255 +227
==========================================
+ Hits 882 1067 +185
- Misses 146 188 +42
Impacted Files | Coverage Δ | |
---|---|---|
R/update_precision.R | 100% <ø> (ø) |
:arrow_up: |
R/flash.R | 57.14% <ø> (-33.77%) |
:arrow_down: |
R/objective.R | 100% <ø> (ø) |
:arrow_up: |
R/update_factors.R | 100% <ø> (ø) |
|
R/get_functions.R | 61.4% <ø> (-15.79%) |
:arrow_down: |
R/ebnm_functions.R | 67.64% <ø> (ø) |
:arrow_up: |
R/print.R | 0% <0%> (ø) |
|
R/add_fixed.R | 100% <100%> (ø) |
|
R/add_from_data.R | 100% <100%> (ø) |
|
R/flash_object.R | 100% <100%> (ø) |
|
... and 19 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update 5770333...e073478. Read the comment docs.
This pull request includes several major interface changes:
flash
object is now aflash_fit
object. The newflash
object, which is what nearly all of the exported functions return (namely,flash
,flash_add_greedy
,flash_backfit
,flash_add_factors_from_data
,flash_add_fixed_factors
,flash_add_fixed_loadings
, andflash_zero_out_factor
; the exceptions, for obvious reasons, areflash_set_data
,flash_fill
, andflash_sampler
), contains aflash_fit
field, as well as fields with summary info (nfactors
,pve
,ldf
,fitted_values
) and afit_history
(a list, one element for each fit, each of which contains fieldstype
(greedy
orbackfit
),kset
,niter
,obj_track
-- the objective function after each iteration --, anddiff_track
-- the "diff" after each iteration). Note that the fitting process works exactly as before -- that is, a flash object can be re-fit directly without first extracting theflash_fit
object. So the only difference from the point of the view of the user is that the summary information is returned with every fit, and an ongoing history of the fit is maintained along with the object.flash
object, theget_
functions have been removed from the interface. This closes #55.flash_add_
functions now include abackfit
option, which defaults toTRUE
, and accepts additional backfitting arguments via...
. Thus, by default, all of the above fitting functions return a fitted flash object. Ifbackfit
is set toFALSE
, thenf$objective
is set toNA
(since the calculated objective is not valid until a backfit has occurred). This fixes #81 and closes #49.flash
object obviates the need for a S3summary
method, so this has been removed. Theprint
method has been retained.plot
method. This fixes #43 .flash_greedy_workhorse
andflash_backfit_workhorse
functions have been created, which contain parametersstopping_rule
(with optionsobjective
,factors
,loadings
, andall_param
, the latter three of which stop after the elements of the l_2-normalized factors/loadings/both no longer change by more thantol
) andverbose_output
, which allows more flexibility over what is displayed to the user during the fitting process. This fixes #72.flash_init_lf
is no longer exported as it will be rarely needed and the same thing can be achieved viaadd_factors_from_data
.flash_update_precision
is no longer exported. This fixes #51.Finally, I've re-organized the
R
folder so that functions are in more intuitive places and files have more descriptive names.