Comments (4)
Matrix and DataFrame are very different data structures and used for different kind of analysis. If you simply want to transferer the data from one structure to another, it is very easy. Both Eigen and DataFrame use std::vectors as their underlying data container. But I believe Eigen matrix requires special alignment which DataFrame also gives you the tools for it. Read the documentation here https://htmlpreview.github.io/?https://github.com/hosseinmoein/DataFrame/blob/master/docs/HTML/DataFrame.html.
But of you intend to substitute Eigen matrix with DataFrame and run matrix operations on DataFrame, thatβs a very bad idea. In other words; a DataFrame is not a matrix and a matrix is not a DataFrame
from dataframe.
Thanks for your reply. Here's my situation.
I'm currently implementing the Principal Component Analysis (PCA)
algorithm in C++, and I've implemented a basic version with the Eigen
library.
Now I want to use the DataFrame
library to implement it, because DataFrame
provides a lot of data analysis functions (thanks for your work), but in the PCA
algorithm I need to calculate the eigenvalues and eigenvectors of the whole data covariance matrix, or the SVD decomposition of the whole data matrix.
However, I noticed that the DataFrame
library does not have similar functions, so I want to combine the DataFrame
library and the Eigen
library, use the Eigen
library to solve the covariance matrix, and then convert it to the DataFrame
for further analysis.
I don't know if my idea of implementing PCA
complicates a simple problem, or if I don't need to use the functionality of the DataFrame library at all.
Thank you!
from dataframe.
Yes, DataFrame doesn't have Eigen values and vectors and svc, because the data in a DataFrame is not layed out efficiently for those calculations. I have another matrix library (https://github.com/hosseinmoein/Tiger) that has those and more. You may want to look at it.
In any case, moving data between a matrix and DataFrame should be very easy.
from dataframe.
Thanks a lot, I will have a try.
from dataframe.
Related Issues (20)
- StdVisitor error with user-defined type HOT 4
- in dynamic libraries, get_column returns an empty data vector HOT 10
- MedianVisitor giving wrong result HOT 2
- Issues while compiling with DataFrame headers HOT 4
- test failed HOT 2
- load_column from single_act_visit.get_result() HOT 3
- failed to compile tests and examples in ubuntu HOT 2
- The `DataFrame.h` occurred an error: `In included file: unknown type name 'requires'` HOT 3
- Compile Failed with `VERSION 2.0.0` HOT 3
- Error compiling on Linux x86_64 with g++ 14.0.1 or Clang 17.0.6 HOT 3
- Question: Does this library support streaming data frames? HOT 3
- CLang 16.0.6 fails to build a file including `DataFrame/DataFrame.h` HOT 1
- INTERFACE_LINK_LIBRARY is missing `tbb` HOT 1
- How to divide a big dataframe into several small ones while no memory copy needed HOT 9
- Group by on string dataframe
- do get_data_by_isel on the view HOT 6
- gen_rand_tester HOT 1
- Problem about reading CSV with empty values. HOT 7
- Errors compiling the HelloWorld example 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 dataframe.