How to find data orientation atfer an ICAAutomating roof orientation detection from satellite imagery?Python...
Ramanujan's radical and how we define an infinite nested radical
Rudeness by being polite
Why is Shelob considered evil?
Exploding Numbers
Badly designed reimbursement form. What does that say about the company?
Why are `&array` and `array` pointing to the same address?
How bad is a Computer Science course that doesn't teach Design Patterns?
How can a kingdom keep the secret of a missing monarch from the public?
Does changing "sa" password require a SQL restart (in mixed mode)?
How do I add a strong "onion flavor" to the biryani (in restaurant style)?
Stream.findFirst different than Optional.of?
What does an unprocessed RAW file look like?
Is Apex Sometimes Case Sensitive?
Arizona laws regarding ownership of ground glassware for chemistry usage
Microphone on Mars
Have the conservatives lost the working majority and if so, what does this mean?
Can a planet be tidally unlocked?
How can guns be countered by melee combat without raw-ability or exceptional explanations?
Coworker is trying to get me to sign his petition to run for office. How to decline politely?
What did Putin say about a US deep state in his state-of-the-nation speech; what has he said in the past?
How should I ship cards?
The Late Queen Gives in to Remorse - Reverse Hangman
What is formjacking?
Relation between roots and coefficients - manipulation of identities
How to find data orientation atfer an ICA
Automating roof orientation detection from satellite imagery?Python script to read CAD data to find polygon extentsFind and Replace data source scriptHow to find and apply reprojection parameters?how to find close and parallel linesGrass python shell can't find my dataWhere do I find the covariance matrix in Erdas Imagine?PostGIS polygon edge analysis (orientation, edge length)How to find coordinates of opposite vertices in a boundingboxHow to find how grass's r.viewshed works programmatically?
I'm trying to cluster tractor sensor data by row in a python script. For the moment I'm trying to find data orientation after a FastICA (sklearn), vertical or horizontal. Because for same data, FastICA can orientate results differently.
Until now, I was searching for an empirical rule with the 2 matrix FastICA().components_
and FastICA().mixing_
. But I found nothing that works.
Is somebody have an better idea?
Here is data and my code below:
import geopandas as gpd
import numpy as np
shp_name = 'rawdata379'
shp_source = ('/home/jovyan/scripts/physiocap/Test_Data/{}.shp'.format(shp_name))
source = gpd.read_file(shp_source)
source = source.to_crs({'init' :'epsg:3857'})
src_coord = source[['LONGITUDE', 'LATITUDE']]
from sklearn.decomposition import FastICA
import pandas as pd
from shapely.geometry import Point
rng = np.random.RandomState(42)
pca = FastICA(n_components=2, algorithm='parallel', whiten=True, max_iter=100)
src_coord_pca = pca.fit_transform(src_coord)
src_coord_pca_df = pd.DataFrame(src_coord_pca).rename(columns={0:'X', 1:'Y'})
src_coord_pca_df['geometry'] = list(zip(src_coord_pca_df['X'], src_coord_pca_df['Y']))
src_coord_pca_df['geometry'] = src_coord_pca_df['geometry'].apply(Point)
src_coord_pca_gdf = gpd.GeoDataFrame(src_coord_pca_df, geometry='geometry')
src_coord_pca_gdf.plot(figsize=(9, 9))
compo, feat = pca.components_
print('compo :', compo)
print('feat :', feat)
feat, compo = pca.mixing_
print('compo :', compo)
print('feat :', feat)
#trial of empirical rule
if (pca.components_[0][0] > 0 != pca.components_[0][1] > 0):
print('vertical')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[0]
else:
print('horizontal')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[1]
python scikit-learn pca
add a comment |
I'm trying to cluster tractor sensor data by row in a python script. For the moment I'm trying to find data orientation after a FastICA (sklearn), vertical or horizontal. Because for same data, FastICA can orientate results differently.
Until now, I was searching for an empirical rule with the 2 matrix FastICA().components_
and FastICA().mixing_
. But I found nothing that works.
Is somebody have an better idea?
Here is data and my code below:
import geopandas as gpd
import numpy as np
shp_name = 'rawdata379'
shp_source = ('/home/jovyan/scripts/physiocap/Test_Data/{}.shp'.format(shp_name))
source = gpd.read_file(shp_source)
source = source.to_crs({'init' :'epsg:3857'})
src_coord = source[['LONGITUDE', 'LATITUDE']]
from sklearn.decomposition import FastICA
import pandas as pd
from shapely.geometry import Point
rng = np.random.RandomState(42)
pca = FastICA(n_components=2, algorithm='parallel', whiten=True, max_iter=100)
src_coord_pca = pca.fit_transform(src_coord)
src_coord_pca_df = pd.DataFrame(src_coord_pca).rename(columns={0:'X', 1:'Y'})
src_coord_pca_df['geometry'] = list(zip(src_coord_pca_df['X'], src_coord_pca_df['Y']))
src_coord_pca_df['geometry'] = src_coord_pca_df['geometry'].apply(Point)
src_coord_pca_gdf = gpd.GeoDataFrame(src_coord_pca_df, geometry='geometry')
src_coord_pca_gdf.plot(figsize=(9, 9))
compo, feat = pca.components_
print('compo :', compo)
print('feat :', feat)
feat, compo = pca.mixing_
print('compo :', compo)
print('feat :', feat)
#trial of empirical rule
if (pca.components_[0][0] > 0 != pca.components_[0][1] > 0):
print('vertical')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[0]
else:
print('horizontal')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[1]
python scikit-learn pca
add a comment |
I'm trying to cluster tractor sensor data by row in a python script. For the moment I'm trying to find data orientation after a FastICA (sklearn), vertical or horizontal. Because for same data, FastICA can orientate results differently.
Until now, I was searching for an empirical rule with the 2 matrix FastICA().components_
and FastICA().mixing_
. But I found nothing that works.
Is somebody have an better idea?
Here is data and my code below:
import geopandas as gpd
import numpy as np
shp_name = 'rawdata379'
shp_source = ('/home/jovyan/scripts/physiocap/Test_Data/{}.shp'.format(shp_name))
source = gpd.read_file(shp_source)
source = source.to_crs({'init' :'epsg:3857'})
src_coord = source[['LONGITUDE', 'LATITUDE']]
from sklearn.decomposition import FastICA
import pandas as pd
from shapely.geometry import Point
rng = np.random.RandomState(42)
pca = FastICA(n_components=2, algorithm='parallel', whiten=True, max_iter=100)
src_coord_pca = pca.fit_transform(src_coord)
src_coord_pca_df = pd.DataFrame(src_coord_pca).rename(columns={0:'X', 1:'Y'})
src_coord_pca_df['geometry'] = list(zip(src_coord_pca_df['X'], src_coord_pca_df['Y']))
src_coord_pca_df['geometry'] = src_coord_pca_df['geometry'].apply(Point)
src_coord_pca_gdf = gpd.GeoDataFrame(src_coord_pca_df, geometry='geometry')
src_coord_pca_gdf.plot(figsize=(9, 9))
compo, feat = pca.components_
print('compo :', compo)
print('feat :', feat)
feat, compo = pca.mixing_
print('compo :', compo)
print('feat :', feat)
#trial of empirical rule
if (pca.components_[0][0] > 0 != pca.components_[0][1] > 0):
print('vertical')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[0]
else:
print('horizontal')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[1]
python scikit-learn pca
I'm trying to cluster tractor sensor data by row in a python script. For the moment I'm trying to find data orientation after a FastICA (sklearn), vertical or horizontal. Because for same data, FastICA can orientate results differently.
Until now, I was searching for an empirical rule with the 2 matrix FastICA().components_
and FastICA().mixing_
. But I found nothing that works.
Is somebody have an better idea?
Here is data and my code below:
import geopandas as gpd
import numpy as np
shp_name = 'rawdata379'
shp_source = ('/home/jovyan/scripts/physiocap/Test_Data/{}.shp'.format(shp_name))
source = gpd.read_file(shp_source)
source = source.to_crs({'init' :'epsg:3857'})
src_coord = source[['LONGITUDE', 'LATITUDE']]
from sklearn.decomposition import FastICA
import pandas as pd
from shapely.geometry import Point
rng = np.random.RandomState(42)
pca = FastICA(n_components=2, algorithm='parallel', whiten=True, max_iter=100)
src_coord_pca = pca.fit_transform(src_coord)
src_coord_pca_df = pd.DataFrame(src_coord_pca).rename(columns={0:'X', 1:'Y'})
src_coord_pca_df['geometry'] = list(zip(src_coord_pca_df['X'], src_coord_pca_df['Y']))
src_coord_pca_df['geometry'] = src_coord_pca_df['geometry'].apply(Point)
src_coord_pca_gdf = gpd.GeoDataFrame(src_coord_pca_df, geometry='geometry')
src_coord_pca_gdf.plot(figsize=(9, 9))
compo, feat = pca.components_
print('compo :', compo)
print('feat :', feat)
feat, compo = pca.mixing_
print('compo :', compo)
print('feat :', feat)
#trial of empirical rule
if (pca.components_[0][0] > 0 != pca.components_[0][1] > 0):
print('vertical')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[0]
else:
print('horizontal')
src_coord_pca_df = pd.DataFrame(src_coord_pca)[1]
python scikit-learn pca
python scikit-learn pca
asked 4 hours ago
Tim C.Tim C.
463417
463417
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "79"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313029%2fhow-to-find-data-orientation-atfer-an-ica%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Thanks for contributing an answer to Geographic Information Systems Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f313029%2fhow-to-find-data-orientation-atfer-an-ica%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown