Comments (12)
Does Incanter build and test with the current snapshot ?
from clatrix.
The parts of Clatrix upon which Incanter depends haven't changed much in a while. The only movement is in tracking core.matrix, so I'm pretty happy with stability. Others ?
from clatrix.
I'm afraid it does not.
The only change I could see was that the identity matrix function was renamed from id to eye.
However, the tests fail.
Here is travis running them:
https://travis-ci.org/daydreamt/incanter
I will dig deeper later to ensure I haven't done anything stupid.
from clatrix.
So, I went through the failed tests and the error.
The tests failed because of API changes, mostly.
(def A [ [1 2 3], [4 5 6], [7,8,9] ,[10,11,12]]
(conj A [13 14 15])
;=> now returns nil, didn't use to
(conj A [[13,14,15]])
;=> A 5x3 matrix
;=> -------------
;=> 1.00e+00 2.00e+00 3.00e+00
;=> 4.00e+00 5.00e+00 6.00e+00
;=> 7.00e+00 8.00e+00 9.00e+00
;=> 1.00e+01 1.10e+01 1.20e+01
;=> 1.00e+00 2.00e+00 3.00e+00
;something like this was returned before, I think
;The next error occurs due to some change in the matrix function. I think.
;;(def M (predict (simple-regression [2 4] [1 3]) 2))
;which returns
(def M (matrix [3]))
;=> A 1x1 matrix
;=> -------------
;=> 3.00e+00
(= 3.0 M)
;=> false, but used to be true
;The last one I have to think about. It has to do with vector multiplication.
The serious error is due to the first change, I think.
It is not expected behaviour, right?
from clatrix.
If new Clatrix will be release, I'll incorporate it into Incanter immediately...
from clatrix.
My hacking to make add core.matrix support to Incanter will probably also depend on a new Clatrix release.
I can push out a release to net.mikera/clatrix if useful as a temporary measure?
from clatrix.
Yes, I think that this could work. Although I've discussed this with Edmund & Joseph - they're also ready to push new release when I do changes into Incanter that allow to work with new version
from clatrix.
OK, sorry for the absence. Back now.
- It seems that cons is incorrectly implemented. Its returning a concrete type where it should be returning a sequence. We need to change that, but its going to cause breakage.
- Conj is unimplemented. I'm not sure how to do this, can you give me pointers please ? As I understand it is not in any of the core interfaces or existing protocols. Should we create our own protocol and extend it Matrix and Vector ?
- (not (= 3 (matrix [3]))) is the correct behaviour, I think. Agree ?
from clatrix.
The whole "treat a matrix like a sequence of sub-matrices" concept appears to be a bit problematic from what I've observed in my experiments to get Incanter working with core.matrix. There's a lot of inconsistency lurking around which makes it hard to define correct behaviour.
If we're going to cause breakage anyway, I think it would be worth revisiting the design in this area.
from clatrix.
I don't like it myself, how much is it used in Incanter ?
from clatrix.
Hard to say: you don't need it (there are always other ways of achieving the same thing) but it's quite widely used in the docstrings and tests.
I suggest:
- Being more explicit when you actually want a sequence of rows or columns, e.g. telling people to use
(first (columns A))
or(map something (rows A))
- Mimicking regular Clojure vectors / core.matrix behaviour, e.g. a row is considered to be a 1D Vector rather than a 1xN 2D Matrix. This also matches people's intuitive expectation about arrays in other languages. I believe this is the best way to ensure consistent behaviour
(1) can be done quite easily, just by deprecating the old usage and changing docstrings. (2) is relatively easy to do as well, but will almost certainly cause breakage, so we should probably save it for a major (2.0 ?) release of Incanter and corresponding (3.0? 4.0?) Clatrix release
from clatrix.
I've fixed the problem with bind-rows & fresh clatrix. The only remaining issue is: conj
of matrix with vector that is described above.
If we can fix this issue, then I can cut the 1.5.0 release of Incanter & after that we can concentrate on 2.0 based on core.matrix.
from clatrix.
Related Issues (20)
- 0987 HOT 1
- Make as-vec work consistently on all matrix sizes
- Make as-vec work consistently on all matrix sizes
- NPE when comparing 2 empty matrices
- rank calculated incorrectly
- first, map, ... don't work correctly for 1 row matrices HOT 21
- Would you consider a pr for get and submatrix? (:Question) HOT 4
- Can't reshape matrix
- Element map (emap) on matrix returns LazySeq HOT 4
- Race condition in loading implementation
- reshape still not working clatrix 0.3.0? HOT 8
- Inconsistency in handling seq/map/filter, etc.
- Jblas SVD incorrect result HOT 1
- 0 and 1 argument results not working for + HOT 1
- Documentation HOT 2
- Clatrix not transposing V* matrix in correctly in SVD return HOT 9
- thought about switching to neanderthal HOT 1
- Missing support for PMatrixProducts HOT 1
- svd return value doesn't match Vectorz's svd
- warning related to `abs` function when using Clojure 1.11 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clatrix.