Skip to content

Commit

Permalink
v3.4.2
Browse files Browse the repository at this point in the history
  • Loading branch information
nkarasiak committed Jan 11, 2019
1 parent a85d39b commit 4fe1055
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
15 changes: 6 additions & 9 deletions dzetsaka.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,18 +42,15 @@
from .dzetsaka_provider import dzetsakaProvider

### In order to use RF/SVM/KNN
try:
import pip
except:
execfile(os.path.join(self.plugin_dir, get_pip.py))
import pip
# just in case the included version is old
pip.main(['install','--upgrade','pip'])

### try to install sklearn
try:
from sklearn import datasets
except:
pip.main(['install','-U' , 'scikit-learn'])
try:
import pip
pip.main(['install','-U' , 'scikit-learn'])
except:
pass


class dzetsakaGUI ( QDialog ):
Expand Down
4 changes: 3 additions & 1 deletion metadata.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
name=dzetsaka : Classification tool
qgisMinimumVersion=3.0
description=Fast and Easy Classification plugin for Qgis
version=3.4.1
version=3.4.2
author=Nicolas Karasiak
[email protected]

Expand All @@ -29,6 +29,8 @@ repository=http://www.github.com/lennepkade/dzetsaka

# Uncomment the following line and add your changelog:
changelog=
3.4.2
* Fix bug when trying to install sklearn at launch.
3.4.1
* Automatically install sklearn (if pip is installed)
* Precise in the confusion matrix that lines are references and columns prediction.
Expand Down
2 changes: 1 addition & 1 deletion scripts/mainfunction.py
Original file line number Diff line number Diff line change
Expand Up @@ -497,7 +497,7 @@ def __init__(self,inRaster,inVector,inField='Class',outModel=None,inSplit=100,in
if outMatrix is not None:
if not os.path.exists(os.path.dirname(outMatrix)):
os.makedirs(os.path.dirname(outMatrix))
np.savetxt(outMatrix,CONF.confusion_matrix,delimiter=',',header='Columns=prediction,Lines=Reference.',fmt='%1.4d')
np.savetxt(outMatrix,CONF.confusion_matrix,delimiter=',',header='Columns=prediction,Lines=reference.',fmt='%1.4d')

if inClassifier !='GMM':
for key in param_grid.keys():
Expand Down

0 comments on commit 4fe1055

Please sign in to comment.