Skip to content

Commit 0c68734

Browse files
author
Timur Gilmullin
committed
Chapter about install via pip added. Examples updated.
1 parent b011a9c commit 0c68734

1 file changed

Lines changed: 46 additions & 22 deletions

File tree

README.md

Lines changed: 46 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,13 @@ FuzzyClassificator
55

66
*Index:*
77
- [Introduction](#Chapter_1)
8-
- [How to use](#Chapter_2)
8+
- [How to work with FuzzyClassificator](#Chapter_2)
99
- [Presets](#Chapter_2_1)
10-
- [Usage](#Chapter_2_2)
11-
- [Optional arguments](#Chapter_2_2_1)
12-
- [Work modes](#Chapter_2_2_2)
13-
- [Usage examples](#Chapter_2_2_3)
10+
- [Install](#Chapter_2_2)
11+
- [Usage](#Chapter_2_3)
12+
- [Optional arguments](#Chapter_2_3_1)
13+
- [Work modes](#Chapter_2_3_2)
14+
- [Usage examples](#Chapter_2_3_3)
1415
- [Preparing data](#Chapter_3)
1516
- [ethalons.dat](#Chapter_3_1)
1617
- [Example of ethalons.dat](#Chapter_3_1_1)
@@ -42,8 +43,8 @@ How does it work? Let see process scheme below.
4243
![Two Stage of Classification Process](classification_process.png "Two Stage of Classification Process")
4344

4445

45-
<a name="Chapter_2"></a>How to use
46-
----------------------------------
46+
<a name="Chapter_2"></a>How to work with FuzzyClassificator
47+
-----------------------------------------------------------
4748

4849
FuzzyClassificator uses ethalons.dat (default) as learning data and candidates.dat (default) for classifying data (See "Preparing data" chapter).
4950
Work contains two steps:
@@ -61,15 +62,40 @@ The simplest way to use FuzziClassificator without some troubles is to install P
6162

6263
[Anaconda](https://www.continuum.io/downloads) is the open data science platform powered by Python. The open source version of Anaconda is a high performance distribution of Python and includes most of the popular Python packages for scientific calculation.
6364

64-
In all examples below, we used an Anaconda Python interpreter when you saw keyword "python".
65+
In all examples below, we used an Anaconda Python interpreter when you saw keyword "python" or "pip".
6566

6667

67-
<a name="Chapter_2_2"></a>**Usage**
68+
<a name="Chapter_2_2"></a>**Install**
6869

70+
You can install FuzzyClassificator using standart pip from Anaconda Python interpreter:
71+
72+
pip install FuzzyClassificator [--upgrade] [--pre]
73+
74+
or using standart setuptools from Anaconda Python interpreter to build local version:
75+
76+
git clone https://github.com/devopshq/FuzzyClassificator.git FuzzyClassificator
77+
cd FuzzyClassificator
78+
python setup.py install
79+
80+
After installing you can check the version of the FuzzyClassificator:
81+
82+
FuzzyClassificator --version
83+
84+
85+
<a name="Chapter_2_3"></a>**Usage**
86+
87+
Run program through Anaconda Python interpreter:
88+
6989
python FuzzyClassificator.py [options] [--learn]|[--classify] [Network_Options]
7090

91+
or like command-line script if installed via pip:
92+
93+
FuzzyClassificator [options] [--learn]|[--classify] [Network_Options]
7194

72-
<a name="Chapter_2_2_1"></a>***Optional arguments***
95+
In all the examples below, we will assume that the FuzzyClassificator installed via pip.
96+
97+
98+
<a name="Chapter_2_3_1"></a>***Optional arguments***
7399

74100
-h, --help
75101
Show help message and exit.
@@ -134,7 +160,7 @@ In all examples below, we used an Anaconda Python interpreter when you saw keywo
134160
This parameter affected training speed.
135161

136162

137-
<a name="Chapter_2_2_2"></a>***Work modes***
163+
<a name="Chapter_2_3_2"></a>***Work modes***
138164

139165
Learning Mode:
140166

@@ -176,17 +202,15 @@ Classifying Mode:
176202
}
177203

178204

179-
<a name="Chapter_2_2_3"></a>***Usage examples***
205+
<a name="Chapter_2_3_3"></a>***Usage examples***
180206

181207
Start learning with user's ethalon data file and neuronet options Config=(3,[3,2],2), 10 epochs, 0.05 learning rate and 0.05 momentum, epsilon is 0.1 and stop learning if errors less than 10%, update information in log every epochs and reload previous network for re-train:
182208

183-
python FuzzyClassificator.py --ethalons ethalons.dat --separator=TAB --debug-level=DEBUG --update 1 --reload --learn config=3,3,2,2 epochs=10 rate=0.05 momentum=0.05 epsilon=0.1 stop=10
209+
FuzzyClassificator --ethalons ethalons.dat --separator=TAB --debug-level=DEBUG --update 1 --reload --learn config=3,3,2,2 epochs=10 rate=0.05 momentum=0.05 epsilon=0.1 stop=10
184210

185211
Classify all candidates from file candidates.dat and show result in report.txt:
186212

187-
python FuzzyClassificator.py --candidates candidates.dat --network network.xml --report report.txt --separator=TAB --debug-level=DEBUG --classify config=3,3,2,2
188-
189-
Where 'python' is full path to Pyzo Python 3.3.2 interpreter.
213+
FuzzyClassificator --candidates candidates.dat --network network.xml --report report.txt --separator=TAB --debug-level=DEBUG --classify config=3,3,2,2
190214

191215

192216
<a name="Chapter_3"></a>Preparing data
@@ -248,11 +272,11 @@ To classify each of input vectors You must to use --classify key. All columns ar
248272

249273
If you trained Neuronet with command:
250274

251-
python FuzzyClassificator.py --ethalons ethalons.dat --learn config=3,3,2,2 epochs=1000 rate=0.1 momentum=0.05
275+
FuzzyClassificator --ethalons ethalons.dat --learn config=3,3,2,2 epochs=1000 rate=0.1 momentum=0.05
252276

253277
And then you classificated candidates vectors with command:
254278

255-
python FuzzyClassificator.py --candidates candidates.dat --network network.xml --report report.txt --classify config=3,3,2,2
279+
FuzzyClassificator --candidates candidates.dat --network network.xml --report report.txt --classify config=3,3,2,2
256280

257281
Then you will get the *report.text* file with information that looks like this:
258282

@@ -316,9 +340,9 @@ Some examples are below.
316340

317341
When you run Learning mode in CLI, for example:
318342

319-
python FuzzyClassificator.py --debug-level=info -u 1 --learn config=3,3,2,2 epochs=100 rate=0.5 momentum=0.5 epsilon=0.05 stop=1
343+
FuzzyClassificator --debug-level=info -u 1 --learn config=3,3,2,2 epochs=100 rate=0.5 momentum=0.5 epsilon=0.05 stop=1
320344

321-
Also you can run the same Learning mode command using API:
345+
also you can run the same Learning mode command using API:
322346

323347
import FuzzyClassificator as FC
324348
import FCLogger
@@ -342,9 +366,9 @@ Also you can run the same Learning mode command using API:
342366

343367
When you run Classifying mode in CLI, for example:
344368

345-
python FuzzyClassificator.py --candidates candidates.dat --network network.xml --report report.txt --separator=TAB --debug-level=DEBUG --classify config=3,3,2,2
369+
FuzzyClassificator --candidates candidates.dat --network network.xml --report report.txt --separator=TAB --debug-level=DEBUG --classify config=3,3,2,2
346370

347-
Also you can run the same Classifying mode command using API:
371+
also you can run the same Classifying mode command using API:
348372

349373
import FuzzyClassificator as FC
350374
from FCLogger import SetLevel

0 commit comments

Comments
 (0)