Skip to content

Commit

Permalink
v3.4.1
Browse files Browse the repository at this point in the history
  • Loading branch information
nkarasiak committed Dec 18, 2018
1 parent 5bd3be6 commit a85d39b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 deletions.
16 changes: 15 additions & 1 deletion dzetsaka.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@

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:
from sklearn import datasets
except:
pip.main(['install','-U' , 'scikit-learn'])


class dzetsakaGUI ( QDialog ):
"""QGIS Plugin Implementation."""
Expand Down Expand Up @@ -103,7 +117,7 @@ def __init__(self, iface):
#self.run()

def rememberLastSaveDir(self,fileName):
"""!@brief Remember last saved dir when saving or loading file"""
"""!@brief Remember last sd dir when saving or loading file"""
if fileName != '':
self.lastSaveDir = fileName
self.settings.setValue('/dzetsaka/lastSaveDir',self.lastSaveDir)
Expand Down
5 changes: 4 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
version=3.4.1
author=Nicolas Karasiak
[email protected]

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

# Uncomment the following line and add your changelog:
changelog=
3.4.1
* Automatically install sklearn (if pip is installed)
* Precise in the confusion matrix that lines are references and columns prediction.
3.4
* Add welcome message if first installation, with, I hope, good tips for new users
3.3.1
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=',',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 a85d39b

Please sign in to comment.