We develop an x-ray Ti/Au transition-edge sensor (TES) with an Au absorber deposited on the center of TES and improved its energy resolution using the K-means clustering algorithm in combination with Wiener filter. We firstly extract the main parameters of each recorded pulse trace, which are adopted to classify these traces into several clusters in the K-means clustering algorithm. Then real traces are selected for energy resolution analysis. Following the baseline correction, the Wiener filter is used to improve the signal-to-noise ratio. Although the silicon underneath the TES has not been etched to reduce the thermal conductance, the energy resolution of the developed x-ray TES is improved from 94 eV to 44 eV at 5.9 keV.