/** * main * @param args */ public static void main(String[] args) { for(String v : args) { System.out.println("log_2("+v+")=" +log(Double.parseDouble(v))); } }
/** * main * @param args */ public static void main(String[] args) { for(String v : args) { System.out.println("log_2("+v+")=" +log(Double.parseDouble(v))); } }
/** * The normalised INQUERY idf formula * @param d the number for which we will compute the normalised idf * @return the normalised INQUERY idf of d */ public double idfNENQUIRY(double d) { return (WeightingModelLibrary.log(numberOfDocuments + 1.0D, d + 0.5D) / log(numberOfDocuments+1.0D)); }
/** * Return the normalised idf of the given number. * @param d The number of which the idf is computed. * @return the normalised idf of d */ public double idfN(double d) { return (WeightingModelLibrary.log(numberOfDocuments, d) / log(numberOfDocuments)); } /**
/** * Return the normalised idf of the given number. * @param d The number of which the idf is computed. * @return the normalised idf of d */ public double idfN(int d) { return (WeightingModelLibrary.log(numberOfDocuments, (double)d) / log(numberOfDocuments)); }
/** * Return the normalised idf of the given number. * @param d The number of which the idf is computed. * @return the normalised idf of d */ public double idfN(double d) { return (WeightingModelLibrary.log(numberOfDocuments, d) / log(numberOfDocuments)); } /**
/** * Return the normalised idf of the given number. * @param d The number of which the idf is computed. * @return the normalised idf of d */ public double idfN(int d) { return (WeightingModelLibrary.log(numberOfDocuments, (double)d) / log(numberOfDocuments)); }
/** * The normalised INQUERY idf formula * @param d the number for which we will compute the normalised idf * @return the normalised INQUERY idf of d */ public double idfNENQUIRY(double d) { return (WeightingModelLibrary.log(numberOfDocuments + 1.0D, d + 0.5D) / log(numberOfDocuments+1.0D)); }