<SYSTEM_TASK:>
Given the following text description, write Python code to implement the functionality described below step by step
<END_TASK>
<USER_TASK:>
Description:
 Experience
Based on wordnet as ground truth, we tried to learn a classifier to detect antonymics relations between words (small != big / good != bad)
To do so we will explore the carthesian product of
Step1:  We can observe quite good f1-score on RandomForest with normalised projected cosine similarity.
Results are even better with not bidirectional relations (bidi). It makes sense since we can find several antonyms for one word
<ASSISTANT_TASK:>
Python Code:
summaryDf = pd.DataFrame([extractSummaryLine(l) for l in open('../../data/learnedModel/anto/summary.txt').readlines()],
                        columns=['bidirectional', 'strict', 'clf', 'feature', 'post', 'precision', 'recall', 'f1'])
summaryDf.sort_values('f1', ascending=False)[:10]
Explanation: Experience
Based on wordnet as ground truth, we tried to learn a classifier to detect antonymics relations between words (small != big / good != bad)
To do so we will explore the carthesian product of:
* simple / bidi: consider each adjective to have only one antonyms or not
* strict: try to compose missing concept 
* randomForest / knn: knn allow us to check if there is anything consistent to learn, randomForest is a basic model as a first approach to learn the function
* feature: one of the feature presented in the guided tour
* postFeature: any extra processing to apply to the feature extraction (like normalise)
We use a 10 K-Fold cross validation.
Negative sampling is generating by shuffling pairs.
Once you downloaded the files, you can use this script reproduce the experience at home:
python experiment/trainAll_antoClf.py &gt; ../data/learnedModel/anto/log.txt
Results
Here is the summary of the results we gathered,
You can find details reports in logs.
End of explanation
!python ../../toolbox/script/detailConceptPairClfError.py ../../data/voc/npy/wikiEn-skipgram.npy ../../data/learnedModel/anto/bidi__RandomForestClassifier_pCosSim_postNormalize.dill ../../data/wordPair/wordnetAnto.txt anto ../../data/wordPair/wordnetAnto_fake.txt notAnto
Explanation: We can observe quite good f1-score on RandomForest with normalised projected cosine similarity.
Results are even better with not bidirectional relations (bidi). It makes sense since we can find several antonyms for one word:
* small != big
* small != tall
Allowing to compose concept also seems to have a positive impact.
Study errors
Here is the detail of:
* False positive - ie: pairs considered as antonyms but not included in wordnet
* False negative - ie: not detected antonyms
The false positives are especially interresting here...
End of explanation
<END_TASK>