Git Product home page Git Product logo

emsc's Issues

QR decomposition

I was a little bit confused with QR decomposition in the code:

  1. First, QR decomposition is done only for polynomial components (here). However, the original paper that is provided in resources suggest to do that for the whole model matrix
  2. Then mldivide is used for solving the LS problem. And mldivide uses QR decomposition for that. Does it look like the QR decomposition is applied twice? Is there a reason for that?

What are constituent?

By looking at the code I could not understand what are constituents. From the code it looks like they are used exactly the same as interferents. For example, here they are excluded.
Another question is what is the difference between constituent and reference?

Abcissas from colnames are not handled properly

Here is a small example:

> x <- matrix(runif(50), ncol = 10)
> colnames(x) <- seq(420,600,length.out=10)
> x
           420       440        460       480        500       520        540       560        580       600
[1,] 0.1902495 0.6638507 0.96988143 0.4503034 0.02323665 0.7320788 0.44513545 0.5099727 0.00612236 0.9927394
...

> EMSC_model(x)
...
$abcissas
 [1]  1  2  3  4  5  6  7  8  9 10

I think the problem is in the line 144. Because is.ordered is actually related to factor variables, i.e. it always returns false for colnames.

Only one reference spectrum is allowed

Hello,

First of all, thank you for your package.
I was going though your code and I found that the code assumes that there is only one reference spectrum (for example, this line of code), however EMSC is not supposed to be limited to that. I would be good to allow using more than one reference spectra.

Error using custom weights

Hi,

I have an issue when using custom weights for the EMSC algorithm. Depending on the degree chosen, I get either "Longer object length is not a multiple of shorter object length" or dims [product xxxx] do not match the length of object [xxxx]"

The issue seems to be at line 15 :

modelw <- model$model * rep(model$weights, each = n)

I am not sure why the "n" variable is needed here, it doesn't match with the dimensions of the object "model". I know of the objectives of using EMSC but I am less familiar with the maths behind it.

Best regards,
Lucas

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.