GithubHelp home page GithubHelp logo

gmgeorg / lambertw Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 2.0 349 KB

LambertW R package: Lambert W x F distributions and Gaussianization for skewed & heavy-tailed data

R 93.64% C++ 6.28% C 0.08%
heavy-tailed heavy-tailed-distributions skewed-data leptokurtosis normalization normal-distribution gaussianize gaussianize-data r-package cran

lambertw's People

Contributors

gmgeorg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

lambertw's Issues

Fix NAMESPACE / usedynlib issue for package compilation

After updates in build process in Rcpp packages the previous roxygen2 tags didnt work anymore properly. I tried following steps in https://stackoverflow.com/questions/58132832/error-function-is-not-available-for-call-for-package-x but that didnt work out properly.

Note that in v0.6.4 the NAMESPACE file used only useDynLib; recently CRAN wants the .registration=TRUE flag added. This lies at the root of not being able to compile the package anymore. Its somehow related to the .registration flag causing problems with function names not being found anymore. I think (!) this has to do with a name clash between RCPP and R function names that share the same name (described here about KernSmooth package https://cran.r-project.org/doc/manuals/r-release/R-exts.html) . Not sure how to resolve this since I am going in circles about having to add .registration=TRUE to compile properly and pass CRAN chekcs, but then function names not being found.

Issue in Windows/M1 with type = "hh" after lamW update

Hello, first off, thank you again for this package!

As you know, bestNormalize depends on lamW via LambertW. After the recent update to lamW, I began seeing errors in bestNormalize CRAN tests on Windows and M1 Macs for the Lambert function in bestNormalize. (see check results here). It appears that the Lambert transformation used by bestNormalize (see code here) is not inverting correctly, but this only occurs only on Windows and M1 macs.

In order to keep bestNormalize on CRAN I'll need to take these tests out, but I thought I would give you a heads up. I dug a bit into this and it looks like the type = "hh" doesn't seem to be working on Windows (see possible convergence issue below):

data(iris)

train <- iris$Petal.Width
summary(train)
   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
  0.100   0.300   1.300   1.199   1.800   2.500 
lambert_obj <- LambertW::Gaussianize(train, type = "hh")
summary(lambert_obj)
      Y1.X      
 Min.   :1.898  
 1st Qu.:1.898  
 Median :1.898  
 Mean   :1.898  
 3rd Qu.:1.898  
 Max.   :1.899  
attributes(lambert_obj)
$dim
[1] 150   1

$dimnames
$dimnames[[1]]
NULL

$dimnames[[2]]
[1] "Y1.X"


$`Gaussianized:mu`
[1] 1.898343

$`Gaussianized:sigma`
[1] 6.4e-05

$`Gaussianized:delta_l`
[1] 7.545524e+31    

$`Gaussianized:delta_r`
[1] 2.558503

$`Gaussianized:alpha_l`
[1] 1

$`Gaussianized:alpha_r`
[1] 1

theoretical kurtosis

In functions such as IGMM and delta_GMM, there is a default input parameter called theoretical.kurtosis, which is usually set to 3. Is there a particular reason why? If I have to provide a theoretical kurtosis, what is the best way to determine the theoretical kurtosis value (not the empirical one)?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.