Skip to content

Commit

Permalink
Additional changes in the README
Browse files Browse the repository at this point in the history
  • Loading branch information
richermans committed Feb 5, 2016
1 parent 07118a0 commit d0485e4
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,7 @@ PLDA fit does also accept two extra arguments:
```python
#Transform the features first to a given target dimension. Default is keeping the dimension
targetdim=10
#Smoothing factor does increase the performance. Its a value between 0 and 1. Does affect the covariance matrix
smoothing=0.5
plda.fit(X,Y,targetdim,smoothing)
plda.fit(X,Y,targetdim)
```

LDA can then after fitting be used to directly score any incoming utterance using predict_log_prob(SAMPLE)
Expand All @@ -84,11 +82,18 @@ Generally it is recommended to have an held out set to do this estimation. The n
```python
ENROL_X=np.random.rand(n_samples,featdim)
ENROL_Y=np.arange(n_samples,dtype='uint')
transformed_vectors = plda.transform(ENROL_X,ENROL_Y)
#Smoothing factor does increase the performance. Its a value between 0 and 1. #Does affect the covariance matrix. Optional!
smoothing=0.5

#Transform the features first to a given target dimension. Default is keeping the dimension
targetdim=10

transformed_vectors = plda.transform(ENROL_X,ENROL_Y,targetdim,smoothing)

Otherdata = np.random.rand(m_samples,featdim)
plda.norm(Otherdata,transformed_vectors)
```
Note that if targetdim is given, all future plda.transform() calls also need targetdim as a valid parameter

And finally one can score any model against a utterance by:

Expand Down

0 comments on commit d0485e4

Please sign in to comment.