Questions tagged [scikit-learn]

a Python module for machine learning, built on top of SciPy

Filter by
Sorted by
Tagged with
1
vote
0answers
13 views

Is it possible (and how) to mask NoData values using Scikit-learn PCA?

I have to carry out a Principal Component Analysis (sklearn.decomposition.PCA) on a dataset composed of several images. Some of these images have very large gaps due to the removal of clouds. Is there ...
1
vote
1answer
75 views

Getting scipy.cKDTree to return everything with a given meter radius

I want to find everything within a 0.1 meter radius. I'm confused on exactly how query_ball_point is getting distance. I'm using decimal degree coordinates when creating the cKDTree, ie. [(-73....
1
vote
0answers
24 views

Groups the pixels into the nearest large class

I have clustered an image with 3 classes using the K_menas, but I would like the isolated pixel groups to be incorporated into the nearest large class. Is there a quick way to do this in the K_means ...
0
votes
0answers
44 views

How to redesign confusion matrices from Ecognition with python and seaborn?

I am using eCognition manual classification as a baseline for performance comparison with other 3D classification methods. For each method, I am creating confusion matrices in python with sklearn and ...
1
vote
0answers
114 views

Memory allocation problem when running Random forest regression in python

I have image with 4 bands . I want to see if I can predict the first band using the 3 other bands. My problem is that I cannot fit the model because I get the following error message: MemoryError: ...
0
votes
0answers
25 views

Concatenating numpy arrays based on their relative positions as defined by associated Affine transforms

I have split a raster into 4 numpy arrays to feed into machine learning algorithms. I would now like to join to results of that process back into the full array. For each I have a numpy array, and an ...
0
votes
0answers
48 views

Standardization, or mean removal and variance scaling of remote sensing data

I am trying to follow this tutorial Tree Cover Prediction Using Deep Learning. The following sample code is aimed to standardize the data. img_mean = np.mean(x_train_raw, axis=(0, 1, 2)) img_std = np....
0
votes
2answers
253 views

Cluster networkx graph with sklearn produces unexpected results

I have an interconnected weighted graph. The graph is a representation of a Multilinestring connecting points. See the visualisation in QGIS: So from each point I know how much it costs to go to ...
2
votes
1answer
225 views

How can you use scikit-learn to do PCA on a 9 band raster image?

I would like to do a PCA on a 9band raster image to reduce the total number of inputs bands to 3. However, I'm not able to do it as I don't think I understand what sklearn is doing in its PCA. Some ...
3
votes
0answers
2k views

Encoding categorical variable for random forest with sklearn

I have a random forest model that works pretty well, taking a bunch of vanilla remote sensing raster data as input. I think it could be improved with addition of some information that I currently have ...
1
vote
0answers
37 views

Handling Nodata values in sklearn (working w pyimpute)

I'm using sklearn for a classification project. Because I'm relatively new to doing geospatial tasks outside of a GUI, I'm using Matt Perry's pyimpute (link has all the code for that module) to handle ...
1
vote
0answers
92 views

Nearest neighbours with Python [closed]

I'm learning Python and this has been a bit of a challenge! My DataFrame looks like this below. name geometry 0 Uimastadion POINT (24.93045 60.18882) 1 Hartwall ...
0
votes
1answer
306 views

Dzetsala plugin on QGIS, missing scikit-learn

I want to run random forest classification from Dzetsaka plugin on QGIS 3.4.7 but I can't as a message appears as following: Scikit-learn library is missing on your computer. You must use Gaussian ...
2
votes
0answers
653 views

Change size to the squares of the confusion matrix [closed]

I have a problem with size in the 'plot_confusion_matrix', the squares of the confusion matrix appear cut off. I would like to solve this problem. svc = SVC(kernel='linear',C=1,probability=True) svc....
1
vote
0answers
182 views

Kernel Density Estimate on point data in degrees (scikit-learn)

I am estimating point density, where I am having point coordinates in degrees, I need a raster(over the extent of these points) which provides a density estimation on each cell. I have tried on R but ...
-1
votes
1answer
497 views

Classify polygons with Random Forest on Python

I have a segmentation shapefile made with e-cognition containing many polygons of which a part classified for the train file. I would like to classify them by applying labels (e.g. water, vegetation, ...
1
vote
0answers
41 views

How to find data orientation atfer an ICA

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, ...
4
votes
2answers
2k views

Installing scikit-learn python package for QGIS on Win

I want to install scikit-learn package to be executed in Python-QGIS. I've tried to use OSGeo4W Shell to install with pip. But I got this error. I've tried to run osgeo4w-setup-x86_64.exe and install ...
0
votes
1answer
509 views

Why is there a need to train the clusterer in Google Earth Engine

I'm wondering why before clustering the global Landsat-7 image in this tutorial, the authors first trained the clusterer on a subset region around Egypt? Since the Kmean algorithm is supposed to be ...
2
votes
1answer
1k views

Python with ArcGIS: import scikit-learn fails (bad numpy.dtype)

I am trying to install scikit-learn 0.17.1 (current) into my Python 2.7.3 that accompanies my ArcGIS 10.2. The installation through easy_install goes through smoothly, but I get the following error on ...