Giter Site home page Giter Site logo

caseykneale / chemometricstools.jl Goto Github PK

View Code? Open in Web Editor NEW
64.0 7.0 12.0 6.55 MB

A collection of tools for chemometrics and machine learning written in Julia.

License: Other

Julia 100.00%
chemometrics machine-learning julia curve-resolution regression classification sampling

chemometricstools.jl's Introduction

Fun CLI Tools

Rust Crates

Old Julia Packages

Julia Dev Tools

Utilities

Humour

😄 VIMKiller 😄
😄 Turtle Swarm Optimization😄

This is hobbyist work - none of these projects are endorsed, owned, maintainted, or otherwise by my current/former employers

GitHub stats

chemometricstools.jl's People

Contributors

caseykneale avatar fredrikekre avatar giordano avatar juliatagbot avatar radioflash avatar tlienart avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

chemometricstools.jl's Issues

v0.5.11

Thanks to @giordano for fixing some serious compat issues! I also fixed some minor code style issues. Changing plans for the next minor release. Going to use a confederated design for better maintainability, and separation of concerns.

@JuliaRegistrator register

Cutting v0.4.4 Release

Enough serious bugs were fixed that this warrants a new release. Also some general features were added.

edit removed cmd to add to registry made new issue

v0.5.5 Release

So I fixed a few bugs, namely: Leverage for PCA and PLS are now correct. I added a bit of documentation to plotting objects. Some really small changes to functions, and internal refactoring. Still a ways to go but I'd consider this to be the halfway point to 0.60.

@JuliaRegistrator register()

v0.4.6 release.

So I caught some embarrassing bugs. Notably CDA/LDA had a transpose/broadcasting error that basically made it - well - it made the method not CDA/LDA. I also included some safeties for the GaussianDiscriminant classifier, so if a class covariance matrix is singular the null space is removed to force singularity(it also throws a warning).

Notably, I added LinearPerceptron classifiers, code to generate multivariate confidence ellipses for discriminant analysis methods, and updated some of the docs. I also added hierarchical LDA and some basic graph building functions (adjacency matrices, etc). This release is being cut mostly to test the new package registrator for Julia. I really want end users to get the latest version of the package when they use Pkg.add().

@JuliaRegistrator register()

TagBot trigger issue

This issue is used to trigger TagBot; feel free to unsubscribe.

If you haven't already, you should update your TagBot.yml to include issue comment triggers.
Please see this post on Discourse for instructions and more details.

If you'd like for me to do this for you, comment TagBot fix on this issue.
I'll open a PR within a few hours, please be patient!

v0.5.7 Release

Lot's of small updates. My goals have been to effectively finish all the line items on the ReadMe's todo list prior to the past two months or so. Getting pretty close but dang, there's still a bit left.

Documentation updates:

  • Added page for DOE's
  • Added page for Univariate models
  • Finally did a first pass at documenting the discriminant analysis plots

Code updates:

  • Many bug fixes and small refactorings
  • Added two textbook DOE models for mixtures
  • Added textbook univariate calibration, and standard addition method with convenience plots
  • Improved and pushed up some multilinear model functions.

Internal updates:

  • Added compat lines for all dependencies
  • Updated readme and some old but choppy documentation
  • Now following a true SemVer formatting for versions.
  • Updated dependencies in the package to their latest versions (some big improvements in some of them such as CSV.jl ! )

Social updates:

  • Reached out to a PI or two to seek students who may wish to contribute.
  • Reached out to MLJ/turing, Econometrics, and ExperimentalDesign.jl to see if there was any interest/avenue to pass off code or form some unifications across packages.

@JuliaRegistrator register()

Savitzky Golay filter

Hi there,

Please see here. Apparently the implementation of the SG filter from Qlab is not fully correct. I check with yours here and I got the following:

julia> x = [1,2,3,4,5,6,7,8,9,10]
julia> SavitzkyGolay(x, 0, 1, 5)
1×10 LinearAlgebra.Adjoint{Float64,Array{Float64,1}}:
 1.2  2.0  3.0  4.0  5.0  6.0  7.0  8.0  6.8  5.4

It seems that the SG should produce the same input x for this case. I checked with Matlab sgolayfilt and it does give [1,2,3,4,5,6,7,8,9,10]. Looks like the edges are distorted. In the Qlab implementation we have the same problem:

savitzkyGolay2(x,5,1)
10-element Array{Float64,1}:
 1.6000000000000003
 2.200000000000001 
 3.0               
 4.0               
 5.000000000000001 
 6.000000000000001 
 7.0               
 8.0               
 8.8               
 9.400000000000002 

v0.5.1 Release

So I fixed a major performance issue. I removed Plots.jl as a dependency in favor of RecipesBase.jl! Precompile time is much faster now. As such you can now plot PCA/LDA objects and other things.

I also added a noise convenience function and did a tiny bit of clean-up.

Alright registrator - work your magic!
@JuliaRegistrator register()

v0.4.5 Release

So I caught some embarrassing bugs. Notably CDA/LDA had a transpose/broadcasting error that basically made it - well - it made the method not CDA/LDA. I also included some safeties for the GaussianDiscriminant classifier, so if a class covariance matrix is singular the null space is removed to force singularity(it also throws a warning).

Notably, I added LinearPerceptron classifiers, code to generate multivariate confidence ellipses for discriminant analysis methods, and updated some of the docs. I also added hierarchical LDA and some basic graph building functions (adjacency matrices, etc). This release is being cut mostly to test the new package registrator for Julia. I really want end users to get the latest version of the package when they use Pkg.add().

ChemometricsTools prevents installation of DataFrames 1.1.1

Hi there, just noticed that in a fresh installation of Julia, that adding the ChemometricsTools lowers the DataFrames package to 0.22.7, due to inconsistency in CSV versions:

(@v1.6) pkg> add ChemometricsTools
   Resolving package versions...
   Installed Rmath ──────────── v0.6.1
   Installed Netpbm ─────────── v1.0.1
   Installed LearnBase ──────── v0.3.0
   Installed Rmath_jll ──────── v0.2.2+2
   Installed PenaltyFunctions ─ v0.2.2
   Installed GeometryBasics ─── v0.3.10
   Installed StructArrays ───── v0.4.2
   Installed ColorVectorSpace ─ v0.8.7
   Installed ImageCore ──────── v0.8.22
  Downloaded artifact: Rmath
    Updating `~/.julia/environments/v1.6/Project.toml`
  [a9718f02] + ChemometricsTools v0.5.15
  [a93c6f00]  DataFrames v1.1.1  v0.22.7

Indexing Bug in Kennard Stone

Head's up to anyone using the Kennard Stone method in here. There is an indexing bug that returns indices +1 greater then anything available in the dataset. Yikes, I'll track it down...

v0.5.6 Release

So I fixed a few bugs, namely bugs in plots, and I refactored some code and docs.
This is mostly a test to see how the automatic review process works for minor versions,

@JuliaRegistrator register()

v0.5.9

Literally a release just to fix compatibility issues! Still leaning the ropes with the new package management system,

@JuliaRegistrator register

Feature-Fix v0.4.4 release

So I caught some embarrassing bugs. Notably CDA/LDA had a transpose/broadcasting error that basically made it - well - it made the method not CDA/LDA. I also included some safeties for the GuassianDiscriminant classifier, so if a class covariance matrix is singular the null space is removed to force singularity(it also throws a warning).

Notably, I added LinearPerceptron classifiers, code to generate multivariate confidence ellipses for discriminant analysis methods, and updated some of the docs. This release is being cut mostly to test the new package registrator for Julia. I really want end users to get the latest version of the package when they use Pkg.add().

Regression: use \

Just having a look at some of the code (nice piece of work btw) and in ClassicLeastSquares (*) you have

Z = (Bias) ? hcat( repeat( [ 1 ], size( X )[ 1 ] ), X ) : X
return ClassicLeastSquares(Base.inv(Z' * Z) * Z' * Y, Bias)

I think that's quite inefficient on several levels:

  1. you probably want to use ones instead of repeat(...)
  2. you probably want to check that the type of the ones corresponds to the eltype of X
  3. you really don't want to use Base.inv here and should use Z\Y
  4. you could make it more efficient by skipping a step
bias || return ClassicLeastSquares(X\Y, bias)
return ClassicLeastSquares(hcat... \Y, bias)

as soon as you have large number of rows and or columns the above comments would matter a fair bit.

it's probably a good idea to also distinguish between the main coefficients and the intercept so that your PredictFn doesn't need to reconstruct a hcat matrix (costly).

These comments apply for the rest of the file too.

(*) minor remark, why not OrdinaryLeastSquares which I believe is the standard name with standard abbreviation OLS?


Edit: side note, why not integrate more with mature packages like Clustering.jl ?

v0.5.9 Release

Again many small updates. Readme ToDo list has been updated to reflect this. At this point I'm not looking at adding more features neccesiarily just improving them and making things more stable.

Documentation updates:
Improved some documentation minorly

Code updates:
A small bug fixes and small refactorings
Minor performance improvements to some methods

Internal updates:
Removed DSP due to errors
Replaced depended on methods

@JuliaRegistrator register()

v0.5.8 Release

Again many small updates. Readme ToDo list has been updated to reflect this. At this point I'm not looking at adding more features neccesiarily just improving them and making things more stable.

Documentation updates:
Added page for preexisting Hyperspectral methods
Cleaned up some of the ethos page
Documented a variety of forgotten methods.
Updated classification shootout

Code updates:
A couple bug fixes and small refactorings
Added SIMCA as planned months ago

Internal updates:
Hopefully fixed compat lines for all dependencies
Updated readme

Social updates:
Reached out to a few potential contributors/collaborators

@JuliaRegistrator register()

ModellingTookit

I tried to install ChemometricsTools on Julia 1.7.2 on Mac OSX 10.15.7.
I got the following error

ERROR: Unsatisfiable requirements detected for package ModelingToolkit [961ee093]:
 ModelingToolkit [961ee093] log:
 ├─possible versions are: 0.0.1-8.5.2 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.0.1-8.5.2
 ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: 4.0.7-8.5.2 or uninstalled, leaving only versions: 4.0.7-8.5.2
 │ └─StaticArrays [90137ffa] log:
 │   ├─possible versions are: 0.8.0-1.4.2 or uninstalled
 │   └─restricted to versions 1 by PairPlots [43a3c2be], leaving only versions 1.0.0-1.4.2
 │     └─PairPlots [43a3c2be] log:
 │       ├─possible versions are: 0.5.4 or uninstalled
 │       └─PairPlots [43a3c2be] is fixed to version 0.5.4
 ├─restricted by compatibility requirements with Catalyst [479239e8] to versions: [3.13.0-3.21.0, 4.0.1-5.26.0, 6.2.0-8.5.2], leaving only versions: [4.0.7-5.26.0, 6.2.0-8.5.2]
 │ └─Catalyst [479239e8] log:
 │   ├─possible versions are: 5.0.0-10.6.0 or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions 5.0.0-10.6.0
 │   └─restricted by compatibility requirements with Latexify [23fbe1c1] to versions: [5.0.0, 6.12.0-10.6.0] or uninstalled, leaving only versions: [5.0.0, 6.12.0-10.6.0]
 │     └─Latexify [23fbe1c1] log:
 │       ├─possible versions are: 0.5.0-0.15.13 or uninstalled
 │       └─restricted to versions 0.15 by PairPlots [43a3c2be], leaving only versions 0.15.0-0.15.13
 │         └─PairPlots [43a3c2be] log: see above
 ├─restricted by compatibility requirements with Latexify [23fbe1c1] to versions: [0.0.1-0.8.0, 5.14.0-8.5.2] or uninstalled, leaving only versions: [5.14.0-5.26.0, 6.2.0-8.5.2]
 │ └─Latexify [23fbe1c1] log: see above
 └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.0.1-4.2.0 or uninstalled — no versions left
   └─Distributions [31c24e10] log:
     ├─possible versions are: 0.16.0-0.25.51 or uninstalled
     ├─restricted to versions 0.21-0.25 by DynamicHMCModels [6266e5bf], leaving only versions 0.21.0-0.25.51
     │ └─DynamicHMCModels [6266e5bf] log:
     │   ├─possible versions are: 2.1.4 or uninstalled
     │   └─DynamicHMCModels [6266e5bf] is fixed to version 2.1.4
     ├─restricted by compatibility requirements with StatsBase [2913bbd2] to versions: 0.21.1-0.25.51 or uninstalled, leaving only versions: 0.21.1-0.25.51
     │ └─StatsBase [2913bbd2] log:
     │   ├─possible versions are: 0.24.0-0.33.16 or uninstalled
     │   ├─restricted to versions 0.32-0.33 by PairPlots [43a3c2be], leaving only versions 0.32.0-0.33.16
     │   │ └─PairPlots [43a3c2be] log: see above
     │   └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.32.0-0.32.2
     │     └─Distributions [31c24e10] log: see above
     ├─restricted by compatibility requirements with ContinuousTransformations [98729d58] to versions: 0.16.0-0.23.12, leaving only versions: 0.21.1-0.23.12
     │ └─ContinuousTransformations [98729d58] log:
     │   ├─possible versions are: 1.0.0 or uninstalled
     │   └─restricted to versions * by an explicit requirement, leaving only versions 1.0.0
     ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: [0.16.0-0.23.11, 0.24.5-0.25.51] or uninstalled, leaving only versions: 0.21.1-0.23.11
     │ └─StaticArrays [90137ffa] log: see above
     ├─restricted by compatibility requirements with ChemometricsTools [a9718f02] to versions: [0.16.0-0.22.6, 0.24.0-0.24.18], leaving only versions: 0.21.1-0.22.6
     │ └─ChemometricsTools [a9718f02] log:
     │   ├─possible versions are: 0.2.3-0.5.15 or uninstalled
     │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.2.3-0.5.15
     │   ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: [0.2.3-0.5.1, 0.5.11-0.5.15] or uninstalled, leaving only versions: [0.2.3-0.5.1, 0.5.11-0.5.15]
     │   │ └─StaticArrays [90137ffa] log: see above
     │   ├─restricted by compatibility requirements with CSV [336ed68f] to versions: 0.5.13-0.5.15 or uninstalled, leaving only versions: 0.5.13-0.5.15
     │   │ └─CSV [336ed68f] log:
     │   │   ├─possible versions are: 0.3.0-0.10.3 or uninstalled
     │   │   ├─restricted to versions 0.6-0.8 by DynamicHMCModels [6266e5bf], leaving only versions 0.6.0-0.8.5
     │   │   │ └─DynamicHMCModels [6266e5bf] log: see above
     │   │   └─restricted by compatibility requirements with ChemometricsTools [a9718f02] to versions: [0.3.0-0.5.26, 0.7.0-0.8.5], leaving only versions: 0.7.0-0.8.5
     │   │     └─ChemometricsTools [a9718f02] log: see above
     │   └─restricted by compatibility requirements with RecipesBase [3cdcf5f2] to versions: [0.2.3-0.5.0, 0.5.14-0.5.15] or uninstalled, leaving only versions: 0.5.14-0.5.15
     │     └─RecipesBase [3cdcf5f2] log:
     │       ├─possible versions are: 0.4.0-1.2.1 or uninstalled
     │       └─restricted to versions 1 by PairPlots [43a3c2be], leaving only versions 1.0.0-1.2.1
     │         └─PairPlots [43a3c2be] log: see above
     └─restricted by compatibility requirements with StatsFuns [4c63d2b9] to versions: 0.21.6-0.25.51 or uninstalled, leaving only versions: 0.21.6-0.22.6
       └─StatsFuns [4c63d2b9] log:
         ├─possible versions are: 0.7.0-0.9.16 or uninstalled
         └─restricted to versions 0.9 by DynamicHMCModels [6266e5bf], leaving only versions 0.9.0-0.9.16
           └─DynamicHMCModels [6266e5bf] log: see above

(@v1.7) pkg> rm ModelingToolkit
    Updating `~/.julia/environments/v1.7/Project.toml`
  [961ee093] - ModelingToolkit v8.1.0
  No Changes to `~/.julia/environments/v1.7/Manifest.toml`

(@v1.7) pkg> add ModelingToolkit
   Resolving package versions...
    Updating `~/.julia/environments/v1.7/Project.toml`
  [961ee093] + ModelingToolkit v8.1.0
  No Changes to `~/.julia/environments/v1.7/Manifest.toml`

(@v1.7) pkg> add ChemometricsTools
   Resolving package versions...
ERROR: Unsatisfiable requirements detected for package ModelingToolkit [961ee093]:
 ModelingToolkit [961ee093] log:
 ├─possible versions are: 0.0.1-8.5.2 or uninstalled
 ├─restricted to versions * by an explicit requirement, leaving only versions 0.0.1-8.5.2
 ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: 4.0.7-8.5.2 or uninstalled, leaving only versions: 4.0.7-8.5.2
 │ └─StaticArrays [90137ffa] log:
 │   ├─possible versions are: 0.8.0-1.4.2 or uninstalled
 │   └─restricted to versions 1 by PairPlots [43a3c2be], leaving only versions 1.0.0-1.4.2
 │     └─PairPlots [43a3c2be] log:
 │       ├─possible versions are: 0.5.4 or uninstalled
 │       └─PairPlots [43a3c2be] is fixed to version 0.5.4
 ├─restricted by compatibility requirements with Catalyst [479239e8] to versions: [3.13.0-3.21.0, 4.0.1-5.26.0, 6.2.0-8.5.2], leaving only versions: [4.0.7-5.26.0, 6.2.0-8.5.2]
 │ └─Catalyst [479239e8] log:
 │   ├─possible versions are: 5.0.0-10.6.0 or uninstalled
 │   ├─restricted to versions * by an explicit requirement, leaving only versions 5.0.0-10.6.0
 │   └─restricted by compatibility requirements with Latexify [23fbe1c1] to versions: [5.0.0, 6.12.0-10.6.0] or uninstalled, leaving only versions: [5.0.0, 6.12.0-10.6.0]
 │     └─Latexify [23fbe1c1] log:
 │       ├─possible versions are: 0.5.0-0.15.13 or uninstalled
 │       └─restricted to versions 0.15 by PairPlots [43a3c2be], leaving only versions 0.15.0-0.15.13
 │         └─PairPlots [43a3c2be] log: see above
 ├─restricted by compatibility requirements with Latexify [23fbe1c1] to versions: [0.0.1-0.8.0, 5.14.0-8.5.2] or uninstalled, leaving only versions: [5.14.0-5.26.0, 6.2.0-8.5.2]
 │ └─Latexify [23fbe1c1] log: see above
 └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.0.1-4.2.0 or uninstalled — no versions left
   └─Distributions [31c24e10] log:
     ├─possible versions are: 0.16.0-0.25.51 or uninstalled
     ├─restricted to versions 0.21-0.25 by DynamicHMCModels [6266e5bf], leaving only versions 0.21.0-0.25.51
     │ └─DynamicHMCModels [6266e5bf] log:
     │   ├─possible versions are: 2.1.4 or uninstalled
     │   └─DynamicHMCModels [6266e5bf] is fixed to version 2.1.4
     ├─restricted by compatibility requirements with StatsBase [2913bbd2] to versions: 0.21.1-0.25.51 or uninstalled, leaving only versions: 0.21.1-0.25.51
     │ └─StatsBase [2913bbd2] log:
     │   ├─possible versions are: 0.24.0-0.33.16 or uninstalled
     │   ├─restricted to versions 0.32-0.33 by PairPlots [43a3c2be], leaving only versions 0.32.0-0.33.16
     │   │ └─PairPlots [43a3c2be] log: see above
     │   └─restricted by compatibility requirements with Distributions [31c24e10] to versions: 0.32.0-0.32.2
     │     └─Distributions [31c24e10] log: see above
     ├─restricted by compatibility requirements with ContinuousTransformations [98729d58] to versions: 0.16.0-0.23.12, leaving only versions: 0.21.1-0.23.12
     │ └─ContinuousTransformations [98729d58] log:
     │   ├─possible versions are: 1.0.0 or uninstalled
     │   └─restricted to versions * by an explicit requirement, leaving only versions 1.0.0
     ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: [0.16.0-0.23.11, 0.24.5-0.25.51] or uninstalled, leaving only versions: 0.21.1-0.23.11
     │ └─StaticArrays [90137ffa] log: see above
     ├─restricted by compatibility requirements with ChemometricsTools [a9718f02] to versions: [0.16.0-0.22.6, 0.24.0-0.24.18], leaving only versions: 0.21.1-0.22.6
     │ └─ChemometricsTools [a9718f02] log:
     │   ├─possible versions are: 0.2.3-0.5.15 or uninstalled
     │   ├─restricted to versions * by an explicit requirement, leaving only versions 0.2.3-0.5.15
     │   ├─restricted by compatibility requirements with StaticArrays [90137ffa] to versions: [0.2.3-0.5.1, 0.5.11-0.5.15] or uninstalled, leaving only versions: [0.2.3-0.5.1, 0.5.11-0.5.15]
     │   │ └─StaticArrays [90137ffa] log: see above
     │   ├─restricted by compatibility requirements with CSV [336ed68f] to versions: 0.5.13-0.5.15 or uninstalled, leaving only versions: 0.5.13-0.5.15
     │   │ └─CSV [336ed68f] log:
     │   │   ├─possible versions are: 0.3.0-0.10.3 or uninstalled
     │   │   ├─restricted to versions 0.6-0.8 by DynamicHMCModels [6266e5bf], leaving only versions 0.6.0-0.8.5
     │   │   │ └─DynamicHMCModels [6266e5bf] log: see above
     │   │   └─restricted by compatibility requirements with ChemometricsTools [a9718f02] to versions: [0.3.0-0.5.26, 0.7.0-0.8.5], leaving only versions: 0.7.0-0.8.5
     │   │     └─ChemometricsTools [a9718f02] log: see above
     │   └─restricted by compatibility requirements with RecipesBase [3cdcf5f2] to versions: [0.2.3-0.5.0, 0.5.14-0.5.15] or uninstalled, leaving only versions: 0.5.14-0.5.15
     │     └─RecipesBase [3cdcf5f2] log:
     │       ├─possible versions are: 0.4.0-1.2.1 or uninstalled
     │       └─restricted to versions 1 by PairPlots [43a3c2be], leaving only versions 1.0.0-1.2.1
     │         └─PairPlots [43a3c2be] log: see above
     └─restricted by compatibility requirements with StatsFuns [4c63d2b9] to versions: 0.21.6-0.25.51 or uninstalled, leaving only versions: 0.21.6-0.22.6
       └─StatsFuns [4c63d2b9] log:
         ├─possible versions are: 0.7.0-0.9.16 or uninstalled
         └─restricted to versions 0.9 by DynamicHMCModels [6266e5bf], leaving only versions 0.9.0-0.9.16
           └─DynamicHMCModels [6266e5bf] log: see above

MultiPCA tensor product

Hi there, sorry to bother again.

I have been snooping around the MultiPCA algorithm you used since before I found your library I was using drEEM from Bro et al. in Matlab.

I noticed the tensor product line

for i = modes #This is a doohicky to do the tensor products...

Tensors operations are quite developed in julia so far, in case you want to check them out:
https://github.com/Jutho/TensorOperations.jl
https://github.com/KristofferC/Tensors.jl
https://github.com/ITensor/ITensors.jl

I confess I have not done any test on this, just to let you know for efficiency comparison in the future and to make use of the packages developed here.

problem adding package in julia v1.8

I am getting errors trying to install the package on julia v1.8, any idea on how to fix this ?

`(@v1.8) pkg> add ChemometricsTools
       Resolving package versions...
    ERROR: LoadError: UndefVarError: libcuda not defined
    Stacktrace:
     [1] cuda_toolkit_tag()
       @ Main ~/.julia/packages/CUDA_Runtime_jll/CKzlt/.pkg/platform_augmentation.jl:50
     [2] augment_platform!(platform::Platform)
       @ Main ~/.julia/packages/CUDA_Runtime_jll/CKzlt/.pkg/platform_augmentation.jl:137
     [3] top-level scope
       @ ~/.julia/packages/CUDA_Runtime_jll/CKzlt/.pkg/select_artifacts.jl:11
     [4] include(fname::String)
       @ Base.MainInclude ./client.jl:476
     [5] top-level scope
       @ none:5
    `

and

    `    Stacktrace:
      [1] pipeline_error
        @ ./process.jl:565 [inlined]
      [2] read(cmd::Cmd)
        @ Base ./process.jl:449
      [3] collect_artifacts(pkg_root::String; platform::Base.BinaryPlatforms.Platform)
        @ Pkg.Operations ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:630
      [4] download_artifacts(env::Pkg.Types.EnvCache; platform::Base.BinaryPlatforms.Platform, julia_version::VersionNumber, verbose::Bool, io::Base.TTY)
        @ Pkg.Operations ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:662
      [5] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}, new_git::Set{Base.UUID}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform)
        @ Pkg.Operations ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/Operations.jl:1282
      [6] add(ctx::Pkg.Types.Context, pkgs::Vector{Pkg.Types.PackageSpec}; preserve::Pkg.Types.PreserveLevel, platform::Base.BinaryPlatforms.Platform, kwargs::Base.Pairs{Symbol, Base.TTY, Tuple{Symbol}, NamedTuple{(:io,), Tuple{Base.TTY}}})
        @ Pkg.API ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:275
      [7] add(pkgs::Vector{Pkg.Types.PackageSpec}; io::Base.TTY, kwargs::Base.Pairs{Symbol, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
        @ Pkg.API ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:156
      [8] add(pkgs::Vector{Pkg.Types.PackageSpec})
        @ Pkg.API ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/API.jl:145
      [9] do_cmd!(command::Pkg.REPLMode.Command, repl::REPL.LineEditREPL)
        @ Pkg.REPLMode ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:409
     [10] do_cmd(repl::REPL.LineEditREPL, input::String; do_rethrow::Bool)
        @ Pkg.REPLMode ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:387
     [11] do_cmd
        @ ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:377 [inlined]
     [12] (::Pkg.REPLMode.var"#24#27"{REPL.LineEditREPL, REPL.LineEdit.Prompt})(s::REPL.LineEdit.MIState, buf::IOBuffer, ok::Bool)
        @ Pkg.REPLMode ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/Pkg/src/REPLMode/REPLMode.jl:551
     [13] #invokelatest#2
        @ ./essentials.jl:729 [inlined]
     [14] invokelatest
        @ ./essentials.jl:726 [inlined]
     [15] run_interface(terminal::REPL.Terminals.TextTerminal, m::REPL.LineEdit.ModalInterface, s::REPL.LineEdit.MIState)
        @ REPL.LineEdit ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/REPL/src/LineEdit.jl:2510
     [16] run_frontend(repl::REPL.LineEditREPL, backend::REPL.REPLBackendRef)
        @ REPL ~/julia/julia-1.8.2/share/julia/stdlib/v1.8/REPL/src/REPL.jl:1248
     [17] (::REPL.var"#49#54"{REPL.LineEditREPL, REPL.REPLBackendRef})()
        @ REPL ./task.jl:484
    `

SNV()

Just following your examples....

julia> FauxSpectra1 = randn(10,200);

julia> SNV = StandardNormalVariate(FauxSpectra1);

julia> Transformed1 = SNV(FauxSpectra1);
ERROR: MethodError: objects of type Array{Float64,2} are not callable
Use square brackets [] for indexing an Array.
Stacktrace:
[1] top-level scope at none:0

Package usage

Hi there, thanks for the library, excellent work. (I went first to the NMF.jl but found some issues when compared to Matlab's one.)

I was trying to use the example of Curve Resolution as describe in the docs here but using the tecator.csv dataset as the triliq.csv is missing (could not find it). I try different things but I am stuck getting zeros and ones only in the weights C_MCRALS. MWE as follow:

using ChemometricsTools
Raw = ChemometricsToolsDataset("tecator.csv")
Mixture = Matrix(Raw)[:,1:99]); # only absorbance spectra
pure = [10,11,20,21,28,29];
PURE = Mixture[pure,:];
impure = [collect(1:9); collect(12:19);collect(22:27)];
Mixture = Mixture[impure,:];

( W_NMF, H_NMF ) = NMF(Mixture; Factors = 3, maxiters = 300, tolerance = 1e-8)
(C_Simplisma,S_Simplisma, vars) = SIMPLISMA(Mixture; Factors = 18)
vars
#Find purest variables that are not neighbors with one another
cuts = S_Simplisma[ [1,3,17], :];
( C_MCRALS, S_MCRALS, err ) = MCRALS(Mixture, nothing, RangeNorm(cuts')(cuts')';
                                    Factors = 3, maxiters = 10,
                                    norm = (true, false),
                                    nonnegative = (true, true) )

And this is what I get

julia> C_MCRALS
23×3 Array{Float64,2}:
 0.0  0.0  1.0
 0.0  0.0  1.0
 0.0  0.0  1.0
 0.0  0.0  1.0
             
 0.0  0.0  1.0
 0.0  0.0  1.0
 0.0  0.0  1.0
 0.0  0.0  1.0

julia> S_MCRALS
3×99 Array{Float64,2}:
 0.0      0.0      0.0      0.0      0.0      0.0      0.0      0.0      0.0       0.0      0.0      0.0      0.0      0.0     0.0      0.0      0.0    
 0.0      0.0      0.0      0.0      0.0      0.0      0.0      0.0      0.0        0.0      0.0      0.0      0.0      0.0     0.0      0.0      0.0    
 2.76599  2.76854  2.77107  2.77363  2.77626  2.77899  2.78187  2.78493  2.7882     3.10123  3.08192  3.06295  3.04433  3.0261  3.00824  2.99068  2.97337

I also tried with my data, and I get the same thing. I am pretty sure I am not understanding the arguments in here. Any suggestion on your side? Thanks!

v0.5.0 Release

So I fixed some small bugs - mostly worked on fleshing out functionality since v0.4.6.

I added some odd-ball methods like hierarchical LDA, monotone regression, etc. I added a lot of helper functions. One neat form of functionality I added is the ability to off-load classification statistics (typically stored in a dictionary) directly to LaTeX formatted tables or CSV's for further processing. Also added a unimodal constraint to the S matrix in MCR-ALS.

There's a bit of core functionality I'd still like to add, but over-all things are going the right way. The next release will focus on cleaning some things up for ease of use, tacking on methods as I have time (limited these days), and whatever else comes up.

Alright registrator - work your magic!
@JuliaRegistrator register()

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.