1

Fixing hint projection bug

This commit is contained in:
Alex Yatskov 2015-04-18 18:24:45 +09:00
parent 4896f52871
commit 54a912cac3

View File

@ -107,8 +107,10 @@ func project(entries records, features featureMap, featureName string, minScore
var projection []queryProjection
stepRange(-1.0, 1.0, steps, func(sample float64) {
sampleFeatures[featureName] = sample
sample, sampleFeatures[featureName] = sampleFeatures[featureName], sample
compatibility, count := statRecords(entries, sampleFeatures, minScore)
sample, sampleFeatures[featureName] = sampleFeatures[featureName], sample
projection = append(projection, queryProjection{compatibility, count, sample})
})