Class TextClassificationModelMetrics.Builder

    • Constructor Detail

      • Builder

        public Builder()
    • Method Detail

      • microPrecision

        public TextClassificationModelMetrics.Builder microPrecision​(Float microPrecision)
        Precision refers to the number of true positives divided by the total number of positive predictions (i.e., the number of true positives plus the number of false positives)
        Parameters:
        microPrecision - the value to set
        Returns:
        this builder
      • microRecall

        public TextClassificationModelMetrics.Builder microRecall​(Float microRecall)
        Measures the model’s ability to predict actual positive classes.

        It is the ratio between the predicted true positives and what was actually tagged. The recall metric reveals how many of the predicted classes are correct.

        Parameters:
        microRecall - the value to set
        Returns:
        this builder
      • macroPrecision

        public TextClassificationModelMetrics.Builder macroPrecision​(Float macroPrecision)
        Precision refers to the number of true positives divided by the total number of positive predictions (i.e., the number of true positives plus the number of false positives)
        Parameters:
        macroPrecision - the value to set
        Returns:
        this builder
      • macroRecall

        public TextClassificationModelMetrics.Builder macroRecall​(Float macroRecall)
        Measures the model’s ability to predict actual positive classes.

        It is the ratio between the predicted true positives and what was actually tagged. The recall metric reveals how many of the predicted classes are correct.

        Parameters:
        macroRecall - the value to set
        Returns:
        this builder
      • weightedF1

        public TextClassificationModelMetrics.Builder weightedF1​(Float weightedF1)
        F1-score, is a measure of a model\u2019s accuracy on a dataset
        Parameters:
        weightedF1 - the value to set
        Returns:
        this builder
      • weightedPrecision

        public TextClassificationModelMetrics.Builder weightedPrecision​(Float weightedPrecision)
        Precision refers to the number of true positives divided by the total number of positive predictions (i.e., the number of true positives plus the number of false positives)
        Parameters:
        weightedPrecision - the value to set
        Returns:
        this builder
      • weightedRecall

        public TextClassificationModelMetrics.Builder weightedRecall​(Float weightedRecall)
        Measures the model’s ability to predict actual positive classes.

        It is the ratio between the predicted true positives and what was actually tagged. The recall metric reveals how many of the predicted classes are correct.

        Parameters:
        weightedRecall - the value to set
        Returns:
        this builder