Giter Site home page Giter Site logo

desirability2's People

Contributors

emilhvitfeldt avatar mattwarkentin avatar topepo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

mattwarkentin

desirability2's Issues

Use of `use_data` argument

I don't find it intuitive what use_data did without looking at the source. Maybe add an example, or note that use_data is only used if low, high, or target is missing.

More descriptive documentation of what scale, scale_low, and scale_high does

Right now it says the following in the documentation

#' @param scale,scale_low,scale_high A single numeric value to rescale the
#' desirability function.

{desirability} wrote

Values less than one make the criteria more difficult to satisfy while values greater than one make it easier.

In addition, is it not documented what the difference between scale, scale_low, and scale_high are.

I would like to see documented how exactly the scale affects the desirability, which as far as I can tell is just a power

Upkeep for desirability2

2023

Necessary:

  • Update copyright holder in DESCRIPTION: person(given = "Posit Software, PBC", role = c("cph", "fnd"))
  • Double check license file uses '[package] authors' as copyright holder. Run use_mit_license()
  • Update email addresses *@rstudio.com -> *@posit.co
  • Update logo (https://github.com/rstudio/hex-stickers); run use_tidy_logo()
  • usethis::use_tidy_coc()
  • usethis::use_tidy_github_actions()

Optional:

  • Review 2022 checklist to see if you completed the pkgdown updates
  • Prefer pak::pak("org/pkg") over devtools::install_github("org/pkg") in README
  • Consider running use_tidy_dependencies() and/or replace compat files with use_standalone()
  • use_standalone("r-lib/rlang", "types-check") instead of home grown argument checkers
  • Add alt-text to pictures, plots, etc; see https://posit.co/blog/knitr-fig-alt/ for examples

`scale` transformation is limited to powers

I haven't read too much about desirability functions. But is there a reason why the scaling is limited to powers and not any order-preserving transformation that maps the region [0, 1] to [0, 1]?

No guard for scale argument

There is no checking for the scale argument so you could end up with weird things happening.

library(desirability2)

d_max(5, 0, 10, scale = 1)
#> [1] 0.5

d_max(5, 0, 10, scale = 1:2)
#> Warning in out[middle] <- ((x[middle] - low)/(high - low))^scale: number of
#> items to replace is not a multiple of replacement length
#> [1] 0.5

d_max(5, 0, 10, scale = -2)
#> [1] 4

d_max(5, 0, 10, scale = NA)
#> [1] NA

Created on 2021-10-16 by the reprex package (v2.0.1)

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.