Giter Site home page Giter Site logo

Comments (13)

myllym avatar myllym commented on September 28, 2024

Thank you very much for reporting this, and for your hint. The error in fBoxplot is now fixed in the development version available here. I will check if I can find any other issues like this, thank you. -Mari

from get.

byandell avatar byandell commented on September 28, 2024

from get.

byandell avatar byandell commented on September 28, 2024

from get.

myllym avatar myllym commented on September 28, 2024

Dear Brian,

Thank you again. I tried to reproduce your example, as follows, but I was not able to replicate your problem.

r <- seq(0,756,by=3)
funcs <- cbind(seq(0,126,by=0.5), seq(0,126,by=0.5))
curve_set <- create_curve_set(list(r=r, obs=funcs))
forder(curve_set, measure = "area")

Here the equal curves get equal values of the measure (0.5, 0.5 in the above example), too. Is something missing from this example? Could you try to send your example curve_set again for my further testing? I could not find it attached here. Thanks.

Best,
Mari

from get.

byandell avatar byandell commented on September 28, 2024

from get.

myllym avatar myllym commented on September 28, 2024

Thanks! Right, I was missing a condition on the required number of functions in forder. For a moment I thought that also the case of two functions is handled, even though ordering just two functions with these methods do not really make much sense. Namely,

  • If there are only two functions, both of these functions are always the most extreme one for each value of r as measured by a normal rank, in the case of two-sided alternative (the case of measure 'rank' or 'erl'). In this case, it is possible to calculate the measures, but the measures should always be the same for the two functions, i.e. no decision on the order of two functions can be given.
  • The measures 'cont' & 'area' are based on continuous pointwise ranks and then the minimum number of functions needed to make any calculation is 3.

I will add a condition on the number of functions. Thanks for noting that this is missing.
Do you truly have some case where you would like to obtain the ordering measures just for two functions, or it was just experimenting?

-Mari

from get.

myllym avatar myllym commented on September 28, 2024

I added the check to forder and it appears in the development version here. Thank you for reporting this and any other problems that you might find. -Mari

from get.

byandell avatar byandell commented on September 28, 2024

from get.

byandell avatar byandell commented on September 28, 2024

from get.

myllym avatar myllym commented on September 28, 2024

Dear Brian,
The package uses ggplot for the plotting. There is a default title, but it can be modified. Namely, the plotting function returns a ggplot object, which can be modified. So, e.g.,

library(fda)
years <- paste(1:18)
curves <- fda::growth[['hgtf']][years,]
cset1 <- create_curve_set(list(r = as.numeric(years),
obs = curves))
bp <- fBoxplot(cset1, coverage=0.50, type="area", factor=1)
plot(bp)
plot(bp) + ggtitle("My title")

The same holds, for example, for the x and y labels. Example of that given in ?fBoxplot.
The other thing I must think further.

-Mari

from get.

byandell avatar byandell commented on September 28, 2024

from get.

myllym avatar myllym commented on September 28, 2024

Dear Brian,

Some updates

  1. Now the continuous ranks work are defined also for just 1 or 2 functions. Although ordering these functions do not make much sense here, it can be nice that the function returns anyway a result. Thanks to @mikkoku!

  2. The checks "if(length(class(curve_sets)) == 1 && inherits(curve_sets, "list"))" were/are for checking whether the user has provided a curve_set (or object that can be converted to a curve_set) or a list of curve_sets. In the latter case, the curves of the different curve_sets are ordered jointly. I agree this check looked somewhat cryptic, and I have now recoded the above as "!is_a_single_curve_set(curve_sets)", where is_a_single_curve_set is now a helper function that checks if the object given inherits either curve_set or something else that can currently be converted to a curve_set.

  3. It seems that there is no problem to add "curve_set" and "fclust" objects to have also the class "list", and I did this. I just had not realised that it might be needed.

All these are just in this development version at the moment and up to further changes.

Kind regards,
Mari

from get.

byandell avatar byandell commented on September 28, 2024

from get.

Related Issues (7)

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.